PDEAtlas

10.5. Using Verified Computation🔗

We can first inspect a calculation, then use a tactic to prove a statement about it. #cas prints the input, computed result, available checked evidence, and planner metadata in the InfoView. It adds auxiliary theorems to check the displayed proof evidence in Lean's kernel; it does not close a user's theorem goal. Representative commands use the same syntax throughout:

-- Exact algebra and calculus. #cas [derive x] #cas [derive x] Domain: x ∈ ℝ Input (scalar ℝ): (2 * x) Output (scalar ℝ): 2
[CAS.Command.details] More details
  • Variables: x
  • [CAS.Command.computation] Analytic domain conditions
    • Raw checked nonzero requirements: (none)
    • Raw checked positivity requirements: (none)
  • [CAS.Command.computation] Partial derivative in x
    • [CAS.Command.computation] 1. Apply symbolic differentiation rules
      • raw result: 0*x + 2*1
    • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
      • normalized result: 2
    • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
      • displayed result: 2
      • additional nonzero requirements: (none)
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Derivative of the input
        • Proposition: ∀ (x : ℝ), HasDerivAt (fun x ↦ 2 * x) 2 x
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.hasDerivAt_of_displayRoute
      • [CAS.explanation.checkedStep] Partial derivative in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 ((CAS.Verified.Expr.nat 2).mul 𝕏[0])).rawDerivative = CAS.Verified.Expr.diff 0 ((CAS.Verified.Expr.nat 2).mul 𝕏[0])
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Partial derivative in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((CAS.Verified.Expr.nat 2).mul 𝕏[0])).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((CAS.Verified.Expr.nat 2).mul 𝕏[0])).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Partial derivative in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((CAS.Verified.Expr.nat 2).mul 𝕏[0]))).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((CAS.Verified.Expr.nat 2).mul 𝕏[0]))).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((CAS.Verified.Expr.nat 2).mul 𝕏[0])).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Partial derivative in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^1), CAS.Verified.Expr.ValidAt x.ofLp ((CAS.Verified.Expr.nat 2).mul 𝕏[0]) → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((CAS.Verified.Expr.nat 2).mul 𝕏[0]))).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp ((CAS.Verified.Expr.nat 2).mul 𝕏[0])) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((CAS.Verified.Expr.nat 2).mul 𝕏[0]))).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
(2 * x)
#cas [simplify] #cas [simplify] Domain: x ∈ ℝ Input (scalar ℝ): ((x + 0) * 1) Output (scalar ℝ): x
[CAS.Command.details] More details
  • Variables: x
  • [CAS.Command.computation] Checked symbolic computation
    • Raw checked nonzero requirements: (none)
    • Guarantee: these assumptions justify conditional rewrites and preserve real evaluation
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Identity with the simplified form
        • Proposition: ∀ (x : ℝ), (x + 0) * 1 = x
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.eq_of_simplifyFinDisplayRoute
      • [CAS.explanation.checkedStep] Simplification under generated rewrite assumptions
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ ((𝕏[0].add (CAS.Verified.Expr.nat 0)).mul (CAS.Verified.Expr.nat 1)).simplifyFinDisplayRoute.nonzero → CAS.Verified.Expr.eval ρ ((𝕏[0].add (CAS.Verified.Expr.nat 0)).mul (CAS.Verified.Expr.nat 1)).simplifyFinDisplayRoute.rhs = CAS.Verified.Expr.eval ρ ((𝕏[0].add (CAS.Verified.Expr.nat 0)).mul (CAS.Verified.Expr.nat 1)).simplifyFinDisplayRoute.lhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.SideClaimRoute.sound
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] pre-normalization: deep-factor-cancel: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] pre-normalization: inverse-elementary: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] pre-normalization: real-power: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] base normalization: structural: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: trig: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: algebra: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: factor-common: attempted
        • checked
      • [CAS.explanation.plannerStep] post-normalization: inverse-elementary: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: real-power: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: fraction-normal-form: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: rational-side: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-square: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-numeral: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-product-collect: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: common-add-factor: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: deep-factor-cancel: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: unit-ratio: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] direct: univariate-rational-canonical: attempted
        • side-conditioned
((x + 0) * 1)
#cas [derive] #cas [derive] Domain: x ∈ ℝ Input (scalar ℝ): (sin x) Output (scalar ℝ): cos(x)
[CAS.Command.details] More details
  • Variables: x
  • [CAS.Command.computation] Analytic domain conditions
    • Raw checked nonzero requirements: (none)
    • Raw checked positivity requirements: (none)
  • [CAS.Command.computation] Partial derivative in x
    • [CAS.Command.computation] 1. Apply symbolic differentiation rules
      • raw result: cos(x)*1
    • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
      • normalized result: cos(x)
    • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
      • displayed result: cos(x)
      • additional nonzero requirements: (none)
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Derivative of the input
        • Proposition: ∀ (x : ℝ), HasDerivAt (fun x ↦ Real.sin x) (Real.cos x) x
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.hasDerivAt_of_displayRoute
      • [CAS.explanation.checkedStep] Partial derivative in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].sin).rawDerivative = CAS.Verified.Expr.diff 0 𝕏[0].sin
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Partial derivative in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].sin).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].sin).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Partial derivative in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].sin)).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].sin)).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].sin).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Partial derivative in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^1), CAS.Verified.Expr.ValidAt x.ofLp 𝕏[0].sin → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].sin)).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp 𝕏[0].sin) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].sin)).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
(sin x)
#cas [derive x] #cas [derive x] Domain: (x, y) ∈ ℝ^2 Input (scalar ℝ): (sin (x * y)) Output (scalar ℝ): cos(x*y)*y
[CAS.Command.details] More details
  • Variables: x, y
  • [CAS.Command.computation] Analytic domain conditions
    • Raw checked nonzero requirements: (none)
    • Raw checked positivity requirements: (none)
  • [CAS.Command.computation] Partial derivative in x
    • [CAS.Command.computation] 1. Apply symbolic differentiation rules
      • raw result: cos(x*y)*(1*y + x*0)
    • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
      • normalized result: cos(x*y)*y
    • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
      • displayed result: cos(x*y)*y
      • additional nonzero requirements: (none)
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Derivative of the input
        • Proposition: ∀ (x y : ℝ), HasDerivAt (fun x ↦ Real.sin (x * y)) (Real.cos (x * y) * y) x
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.hasDerivAt_of_displayRoute
      • [CAS.explanation.checkedStep] Partial derivative in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).rawDerivative = CAS.Verified.Expr.diff 0 (𝕏[0].mul 𝕏[1]).sin
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Partial derivative in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Partial derivative in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Partial derivative in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp (𝕏[0].mul 𝕏[1]).sin → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp (𝕏[0].mul 𝕏[1]).sin) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
(sin (x * y))
#cas [derive x] #cas [derive x] Domain: x ∈ ℝ Input (scalar ℝ): (x ^ (3 / 2 : ℝ)) Output (scalar ℝ): 3/2*sqrt(x) Conditions: x > 0
[CAS.Command.details] More details
  • Variables: x
  • [CAS.Command.computation] Analytic domain conditions
    • Raw checked nonzero requirements: 2
    • Raw checked positivity requirements: x
  • [CAS.Command.computation] Partial derivative in x
    • [CAS.Command.computation] 1. Apply symbolic differentiation rules
      • raw result: 1*3/2*x^(3/2 - 1) + (0*2 - 3*0)/2^2*x^(3/2)*log(x)
    • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
      • normalized result: 3/2*x^(1/2)
    • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
      • displayed result: 3/2*sqrt(x)
      • additional nonzero requirements: (none)
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Derivative of the input
        • Proposition: ∀ (x : ℝ), 0 < x → HasDerivAt (fun x ↦ x ^ (3 / 2 : ℝ)) (3 / 2 * √x) x
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.hasDerivAt_of_displayRoute
      • [CAS.explanation.checkedStep] Partial derivative in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2)))).rawDerivative = CAS.Verified.Expr.diff 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2)))
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Partial derivative in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2)))).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2)))).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Partial derivative in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2))))).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2))))).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2)))).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Partial derivative in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^1), CAS.Verified.Expr.ValidAt x.ofLp (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2))) → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2))))).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2)))) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2))))).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] pre-normalization: deep-factor-cancel: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] pre-normalization: inverse-elementary: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] pre-normalization: real-power: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] base normalization: structural: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: trig: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: algebra: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: factor-common: attempted
        • checked
      • [CAS.explanation.plannerStep] post-normalization: inverse-elementary: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: real-power: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: fraction-normal-form: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: rational-side: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-square: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-numeral: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: pythagorean: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-product-collect: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: common-add-factor: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: deep-factor-cancel: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: unit-ratio: attempted
        • side-conditioned
(x ^ (3 / 2 : ℝ))
#cas [grad x, y] #cas [grad x, y] Domain: (x, y) ∈ ℝ^2 Input (scalar ℝ): (sin (x * y)) Output (vector ℝ^2; order x, y): (cos(x*y)*y, cos(x*y)*x)
[CAS.Command.details] More details
  • Variables and component order: x, y
  • [CAS.Command.computation] Analytic domain conditions
    • Raw checked nonzero requirements: (none)
    • Raw checked positivity requirements: (none)
  • [CAS.Command.computation] Checked gradient computation
    • [CAS.Command.computation] Gradient component ∂_x
      • Output: cos(x*y)*y
      • [CAS.Command.computation] Partial derivative in x
        • [CAS.Command.computation] 1. Apply symbolic differentiation rules
          • raw result: cos(x*y)*(1*y + x*0)
        • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
          • normalized result: cos(x*y)*y
        • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
          • displayed result: cos(x*y)*y
          • additional nonzero requirements: (none)
    • [CAS.Command.computation] Gradient component ∂_y
      • Output: cos(x*y)*x
      • [CAS.Command.computation] Partial derivative in y
        • [CAS.Command.computation] 1. Apply symbolic differentiation rules
          • raw result: cos(x*y)*(0*y + x*1)
        • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
          • normalized result: cos(x*y)*x
        • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
          • displayed result: cos(x*y)*x
          • additional nonzero requirements: (none)
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Gradient of the input
        • Proposition: ∀ (x y : ℝ), HasGradientAt (fun p ↦ Real.sin (p.ofLp 0 * p.ofLp 1)) !₂[Real.cos (x * y) * y, Real.cos (x * y) * x] !₂[x, y]
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.hasGradientAt_of_closedGradient
      • [CAS.explanation.checkedStep] Gradient component ∂_x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).rawDerivative = CAS.Verified.Expr.diff 0 (𝕏[0].mul 𝕏[1]).sin
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Gradient component ∂_x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Gradient component ∂_x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Gradient component ∂_x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp (𝕏[0].mul 𝕏[1]).sin → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp (𝕏[0].mul 𝕏[1]).sin) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Gradient component ∂_y: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin).rawDerivative = CAS.Verified.Expr.diff 1 (𝕏[0].mul 𝕏[1]).sin
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Gradient component ∂_y: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Gradient component ∂_y: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin)).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin)).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Gradient component ∂_y: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp (𝕏[0].mul 𝕏[1]).sin → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin)).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp (𝕏[0].mul 𝕏[1]).sin) x) (EuclideanSpace.single 1 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin)).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Analytic gradient assembly
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp (𝕏[0].mul 𝕏[1]).sin → (WithLp.toLp 2 fun i ↦ CAS.Verified.Expr.eval x.ofLp ((∇ₛ (𝕏[0].mul 𝕏[1]).sin) i)) = gradient (fun y ↦ CAS.Verified.Expr.eval y.ofLp (𝕏[0].mul 𝕏[1]).sin) x
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.closedGradient_eval_eq_gradient
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
(sin (x * y))
#cas [laplacian x, y] #cas [laplacian x, y] Domain: (x, y) ∈ ℝ^2 Input (scalar ℝ): (x ^ 2 + y ^ 2) Output (scalar ℝ): 4
[CAS.Command.details] More details
  • Variables: x, y
  • [CAS.Command.computation] Analytic domain conditions
    • Raw checked nonzero requirements: (none)
    • Raw checked positivity requirements: (none)
  • [CAS.Command.computation] Checked coordinate computations
    • [CAS.Command.computation] Second partial ∂_x∂_x
      • [CAS.Command.computation] Partial derivative in x
        • [CAS.Command.computation] 1. Apply symbolic differentiation rules
          • raw result: 2*x^1*1 + 2*y^1*0
        • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
          • normalized result: 2*x
        • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
          • displayed result: 2*x
          • additional nonzero requirements: (none)
      • [CAS.Command.computation] Partial derivative in x
        • [CAS.Command.computation] 1. Apply symbolic differentiation rules
          • raw result: (0*x^1 + 2*1*x^0*1)*1 + 2*x^1*0 + (0*y^1 + 2*1*y^0*0)*0 + 2*y^1*0
        • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
          • normalized result: 2
        • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
          • displayed result: 2
          • additional nonzero requirements: (none)
      • summand: 2
    • [CAS.Command.computation] Second partial ∂_y∂_y
      • [CAS.Command.computation] Partial derivative in y
        • [CAS.Command.computation] 1. Apply symbolic differentiation rules
          • raw result: 2*x^1*0 + 2*y^1*1
        • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
          • normalized result: 2*y
        • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
          • displayed result: 2*y
          • additional nonzero requirements: (none)
      • [CAS.Command.computation] Partial derivative in y
        • [CAS.Command.computation] 1. Apply symbolic differentiation rules
          • raw result: (0*x^1 + 2*1*x^0*0)*0 + 2*x^1*0 + (0*y^1 + 2*1*y^0*1)*1 + 2*y^1*0
        • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
          • normalized result: 2
        • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
          • displayed result: 2
          • additional nonzero requirements: (none)
      • summand: 2
  • [CAS.Command.computation] Sum and normalize the diagonal second partials
    • Summands: 2, 2
    • Normalized sum: 4
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] First partial in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).rawDerivative = CAS.Verified.Expr.diff 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2))
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] First partial in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] First partial in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] First partial in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp ((𝕏[0].pow 2).add (𝕏[1].pow 2)) → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp ((𝕏[0].pow 2).add (𝕏[1].pow 2))) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Second partial in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0)))).rawDerivative = CAS.Verified.Expr.diff 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0)))
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Second partial in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0)))).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0)))).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Second partial in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0))))).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0))))).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0)))).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Second partial in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0))) → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0))))).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0)))) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0))))).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] First partial in y: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).rawDerivative = CAS.Verified.Expr.diff 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2))
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] First partial in y: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] First partial in y: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] First partial in y: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp ((𝕏[0].pow 2).add (𝕏[1].pow 2)) → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp ((𝕏[0].pow 2).add (𝕏[1].pow 2))) x) (EuclideanSpace.single 1 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Second partial in y: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1)))).rawDerivative = CAS.Verified.Expr.diff 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1)))
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Second partial in y: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1)))).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1)))).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Second partial in y: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1))))).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1))))).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1)))).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Second partial in y: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1))) → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1))))).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1)))) x) (EuclideanSpace.single 1 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1))))).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Analytic Laplacian assembly
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp ((𝕏[0].pow 2).add (𝕏[1].pow 2)) → (∀ (i : Fin 2), CAS.Verified.Expr.ValidAt x.ofLp (CAS.Verified.Expr.diff i ((𝕏[0].pow 2).add (𝕏[1].pow 2)))) → CAS.Verified.Expr.eval x.ofLp (Δₛ ((𝕏[0].pow 2).add (𝕏[1].pow 2))) = PDE.laplacian (fun y ↦ CAS.Verified.Expr.eval y.ofLp ((𝕏[0].pow 2).add (𝕏[1].pow 2))) x
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.closedLaplacian_eval_eq_laplacian
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
(x ^ 2 + y ^ 2)
#cas [integrate] #cas [integrate] Domain: x ∈ ℝ Input (scalar ℝ): (sin x) Output (scalar ℝ; antiderivative): -cos(x)
[CAS.Command.details] More details
  • Variables: x
  • [CAS.Command.computation] Checked antiderivative computation
    • [CAS.Command.computation] 1. Differentiate the proposed primitive
      • Raw derivative: -(-sin(x)*1)
    • [CAS.Command.computation] 2. Form the derivative residual
      • Raw residual: -(-sin(x)*1) - sin(x)
      • Definition: CAS.IntegrationCheck.residual
    • [CAS.Command.computation] 3. Check the residual normal form
      • Checked residual normal form: 0
      • Certificate condition: checked residual normal form = 0
    • [CAS.Command.computation] 4. Record analytic domain requirements
      • Certificate nonzero requirements (compacted): (none)
      • Certificate positivity requirements (compacted): (none)
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Integral of the input
        • Proposition: ∀ (a b : ℝ), ∫ (x : ℝ) in a..b, Real.sin x = -Real.cos b + Real.cos a
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.intervalIntegral_eq_sub_of_line
      • [CAS.explanation.checkedStep] Primitive derivative in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg).rawDerivative = CAS.Verified.Expr.diff 0 𝕏[0].cos.neg
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Primitive derivative in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Primitive derivative in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg)).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg)).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Primitive derivative in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^1), CAS.Verified.Expr.ValidAt x.ofLp 𝕏[0].cos.neg → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg)).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp 𝕏[0].cos.neg) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg)).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Residual route reaches zero
        • Proposition: (CAS.IntegrationCheck.route 0 𝕏[0].sin { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.candidate).rhs = 0
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.routeZero
      • [CAS.explanation.checkedStep] Symbolic antiderivative identity under the displayed requirements
        • Proposition: ∀ (x : ℝ^1), { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.requirements.Holds x.ofLp → CAS.Verified.Expr.eval x.ofLp (CAS.Verified.Expr.diff 0 { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.candidate) = CAS.Verified.Expr.eval x.ofLp 𝕏[0].sin
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.eval_diff_eq
      • [CAS.explanation.checkedStep] Coordinate-line derivative theorem
        • Proposition: ∀ (x : ℝ^1) (t : ℝ), { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.requirements.Holds (x.ofLp + t • (EuclideanSpace.single 0 1).ofLp) → HasDerivAt (fun s ↦ CAS.Verified.Expr.eval (x + s • EuclideanSpace.single 0 1).ofLp { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.candidate) (CAS.Verified.Expr.eval (x + t • EuclideanSpace.single 0 1).ofLp 𝕏[0].sin) t
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.hasDerivAt_eval_add_smul_single
      • [CAS.explanation.checkedStep] Coordinate-line fundamental theorem of calculus
        • Proposition: ∀ (x : ℝ^1) (a b : ℝ), (∀ t ∈ Set.uIcc a b, { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.requirements.Holds (x.ofLp + t • (EuclideanSpace.single 0 1).ofLp)) → ∫ (t : ℝ) in a..b, CAS.Verified.Expr.eval (x + t • EuclideanSpace.single 0 1).ofLp 𝕏[0].sin = CAS.Verified.Expr.eval (x + b • EuclideanSpace.single 0 1).ofLp { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.candidate - CAS.Verified.Expr.eval (x + a • EuclideanSpace.single 0 1).ofLp { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.candidate
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.intervalIntegral_eq_sub_eval_add_smul_single
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] direct: ordered-sparse-polynomial: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: pythagorean: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: algebra: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: pythagorean: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: algebra: attempted
        • checked
(sin x)
#cas [integrate x] #cas [integrate x] Domain: (x, y) ∈ ℝ^2 Input (scalar ℝ): (y * exp x) Output (scalar ℝ; antiderivative): y*exp(x)
[CAS.Command.details] More details
  • Variables: x, y
  • [CAS.Command.computation] Checked antiderivative computation
    • [CAS.Command.computation] 1. Differentiate the proposed primitive
      • Raw derivative: 0*exp(x) + y*exp(x)*1
    • [CAS.Command.computation] 2. Form the derivative residual
      • Raw residual: 0*exp(x) + y*exp(x)*1 - y*exp(x)
      • Definition: CAS.IntegrationCheck.residual
    • [CAS.Command.computation] 3. Check the residual normal form
      • Checked residual normal form: 0
      • Certificate condition: checked residual normal form = 0
    • [CAS.Command.computation] 4. Record analytic domain requirements
      • Certificate nonzero requirements (compacted): (none)
      • Certificate positivity requirements (compacted): (none)
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Integral of the input
        • Proposition: ∀ (y a b : ℝ), ∫ (x : ℝ) in a..b, y * Real.exp x = y * Real.exp b - y * Real.exp a
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.intervalIntegral_eq_sub_of_line
      • [CAS.explanation.checkedStep] Primitive derivative in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[1].mul 𝕏[0].exp)).rawDerivative = CAS.Verified.Expr.diff 0 (𝕏[1].mul 𝕏[0].exp)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Primitive derivative in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[1].mul 𝕏[0].exp)).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[1].mul 𝕏[0].exp)).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Primitive derivative in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[1].mul 𝕏[0].exp))).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[1].mul 𝕏[0].exp))).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[1].mul 𝕏[0].exp)).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Primitive derivative in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp (𝕏[1].mul 𝕏[0].exp) → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[1].mul 𝕏[0].exp))).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp (𝕏[1].mul 𝕏[0].exp)) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[1].mul 𝕏[0].exp))).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Residual route reaches zero
        • Proposition: (CAS.IntegrationCheck.route 0 (𝕏[1].mul 𝕏[0].exp) { candidate := 𝕏[1].mul 𝕏[0].exp, routeZero := ⋯ }.candidate).rhs = 0
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.routeZero
      • [CAS.explanation.checkedStep] Symbolic antiderivative identity under the displayed requirements
        • Proposition: ∀ (x : ℝ^2), { candidate := 𝕏[1].mul 𝕏[0].exp, routeZero := ⋯ }.requirements.Holds x.ofLp → CAS.Verified.Expr.eval x.ofLp (CAS.Verified.Expr.diff 0 { candidate := 𝕏[1].mul 𝕏[0].exp, routeZero := ⋯ }.candidate) = CAS.Verified.Expr.eval x.ofLp (𝕏[1].mul 𝕏[0].exp)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.eval_diff_eq
      • [CAS.explanation.checkedStep] Coordinate-line derivative theorem
        • Proposition: ∀ (x : ℝ^2) (t : ℝ), { candidate := 𝕏[1].mul 𝕏[0].exp, routeZero := ⋯ }.requirements.Holds (x.ofLp + t • (EuclideanSpace.single 0 1).ofLp) → HasDerivAt (fun s ↦ CAS.Verified.Expr.eval (x + s • EuclideanSpace.single 0 1).ofLp { candidate := 𝕏[1].mul 𝕏[0].exp, routeZero := ⋯ }.candidate) (CAS.Verified.Expr.eval (x + t • EuclideanSpace.single 0 1).ofLp (𝕏[1].mul 𝕏[0].exp)) t
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.hasDerivAt_eval_add_smul_single
      • [CAS.explanation.checkedStep] Coordinate-line fundamental theorem of calculus
        • Proposition: ∀ (x : ℝ^2) (a b : ℝ), (∀ t ∈ Set.uIcc a b, { candidate := 𝕏[1].mul 𝕏[0].exp, routeZero := ⋯ }.requirements.Holds (x.ofLp + t • (EuclideanSpace.single 0 1).ofLp)) → ∫ (t : ℝ) in a..b, CAS.Verified.Expr.eval (x + t • EuclideanSpace.single 0 1).ofLp (𝕏[1].mul 𝕏[0].exp) = CAS.Verified.Expr.eval (x + b • EuclideanSpace.single 0 1).ofLp { candidate := 𝕏[1].mul 𝕏[0].exp, routeZero := ⋯ }.candidate - CAS.Verified.Expr.eval (x + a • EuclideanSpace.single 0 1).ofLp { candidate := 𝕏[1].mul 𝕏[0].exp, routeZero := ⋯ }.candidate
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.intervalIntegral_eq_sub_eval_add_smul_single
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] direct: ordered-sparse-polynomial: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: pythagorean: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: algebra: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: pythagorean: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: algebra: attempted
        • checked
(y * exp x)
-- Certified ranges, with the upper, absolute and midpoint bounds read off them. #cas [enclose x in [-1 / 10, 1 / 10]] #cas [enclose x in [-1 / 10, 1 / 10]] Domain: x ∈ [-1/10, 1/10] ⊆ ℝ Input (scalar map ℝ → ℝ): (cos x) Output (certified interval in ℝ): [0.995004, 1] Upper bound: 1 Absolute bound: 1 Center and radius: ≈0.997502 ± 0.002498
[CAS.Command.details] More details
  • Coordinates: x
  • Certified domain: x ∈ [-1/10, 1/10] ⊆ ℝ
  • [CAS.Command.computation] 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: [338582372456999262606763096490687899987/340282366920938463463374607431768211456, 1]
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc (-1 / 10) (1 / 10), 0.995004 ≤ Real.cos x ∧ Real.cos x ≤ 1
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc (-1 / 10) (1 / 10), Real.cos x ≤ 1
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc (-1 / 10) (1 / 10), |Real.cos x| ≤ 1
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc (-1 / 10) (1 / 10), |Real.cos x - 0.997502| ≤ 1249 / 500000
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: CAS.Certificate.EnclosedOn (CAS.Exact.exprFn 𝕏[0].cos) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1 / 10) (1 / 10) ⋯].get coordinate) (↑338582372456999262606763096490687899987 / ↑340282366920938463463374607431768211456) (↑1 / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: CAS.Certificate.BoundOn (CAS.Exact.exprFn 𝕏[0].cos) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1 / 10) (1 / 10) ⋯].get coordinate) (↑1 / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: CAS.Certificate.BoundOn (fun x ↦ |CAS.Exact.exprFn 𝕏[0].cos x|) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1 / 10) (1 / 10) ⋯].get coordinate) (↑1 / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: CAS.Certificate.ApproxOn (CAS.Exact.exprFn 𝕏[0].cos) (fun x ↦ ↑678864739377937726070137703922456111443 / ↑680564733841876926926749214863536422912) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1 / 10) (1 / 10) ⋯].get coordinate) (↑1699994463939200856611510941080311469 / ↑680564733841876926926749214863536422912)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
(cos x)
#cas [enclose x in [0, 1]] #cas [enclose x in [0, 1]] Domain: x ∈ [0, 1] ⊆ ℝ Input (scalar map ℝ → ℝ): (x - 2) Output (certified interval in ℝ): [-2, -1] Upper bound: -1 Absolute bound: 2 Center and radius: -3/2 ± 1/2
[CAS.Command.details] More details
  • Coordinates: x
  • Certified domain: x ∈ [0, 1] ⊆ ℝ
  • [CAS.Command.computation] Certified numerical guarantee
    • Guarantee: the input lies in the output interval throughout the box
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, -2 ≤ x - 2 ∧ x - 2 ≤ -1
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, x - 2 ≤ -1
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, |x - 2| ≤ 2
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, |x - 2 + 3 / 2| ≤ 1 / 2
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: CAS.Certificate.EnclosedOn (CAS.Exact.exprFn (𝕏[0].sub (CAS.Verified.Expr.nat 2))) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑(-2) / ↑1) (↑(-1) / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: CAS.Certificate.BoundOn (CAS.Exact.exprFn (𝕏[0].sub (CAS.Verified.Expr.nat 2))) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑(-1) / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: CAS.Certificate.BoundOn (fun x ↦ |CAS.Exact.exprFn (𝕏[0].sub (CAS.Verified.Expr.nat 2)) x|) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑2 / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: CAS.Certificate.ApproxOn (CAS.Exact.exprFn (𝕏[0].sub (CAS.Verified.Expr.nat 2))) (fun x ↦ ↑(-3) / ↑2) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑1 / ↑2)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
(x - 2)
-- Refine an enclosure with a higher approximation degree or subdivision. #cas (prec := 40) [enclose x in [0, 1]] #cas (prec := 40) [enclose x in [0, 1]] Domain: x ∈ [0, 1] ⊆ ℝ Input (scalar map ℝ → ℝ): (exp x) Output (certified interval in ℝ): [1, 2.718282] Upper bound: 2.718282 Absolute bound: 2.718282 Center and radius: ≈1.859140 ± 0.859142
[CAS.Command.details] More details
  • Coordinates: x
  • Certified domain: x ∈ [0, 1] ⊆ ℝ
  • [CAS.Command.computation] 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
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, 1 ≤ Real.exp x ∧ Real.exp x ≤ 2.718282
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, Real.exp x ≤ 2.718282
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, |Real.exp x| ≤ 2.718282
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, |Real.exp x - 1.859140| ≤ 0.859142
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: CAS.Certificate.BoundOn (CAS.Exact.exprFn 𝕏[0].exp) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑115622921818277542143863879480417099385 / ↑42535295865117307932921825928971026432)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] exponential range: succeeded
(exp x)
#cas (depth := 3) [enclose x in [0, 2]] #cas (depth := 3) [enclose x in [0, 2]] Domain: x ∈ [0, 2] ⊆ ℝ Input (scalar map ℝ → ℝ): (sin x * cos x) Output (certified interval in ℝ): [-0.378402, 0.544012] Upper bound: 0.544012 Absolute bound: 0.544012 Center and radius: ≈0.082805 ± 0.461207
[CAS.Command.details] More details
  • Coordinates: x
  • Certified domain: x ∈ [0, 2] ⊆ ℝ
  • [CAS.Command.computation] 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
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc 0 2, -0.378402 ≤ Real.sin x * Real.cos x ∧ Real.sin x * Real.cos x ≤ 0.544012
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 2, Real.sin x * Real.cos x ≤ 0.544012
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 2, |Real.sin x * Real.cos x| ≤ 0.544012
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc 0 2, |Real.sin x * Real.cos x - 82805e-6| ≤ 0.461207
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] checked box subdivision: succeeded
        • used by 3 local enclosure routes
      • [CAS.explanation.plannerStep] increasing endpoint range: succeeded
        • used by 2 local enclosure routes
      • [CAS.explanation.plannerStep] centered mean-value form: succeeded
      • [CAS.explanation.plannerStep] decreasing endpoint range: succeeded
(sin x * cos x)

The partial derivative names its coordinate; grad and laplacian name an ordered list. The real-power calculation records the base-positivity condition. enclose reports both endpoints of a certified interval and reads three bounds off it: an upper bound, a magnitude bound, and a midpoint with its radius. Precision and subdivision settings are explained with the enclosure algorithms below.

Bare derive and bare integrate use a function's binder when given a unary lambda, or the sole free variable of a bare expression. Thus #cas [derive] (fun x : ℝ ↦ 2 * x) returns 2, and #cas [derive] (fun x ↦ a * x + b) returns a with a and b as parameters. The binder also allows constant bodies: #cas [integrate] (fun x ↦ 2) returns 2*x. A named coordinate must agree with the binder. Multiplication uses *, and these commands need no prior variable declarations or #eval.

Exact differentiation is finite-dimensional and supports any finite list of coordinates. The numerical enclose command accepts any finite list of named coordinates with exact rational interval endpoints. Every free variable must have a box binding. An optional configuration group before the mode bracket, (prec := n) or (depth := n), selects the precision policy described in the enclosure section; the command and the cega tactic accept it alike.

10.5.1. Choosing an Interface🔗

Most users should stay in ordinary Lean notation and choose an interface by what they are trying to do:

  • Use #cas [...] expression while exploring. It calculates and prints the inferred domain and result, registering auxiliary theorems for its proof evidence.

  • Use bare cas, or cas using h with a domain hypothesis, when an ordinary theorem goal should be closed by algebraic reasoning, checked differentiation, or a supported integral rule.

  • Use cas_nf to transform a supported real expression inside a larger goal or hypothesis, or inside a selected conv occurrence. The reflected Verified.Expr.eval interface remains available.

  • Use cega using certificate when a proof already has an enclosure, error, quadrature, or residual certificate and needs its sound theorem. Bare cega projects a matching checked certificate or infers a rational box from local hypotheses.

  • Use cega [enclose x in [a, b]] e when an EnclosedOn, BoundOn, or ApproxOn goal over an exact rational box, or an ordinary inequality in the box variables, should be closed by a fresh interval certificate; the goal selects the projection. Prefix (prec := n) or (depth := n) when the default policy is too coarse.

  • Use cas? or cega? when the same proof search should also explain the selected route in the InfoView.

  • Use bare cega for a numerical bound on an interval integral with a closed real integrand and rational limits. It accounts for the quadrature error as well as sample uncertainty.

  • Use the lower-level Verified.Expr and certificate constructors only when extending the engine or building a reusable verified algorithm.

10.5.2. Simplification🔗

The simplifier reifies the supported expression, computes an algebraic normal form, and accepts that form only through the normalization soundness theorem. For example,

-- Normalize only through the simplifier's -- soundness theorem. #cas [simplify] #cas [simplify] Domain: x ∈ ℝ Input (scalar ℝ): ((x + 0) * 1) Output (scalar ℝ): x
[CAS.Command.details] More details
  • Variables: x
  • [CAS.Command.computation] Checked symbolic computation
    • Raw checked nonzero requirements: (none)
    • Guarantee: these assumptions justify conditional rewrites and preserve real evaluation
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Identity with the simplified form
        • Proposition: ∀ (x : ℝ), (x + 0) * 1 = x
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.eq_of_simplifyFinDisplayRoute
      • [CAS.explanation.checkedStep] Simplification under generated rewrite assumptions
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ ((𝕏[0].add (CAS.Verified.Expr.nat 0)).mul (CAS.Verified.Expr.nat 1)).simplifyFinDisplayRoute.nonzero → CAS.Verified.Expr.eval ρ ((𝕏[0].add (CAS.Verified.Expr.nat 0)).mul (CAS.Verified.Expr.nat 1)).simplifyFinDisplayRoute.rhs = CAS.Verified.Expr.eval ρ ((𝕏[0].add (CAS.Verified.Expr.nat 0)).mul (CAS.Verified.Expr.nat 1)).simplifyFinDisplayRoute.lhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.SideClaimRoute.sound
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] pre-normalization: deep-factor-cancel: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] pre-normalization: inverse-elementary: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] pre-normalization: real-power: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] base normalization: structural: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: trig: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: algebra: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: factor-common: attempted
        • checked
      • [CAS.explanation.plannerStep] post-normalization: inverse-elementary: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: real-power: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: fraction-normal-form: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: rational-side: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-square: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-numeral: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-product-collect: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: common-add-factor: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: deep-factor-cancel: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: unit-ratio: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] direct: univariate-rational-canonical: attempted
        • side-conditioned
((x + 0) * 1)

prints the compact calculation

Expand...
#cas [simplify]
Domain: x ∈ ℝ
Input (scalar ℝ): ((x + 0) * 1)
Output (scalar ℝ): x

[CAS.Command.details] More details
  • Variables: x
  • [CAS.Command.computation] Checked symbolic computation
    • Raw checked nonzero requirements: (none)
    • Guarantee: these assumptions justify conditional rewrites and preserve real evaluation
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Identity with the simplified form
        • Proposition: ∀ (x : ℝ), (x + 0) * 1 = x
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.eq_of_simplifyFinDisplayRoute
      • [CAS.explanation.checkedStep] Simplification under generated rewrite assumptions
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ ((𝕏[0].add (CAS.Verified.Expr.nat 0)).mul (CAS.Verified.Expr.nat 1)).simplifyFinDisplayRoute.nonzero → CAS.Verified.Expr.eval ρ ((𝕏[0].add (CAS.Verified.Expr.nat 0)).mul (CAS.Verified.Expr.nat 1)).simplifyFinDisplayRoute.rhs = CAS.Verified.Expr.eval ρ ((𝕏[0].add (CAS.Verified.Expr.nat 0)).mul (CAS.Verified.Expr.nat 1)).simplifyFinDisplayRoute.lhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.SideClaimRoute.sound
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] pre-normalization: deep-factor-cancel: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] pre-normalization: inverse-elementary: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] pre-normalization: real-power: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] base normalization: structural: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: trig: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: algebra: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: factor-common: attempted
        • checked
      • [CAS.explanation.plannerStep] post-normalization: inverse-elementary: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: real-power: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: fraction-normal-form: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: rational-side: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-square: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-numeral: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-product-collect: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: common-add-factor: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: deep-factor-cancel: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: unit-ratio: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] direct: univariate-rational-canonical: attempted
        • side-conditioned

The algorithm recursively normalizes subexpressions and applies the exact algebraic route appropriate to the reflected fragment. Division, logarithms, and square roots carry side conditions; normalization does not cancel a denominator or cross a branch condition without evidence.

The normal form knows the algebra of real powers and of the exponential, which it treats as a power of \mathrm e: inside a product or quotient all powers of one base collect into a single power, nested powers flatten, powers of products distribute, exponents are normalized, and a literal exponent is read back as a natural power, a reciprocal, or a square root. Each rewrite that Mathlib states for a positive base records that positivity as a condition:

-- Powers of one base collect; the base must be positive. #cas [simplify] #cas [simplify] Domain: (a, s, t) ∈ ℝ^3 Input (scalar ℝ): (a ^ (s / 2) * a ^ ((t - s) / 2) - a ^ (t / 2)) Output (scalar ℝ): 0 Conditions: a > 0
[CAS.Command.details] More details
  • Variables: a, s, t
  • [CAS.Command.computation] Checked symbolic computation
    • Raw checked nonzero requirements: sqrt(a)
    • Guarantee: these assumptions justify conditional rewrites and preserve real evaluation
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Identity with the simplified form
        • Proposition: ∀ (a s t : ℝ), 0 < a → a ^ (s / 2) * a ^ ((t - s) / 2) - a ^ (t / 2) = 0
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.eq_of_simplifyFinDisplayRoute
      • [CAS.explanation.checkedStep] Simplification under generated rewrite assumptions
        • Proposition: ∀ (ρ : Fin 3 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (((𝕏[0].rpow (𝕏[1].div (CAS.Verified.Expr.nat 2))).mul (𝕏[0].rpow ((𝕏[2].sub 𝕏[1]).div (CAS.Verified.Expr.nat 2)))).sub (𝕏[0].rpow (𝕏[2].div (CAS.Verified.Expr.nat 2)))).simplifyFinDisplayRoute.nonzero → CAS.Verified.Expr.eval ρ (((𝕏[0].rpow (𝕏[1].div (CAS.Verified.Expr.nat 2))).mul (𝕏[0].rpow ((𝕏[2].sub 𝕏[1]).div (CAS.Verified.Expr.nat 2)))).sub (𝕏[0].rpow (𝕏[2].div (CAS.Verified.Expr.nat 2)))).simplifyFinDisplayRoute.rhs = CAS.Verified.Expr.eval ρ (((𝕏[0].rpow (𝕏[1].div (CAS.Verified.Expr.nat 2))).mul (𝕏[0].rpow ((𝕏[2].sub 𝕏[1]).div (CAS.Verified.Expr.nat 2)))).sub (𝕏[0].rpow (𝕏[2].div (CAS.Verified.Expr.nat 2)))).simplifyFinDisplayRoute.lhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.SideClaimRoute.sound
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] pre-normalization: deep-factor-cancel: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] pre-normalization: inverse-elementary: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] pre-normalization: real-power: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] base normalization: structural: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: trig: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: algebra: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: factor-common: attempted
        • checked
      • [CAS.explanation.plannerStep] post-normalization: inverse-elementary: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: real-power: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: fraction-normal-form: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: rational-side: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-square: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-numeral: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-product-collect: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: common-add-factor: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: deep-factor-cancel: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: unit-ratio: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] direct: rational-canonical: attempted
        • side-conditioned
(a ^ (s / 2) * a ^ ((t - s) / 2) - a ^ (t / 2))
Expand...
#cas [simplify]
Domain: (a, s, t) ∈ ℝ^3
Input (scalar ℝ): (a ^ (s / 2) * a ^ ((t - s) / 2) - a ^ (t / 2))
Output (scalar ℝ): 0
Conditions: a > 0

[CAS.Command.details] More details
  • Variables: a, s, t
  • [CAS.Command.computation] Checked symbolic computation
    • Raw checked nonzero requirements: sqrt(a)
    • Guarantee: these assumptions justify conditional rewrites and preserve real evaluation
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Identity with the simplified form
        • Proposition: ∀ (a s t : ℝ), 0 < a → a ^ (s / 2) * a ^ ((t - s) / 2) - a ^ (t / 2) = 0
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.eq_of_simplifyFinDisplayRoute
      • [CAS.explanation.checkedStep] Simplification under generated rewrite assumptions
        • Proposition: ∀ (ρ : Fin 3 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (((𝕏[0].rpow (𝕏[1].div (CAS.Verified.Expr.nat 2))).mul (𝕏[0].rpow ((𝕏[2].sub 𝕏[1]).div (CAS.Verified.Expr.nat 2)))).sub (𝕏[0].rpow (𝕏[2].div (CAS.Verified.Expr.nat 2)))).simplifyFinDisplayRoute.nonzero → CAS.Verified.Expr.eval ρ (((𝕏[0].rpow (𝕏[1].div (CAS.Verified.Expr.nat 2))).mul (𝕏[0].rpow ((𝕏[2].sub 𝕏[1]).div (CAS.Verified.Expr.nat 2)))).sub (𝕏[0].rpow (𝕏[2].div (CAS.Verified.Expr.nat 2)))).simplifyFinDisplayRoute.rhs = CAS.Verified.Expr.eval ρ (((𝕏[0].rpow (𝕏[1].div (CAS.Verified.Expr.nat 2))).mul (𝕏[0].rpow ((𝕏[2].sub 𝕏[1]).div (CAS.Verified.Expr.nat 2)))).sub (𝕏[0].rpow (𝕏[2].div (CAS.Verified.Expr.nat 2)))).simplifyFinDisplayRoute.lhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.SideClaimRoute.sound
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] pre-normalization: deep-factor-cancel: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] pre-normalization: inverse-elementary: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] pre-normalization: real-power: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] base normalization: structural: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: trig: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: algebra: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: factor-common: attempted
        • checked
      • [CAS.explanation.plannerStep] post-normalization: inverse-elementary: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: real-power: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: fraction-normal-form: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: rational-side: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-square: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-numeral: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-product-collect: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: common-add-factor: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: deep-factor-cancel: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: unit-ratio: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] direct: rational-canonical: attempted
        • side-conditioned

Identities that hold for Mathlib's total Real.rpow, such as x^{(2:\mathbb R)}=x^2, and the exponential identities \exp a\,\exp b=\exp(a+b) and (\exp u)^2=\exp(2u), record no condition at all.

10.5.3. Differentiation, Gradients, and Laplacians🔗

Consider the scalar function f(x,y)=\sin(xy). To differentiate only in the first coordinate, write:

-- Differentiate in x; y remains a parameter. #cas [derive x] #cas [derive x] Domain: (x, y) ∈ ℝ^2 Input (scalar ℝ): (sin (x * y)) Output (scalar ℝ): cos(x*y)*y
[CAS.Command.details] More details
  • Variables: x, y
  • [CAS.Command.computation] Analytic domain conditions
    • Raw checked nonzero requirements: (none)
    • Raw checked positivity requirements: (none)
  • [CAS.Command.computation] Partial derivative in x
    • [CAS.Command.computation] 1. Apply symbolic differentiation rules
      • raw result: cos(x*y)*(1*y + x*0)
    • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
      • normalized result: cos(x*y)*y
    • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
      • displayed result: cos(x*y)*y
      • additional nonzero requirements: (none)
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Derivative of the input
        • Proposition: ∀ (x y : ℝ), HasDerivAt (fun x ↦ Real.sin (x * y)) (Real.cos (x * y) * y) x
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.hasDerivAt_of_displayRoute
      • [CAS.explanation.checkedStep] Partial derivative in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).rawDerivative = CAS.Verified.Expr.diff 0 (𝕏[0].mul 𝕏[1]).sin
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Partial derivative in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Partial derivative in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Partial derivative in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp (𝕏[0].mul 𝕏[1]).sin → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp (𝕏[0].mul 𝕏[1]).sin) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
(sin (x * y))

The compact report says:

Expand...
#cas [derive x]
Domain: (x, y) ∈ ℝ^2
Input (scalar ℝ): (sin (x * y))
Output (scalar ℝ): cos(x*y)*y

[CAS.Command.details] More details
  • Variables: x, y
  • [CAS.Command.computation] Analytic domain conditions
    • Raw checked nonzero requirements: (none)
    • Raw checked positivity requirements: (none)
  • [CAS.Command.computation] Partial derivative in x
    • [CAS.Command.computation] 1. Apply symbolic differentiation rules
      • raw result: cos(x*y)*(1*y + x*0)
    • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
      • normalized result: cos(x*y)*y
    • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
      • displayed result: cos(x*y)*y
      • additional nonzero requirements: (none)
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Derivative of the input
        • Proposition: ∀ (x y : ℝ), HasDerivAt (fun x ↦ Real.sin (x * y)) (Real.cos (x * y) * y) x
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.hasDerivAt_of_displayRoute
      • [CAS.explanation.checkedStep] Partial derivative in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).rawDerivative = CAS.Verified.Expr.diff 0 (𝕏[0].mul 𝕏[1]).sin
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Partial derivative in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Partial derivative in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Partial derivative in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp (𝕏[0].mul 𝕏[1]).sin → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp (𝕏[0].mul 𝕏[1]).sin) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)

The domain line identifies the ordered real coordinate space inferred from the free variables. The input and output lines identify scalar-valued expressions; the output is the partial derivative \partial_x f, not the full derivative of a one-variable function. With set_option cas.verbose true, More details also shows the sine chain rule, the product rule for xy, the raw expression \cos(xy)(1\cdot y+x\cdot0), and the checked normalization to \cos(xy)y.

For the full gradient, name its coordinates and their order:

-- The written variable order fixes the -- output coordinate order. #cas [grad x, y] #cas [grad x, y] Domain: (x, y) ∈ ℝ^2 Input (scalar ℝ): (sin (x * y)) Output (vector ℝ^2; order x, y): (cos(x*y)*y, cos(x*y)*x)
[CAS.Command.details] More details
  • Variables and component order: x, y
  • [CAS.Command.computation] Analytic domain conditions
    • Raw checked nonzero requirements: (none)
    • Raw checked positivity requirements: (none)
  • [CAS.Command.computation] Checked gradient computation
    • [CAS.Command.computation] Gradient component ∂_x
      • Output: cos(x*y)*y
      • [CAS.Command.computation] Partial derivative in x
        • [CAS.Command.computation] 1. Apply symbolic differentiation rules
          • raw result: cos(x*y)*(1*y + x*0)
        • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
          • normalized result: cos(x*y)*y
        • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
          • displayed result: cos(x*y)*y
          • additional nonzero requirements: (none)
    • [CAS.Command.computation] Gradient component ∂_y
      • Output: cos(x*y)*x
      • [CAS.Command.computation] Partial derivative in y
        • [CAS.Command.computation] 1. Apply symbolic differentiation rules
          • raw result: cos(x*y)*(0*y + x*1)
        • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
          • normalized result: cos(x*y)*x
        • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
          • displayed result: cos(x*y)*x
          • additional nonzero requirements: (none)
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Gradient of the input
        • Proposition: ∀ (x y : ℝ), HasGradientAt (fun p ↦ Real.sin (p.ofLp 0 * p.ofLp 1)) !₂[Real.cos (x * y) * y, Real.cos (x * y) * x] !₂[x, y]
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.hasGradientAt_of_closedGradient
      • [CAS.explanation.checkedStep] Gradient component ∂_x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).rawDerivative = CAS.Verified.Expr.diff 0 (𝕏[0].mul 𝕏[1]).sin
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Gradient component ∂_x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Gradient component ∂_x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Gradient component ∂_x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp (𝕏[0].mul 𝕏[1]).sin → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp (𝕏[0].mul 𝕏[1]).sin) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Gradient component ∂_y: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin).rawDerivative = CAS.Verified.Expr.diff 1 (𝕏[0].mul 𝕏[1]).sin
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Gradient component ∂_y: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Gradient component ∂_y: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin)).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin)).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Gradient component ∂_y: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp (𝕏[0].mul 𝕏[1]).sin → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin)).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp (𝕏[0].mul 𝕏[1]).sin) x) (EuclideanSpace.single 1 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin)).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Analytic gradient assembly
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp (𝕏[0].mul 𝕏[1]).sin → (WithLp.toLp 2 fun i ↦ CAS.Verified.Expr.eval x.ofLp ((∇ₛ (𝕏[0].mul 𝕏[1]).sin) i)) = gradient (fun y ↦ CAS.Verified.Expr.eval y.ofLp (𝕏[0].mul 𝕏[1]).sin) x
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.closedGradient_eval_eq_gradient
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
(sin (x * y))

The result is

Expand...
#cas [grad x, y]
Domain: (x, y) ∈ ℝ^2
Input (scalar ℝ): (sin (x * y))
Output (vector ℝ^2; order x, y): (cos(x*y)*y, cos(x*y)*x)

[CAS.Command.details] More details
  • Variables and component order: x, y
  • [CAS.Command.computation] Analytic domain conditions
    • Raw checked nonzero requirements: (none)
    • Raw checked positivity requirements: (none)
  • [CAS.Command.computation] Checked gradient computation
    • [CAS.Command.computation] Gradient component ∂_x
      • Output: cos(x*y)*y
      • [CAS.Command.computation] Partial derivative in x
        • [CAS.Command.computation] 1. Apply symbolic differentiation rules
          • raw result: cos(x*y)*(1*y + x*0)
        • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
          • normalized result: cos(x*y)*y
        • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
          • displayed result: cos(x*y)*y
          • additional nonzero requirements: (none)
    • [CAS.Command.computation] Gradient component ∂_y
      • Output: cos(x*y)*x
      • [CAS.Command.computation] Partial derivative in y
        • [CAS.Command.computation] 1. Apply symbolic differentiation rules
          • raw result: cos(x*y)*(0*y + x*1)
        • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
          • normalized result: cos(x*y)*x
        • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
          • displayed result: cos(x*y)*x
          • additional nonzero requirements: (none)
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Gradient of the input
        • Proposition: ∀ (x y : ℝ), HasGradientAt (fun p ↦ Real.sin (p.ofLp 0 * p.ofLp 1)) !₂[Real.cos (x * y) * y, Real.cos (x * y) * x] !₂[x, y]
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.hasGradientAt_of_closedGradient
      • [CAS.explanation.checkedStep] Gradient component ∂_x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).rawDerivative = CAS.Verified.Expr.diff 0 (𝕏[0].mul 𝕏[1]).sin
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Gradient component ∂_x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Gradient component ∂_x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Gradient component ∂_x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp (𝕏[0].mul 𝕏[1]).sin → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp (𝕏[0].mul 𝕏[1]).sin) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].mul 𝕏[1]).sin)).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Gradient component ∂_y: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin).rawDerivative = CAS.Verified.Expr.diff 1 (𝕏[0].mul 𝕏[1]).sin
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Gradient component ∂_y: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Gradient component ∂_y: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin)).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin)).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Gradient component ∂_y: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp (𝕏[0].mul 𝕏[1]).sin → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin)).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp (𝕏[0].mul 𝕏[1]).sin) x) (EuclideanSpace.single 1 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 (𝕏[0].mul 𝕏[1]).sin)).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Analytic gradient assembly
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp (𝕏[0].mul 𝕏[1]).sin → (WithLp.toLp 2 fun i ↦ CAS.Verified.Expr.eval x.ofLp ((∇ₛ (𝕏[0].mul 𝕏[1]).sin) i)) = gradient (fun y ↦ CAS.Verified.Expr.eval y.ofLp (𝕏[0].mul 𝕏[1]).sin) x
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.closedGradient_eval_eq_gradient
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)

Thus grad x, y means (\partial_x f,\partial_y f). Writing grad y, x requests the same two partials in the opposite output order. This explicit convention avoids guessing whether a multivariable derive request meant one coordinate or an entire gradient.

The Laplacian computes each diagonal second partial and sums the results:

-- Sum the diagonal second derivatives in x and y. #cas [laplacian x, y] #cas [laplacian x, y] Domain: (x, y) ∈ ℝ^2 Input (scalar ℝ): (x ^ 2 + y ^ 2) Output (scalar ℝ): 4
[CAS.Command.details] More details
  • Variables: x, y
  • [CAS.Command.computation] Analytic domain conditions
    • Raw checked nonzero requirements: (none)
    • Raw checked positivity requirements: (none)
  • [CAS.Command.computation] Checked coordinate computations
    • [CAS.Command.computation] Second partial ∂_x∂_x
      • [CAS.Command.computation] Partial derivative in x
        • [CAS.Command.computation] 1. Apply symbolic differentiation rules
          • raw result: 2*x^1*1 + 2*y^1*0
        • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
          • normalized result: 2*x
        • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
          • displayed result: 2*x
          • additional nonzero requirements: (none)
      • [CAS.Command.computation] Partial derivative in x
        • [CAS.Command.computation] 1. Apply symbolic differentiation rules
          • raw result: (0*x^1 + 2*1*x^0*1)*1 + 2*x^1*0 + (0*y^1 + 2*1*y^0*0)*0 + 2*y^1*0
        • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
          • normalized result: 2
        • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
          • displayed result: 2
          • additional nonzero requirements: (none)
      • summand: 2
    • [CAS.Command.computation] Second partial ∂_y∂_y
      • [CAS.Command.computation] Partial derivative in y
        • [CAS.Command.computation] 1. Apply symbolic differentiation rules
          • raw result: 2*x^1*0 + 2*y^1*1
        • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
          • normalized result: 2*y
        • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
          • displayed result: 2*y
          • additional nonzero requirements: (none)
      • [CAS.Command.computation] Partial derivative in y
        • [CAS.Command.computation] 1. Apply symbolic differentiation rules
          • raw result: (0*x^1 + 2*1*x^0*0)*0 + 2*x^1*0 + (0*y^1 + 2*1*y^0*1)*1 + 2*y^1*0
        • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
          • normalized result: 2
        • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
          • displayed result: 2
          • additional nonzero requirements: (none)
      • summand: 2
  • [CAS.Command.computation] Sum and normalize the diagonal second partials
    • Summands: 2, 2
    • Normalized sum: 4
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] First partial in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).rawDerivative = CAS.Verified.Expr.diff 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2))
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] First partial in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] First partial in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] First partial in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp ((𝕏[0].pow 2).add (𝕏[1].pow 2)) → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp ((𝕏[0].pow 2).add (𝕏[1].pow 2))) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Second partial in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0)))).rawDerivative = CAS.Verified.Expr.diff 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0)))
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Second partial in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0)))).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0)))).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Second partial in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0))))).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0))))).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0)))).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Second partial in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0))) → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0))))).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0)))) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0))))).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] First partial in y: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).rawDerivative = CAS.Verified.Expr.diff 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2))
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] First partial in y: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] First partial in y: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] First partial in y: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp ((𝕏[0].pow 2).add (𝕏[1].pow 2)) → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp ((𝕏[0].pow 2).add (𝕏[1].pow 2))) x) (EuclideanSpace.single 1 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Second partial in y: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1)))).rawDerivative = CAS.Verified.Expr.diff 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1)))
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Second partial in y: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1)))).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1)))).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Second partial in y: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1))))).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1))))).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1)))).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Second partial in y: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1))) → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1))))).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1)))) x) (EuclideanSpace.single 1 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1))))).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Analytic Laplacian assembly
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp ((𝕏[0].pow 2).add (𝕏[1].pow 2)) → (∀ (i : Fin 2), CAS.Verified.Expr.ValidAt x.ofLp (CAS.Verified.Expr.diff i ((𝕏[0].pow 2).add (𝕏[1].pow 2)))) → CAS.Verified.Expr.eval x.ofLp (Δₛ ((𝕏[0].pow 2).add (𝕏[1].pow 2))) = PDE.laplacian (fun y ↦ CAS.Verified.Expr.eval y.ofLp ((𝕏[0].pow 2).add (𝕏[1].pow 2))) x
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.closedLaplacian_eval_eq_laplacian
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
(x ^ 2 + y ^ 2)
Expand...
#cas [laplacian x, y]
Domain: (x, y) ∈ ℝ^2
Input (scalar ℝ): (x ^ 2 + y ^ 2)
Output (scalar ℝ): 4

[CAS.Command.details] More details
  • Variables: x, y
  • [CAS.Command.computation] Analytic domain conditions
    • Raw checked nonzero requirements: (none)
    • Raw checked positivity requirements: (none)
  • [CAS.Command.computation] Checked coordinate computations
    • [CAS.Command.computation] Second partial ∂_x∂_x
      • [CAS.Command.computation] Partial derivative in x
        • [CAS.Command.computation] 1. Apply symbolic differentiation rules
          • raw result: 2*x^1*1 + 2*y^1*0
        • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
          • normalized result: 2*x
        • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
          • displayed result: 2*x
          • additional nonzero requirements: (none)
      • [CAS.Command.computation] Partial derivative in x
        • [CAS.Command.computation] 1. Apply symbolic differentiation rules
          • raw result: (0*x^1 + 2*1*x^0*1)*1 + 2*x^1*0 + (0*y^1 + 2*1*y^0*0)*0 + 2*y^1*0
        • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
          • normalized result: 2
        • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
          • displayed result: 2
          • additional nonzero requirements: (none)
      • summand: 2
    • [CAS.Command.computation] Second partial ∂_y∂_y
      • [CAS.Command.computation] Partial derivative in y
        • [CAS.Command.computation] 1. Apply symbolic differentiation rules
          • raw result: 2*x^1*0 + 2*y^1*1
        • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
          • normalized result: 2*y
        • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
          • displayed result: 2*y
          • additional nonzero requirements: (none)
      • [CAS.Command.computation] Partial derivative in y
        • [CAS.Command.computation] 1. Apply symbolic differentiation rules
          • raw result: (0*x^1 + 2*1*x^0*0)*0 + 2*x^1*0 + (0*y^1 + 2*1*y^0*1)*1 + 2*y^1*0
        • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
          • normalized result: 2
        • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
          • displayed result: 2
          • additional nonzero requirements: (none)
      • summand: 2
  • [CAS.Command.computation] Sum and normalize the diagonal second partials
    • Summands: 2, 2
    • Normalized sum: 4
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] First partial in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).rawDerivative = CAS.Verified.Expr.diff 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2))
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] First partial in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] First partial in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] First partial in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp ((𝕏[0].pow 2).add (𝕏[1].pow 2)) → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp ((𝕏[0].pow 2).add (𝕏[1].pow 2))) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Second partial in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0)))).rawDerivative = CAS.Verified.Expr.diff 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0)))
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Second partial in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0)))).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0)))).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Second partial in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0))))).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0))))).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0)))).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Second partial in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0))) → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0))))).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0)))) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 1)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 0))))).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] First partial in y: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).rawDerivative = CAS.Verified.Expr.diff 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2))
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] First partial in y: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] First partial in y: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2))).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] First partial in y: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp ((𝕏[0].pow 2).add (𝕏[1].pow 2)) → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp ((𝕏[0].pow 2).add (𝕏[1].pow 2))) x) (EuclideanSpace.single 1 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((𝕏[0].pow 2).add (𝕏[1].pow 2)))).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Second partial in y: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1)))).rawDerivative = CAS.Verified.Expr.diff 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1)))
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Second partial in y: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1)))).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1)))).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Second partial in y: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 2 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1))))).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1))))).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1)))).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Second partial in y: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1))) → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1))))).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1)))) x) (EuclideanSpace.single 1 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 1 ((((CAS.Verified.Expr.nat 2).mul (𝕏[0].pow 1)).mul (CAS.Verified.Expr.nat 0)).add (((CAS.Verified.Expr.nat 2).mul (𝕏[1].pow 1)).mul (CAS.Verified.Expr.nat 1))))).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Analytic Laplacian assembly
        • Proposition: ∀ (x : ℝ^2), CAS.Verified.Expr.ValidAt x.ofLp ((𝕏[0].pow 2).add (𝕏[1].pow 2)) → (∀ (i : Fin 2), CAS.Verified.Expr.ValidAt x.ofLp (CAS.Verified.Expr.diff i ((𝕏[0].pow 2).add (𝕏[1].pow 2)))) → CAS.Verified.Expr.eval x.ofLp (Δₛ ((𝕏[0].pow 2).add (𝕏[1].pow 2))) = PDE.laplacian (fun y ↦ CAS.Verified.Expr.eval y.ofLp ((𝕏[0].pow 2).add (𝕏[1].pow 2))) x
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.closedLaplacian_eval_eq_laplacian
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)

The final bridge theorem identifies the assembled reflected expression with Mathlib's analytic gradient or the analytic Laplacian defined in the foundations chapter.

A real power is differentiated by the rule behind Mathlib's HasDerivAt.rpow, and the report records the positivity of the base:

-- A real exponent; the base must be positive. #cas [derive x] #cas [derive x] Domain: x ∈ ℝ Input (scalar ℝ): (x ^ (3 / 2 : ℝ)) Output (scalar ℝ): 3/2*sqrt(x) Conditions: x > 0
[CAS.Command.details] More details
  • Variables: x
  • [CAS.Command.computation] Analytic domain conditions
    • Raw checked nonzero requirements: 2
    • Raw checked positivity requirements: x
  • [CAS.Command.computation] Partial derivative in x
    • [CAS.Command.computation] 1. Apply symbolic differentiation rules
      • raw result: 1*3/2*x^(3/2 - 1) + (0*2 - 3*0)/2^2*x^(3/2)*log(x)
    • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
      • normalized result: 3/2*x^(1/2)
    • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
      • displayed result: 3/2*sqrt(x)
      • additional nonzero requirements: (none)
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Derivative of the input
        • Proposition: ∀ (x : ℝ), 0 < x → HasDerivAt (fun x ↦ x ^ (3 / 2 : ℝ)) (3 / 2 * √x) x
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.hasDerivAt_of_displayRoute
      • [CAS.explanation.checkedStep] Partial derivative in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2)))).rawDerivative = CAS.Verified.Expr.diff 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2)))
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Partial derivative in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2)))).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2)))).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Partial derivative in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2))))).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2))))).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2)))).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Partial derivative in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^1), CAS.Verified.Expr.ValidAt x.ofLp (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2))) → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2))))).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2)))) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2))))).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] pre-normalization: deep-factor-cancel: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] pre-normalization: inverse-elementary: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] pre-normalization: real-power: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] base normalization: structural: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: trig: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: algebra: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: factor-common: attempted
        • checked
      • [CAS.explanation.plannerStep] post-normalization: inverse-elementary: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: real-power: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: fraction-normal-form: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: rational-side: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-square: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-numeral: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: pythagorean: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-product-collect: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: common-add-factor: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: deep-factor-cancel: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: unit-ratio: attempted
        • side-conditioned
(x ^ (3 / 2 : ℝ))
Expand...
#cas [derive x]
Domain: x ∈ ℝ
Input (scalar ℝ): (x ^ (3 / 2 : ℝ))
Output (scalar ℝ): 3/2*sqrt(x)
Conditions: x > 0

[CAS.Command.details] More details
  • Variables: x
  • [CAS.Command.computation] Analytic domain conditions
    • Raw checked nonzero requirements: 2
    • Raw checked positivity requirements: x
  • [CAS.Command.computation] Partial derivative in x
    • [CAS.Command.computation] 1. Apply symbolic differentiation rules
      • raw result: 1*3/2*x^(3/2 - 1) + (0*2 - 3*0)/2^2*x^(3/2)*log(x)
    • [CAS.Command.computation] 2. Normalize the symbolic derivative unconditionally
      • normalized result: 3/2*x^(1/2)
    • [CAS.Command.computation] 3. Apply checked side-conditioned cleanup
      • displayed result: 3/2*sqrt(x)
      • additional nonzero requirements: (none)
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Derivative of the input
        • Proposition: ∀ (x : ℝ), 0 < x → HasDerivAt (fun x ↦ x ^ (3 / 2 : ℝ)) (3 / 2 * √x) x
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.hasDerivAt_of_displayRoute
      • [CAS.explanation.checkedStep] Partial derivative in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2)))).rawDerivative = CAS.Verified.Expr.diff 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2)))
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Partial derivative in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2)))).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2)))).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Partial derivative in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2))))).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2))))).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2)))).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Partial derivative in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^1), CAS.Verified.Expr.ValidAt x.ofLp (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2))) → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2))))).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2)))) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 (𝕏[0].rpow ((CAS.Verified.Expr.nat 3).div (CAS.Verified.Expr.nat 2))))).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] pre-normalization: deep-factor-cancel: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] pre-normalization: inverse-elementary: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] pre-normalization: real-power: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] base normalization: structural: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: trig: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: algebra: attempted
        • checked
      • [CAS.explanation.plannerStep] base normalization: factor-common: attempted
        • checked
      • [CAS.explanation.plannerStep] post-normalization: inverse-elementary: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: real-power: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: fraction-normal-form: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: rational-side: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-square: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-numeral: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: pythagorean: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: sqrt-product-collect: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: common-add-factor: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: deep-factor-cancel: attempted
        • side-conditioned
      • [CAS.explanation.plannerStep] post-normalization: unit-ratio: attempted
        • side-conditioned

The raw derivative is \tfrac32\,x^{3/2-1}; the normal form reads the literal exponent 1/2 back as a square root. A symbolic exponent stays a real power, so #cas [derive x] (x ^ y) reports y\,x^{y-1} under the same condition.

The theorem tactic can also differentiate functions outside the calculator's real-expression grammar. Mathlib supplies the arithmetic and chain rules; derivative families in the local context supply the function-specific step:

example (f f' : ℝ → ℝ) (hf : ∀ x, HasDerivAt f (f' x) x) (x : ℝ) : deriv (fun t ↦ f (t ^ 2) + f t) x = f' (x ^ 2) * (2 * x) + f' x := f:ℝ → ℝf':ℝ → ℝhf:∀ (x : ℝ), HasDerivAt f (f' x) xx:ℝ⊢ deriv (fun t ↦ f (t ^ 2) + f t) x = f' (x ^ 2) * (2 * x) + f' x All goals completed! 🐙

A theorem tagged @[cas_deriv] makes its derivative rule available to subsequent calls. The rule's premises still have to be proved. This route also handles complex scalar calculus:

example (z : ℂ) : HasDerivAt (fun w : ℂ ↦ Complex.exp (w ^ 2)) (2 * z * Complex.exp (z ^ 2)) z := z:ℂ⊢ HasDerivAt (fun w ↦ Complex.exp (w ^ 2)) (2 * z * Complex.exp (z ^ 2)) z All goals completed! 🐙

10.5.4. Checked Antiderivatives🔗

The integration command searches for a primitive and then verifies it:

-- Search for a primitive, then verify it -- by differentiation. #cas [integrate] #cas [integrate] Domain: x ∈ ℝ Input (scalar ℝ): (sin x) Output (scalar ℝ; antiderivative): -cos(x)
[CAS.Command.details] More details
  • Variables: x
  • [CAS.Command.computation] Checked antiderivative computation
    • [CAS.Command.computation] 1. Differentiate the proposed primitive
      • Raw derivative: -(-sin(x)*1)
    • [CAS.Command.computation] 2. Form the derivative residual
      • Raw residual: -(-sin(x)*1) - sin(x)
      • Definition: CAS.IntegrationCheck.residual
    • [CAS.Command.computation] 3. Check the residual normal form
      • Checked residual normal form: 0
      • Certificate condition: checked residual normal form = 0
    • [CAS.Command.computation] 4. Record analytic domain requirements
      • Certificate nonzero requirements (compacted): (none)
      • Certificate positivity requirements (compacted): (none)
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Integral of the input
        • Proposition: ∀ (a b : ℝ), ∫ (x : ℝ) in a..b, Real.sin x = -Real.cos b + Real.cos a
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.intervalIntegral_eq_sub_of_line
      • [CAS.explanation.checkedStep] Primitive derivative in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg).rawDerivative = CAS.Verified.Expr.diff 0 𝕏[0].cos.neg
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Primitive derivative in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Primitive derivative in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg)).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg)).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Primitive derivative in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^1), CAS.Verified.Expr.ValidAt x.ofLp 𝕏[0].cos.neg → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg)).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp 𝕏[0].cos.neg) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg)).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Residual route reaches zero
        • Proposition: (CAS.IntegrationCheck.route 0 𝕏[0].sin { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.candidate).rhs = 0
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.routeZero
      • [CAS.explanation.checkedStep] Symbolic antiderivative identity under the displayed requirements
        • Proposition: ∀ (x : ℝ^1), { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.requirements.Holds x.ofLp → CAS.Verified.Expr.eval x.ofLp (CAS.Verified.Expr.diff 0 { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.candidate) = CAS.Verified.Expr.eval x.ofLp 𝕏[0].sin
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.eval_diff_eq
      • [CAS.explanation.checkedStep] Coordinate-line derivative theorem
        • Proposition: ∀ (x : ℝ^1) (t : ℝ), { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.requirements.Holds (x.ofLp + t • (EuclideanSpace.single 0 1).ofLp) → HasDerivAt (fun s ↦ CAS.Verified.Expr.eval (x + s • EuclideanSpace.single 0 1).ofLp { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.candidate) (CAS.Verified.Expr.eval (x + t • EuclideanSpace.single 0 1).ofLp 𝕏[0].sin) t
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.hasDerivAt_eval_add_smul_single
      • [CAS.explanation.checkedStep] Coordinate-line fundamental theorem of calculus
        • Proposition: ∀ (x : ℝ^1) (a b : ℝ), (∀ t ∈ Set.uIcc a b, { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.requirements.Holds (x.ofLp + t • (EuclideanSpace.single 0 1).ofLp)) → ∫ (t : ℝ) in a..b, CAS.Verified.Expr.eval (x + t • EuclideanSpace.single 0 1).ofLp 𝕏[0].sin = CAS.Verified.Expr.eval (x + b • EuclideanSpace.single 0 1).ofLp { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.candidate - CAS.Verified.Expr.eval (x + a • EuclideanSpace.single 0 1).ofLp { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.candidate
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.intervalIntegral_eq_sub_eval_add_smul_single
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] direct: ordered-sparse-polynomial: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: pythagorean: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: algebra: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: pythagorean: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: algebra: attempted
        • checked
(sin x)

Its compact report is:

Expand...
#cas [integrate]
Domain: x ∈ ℝ
Input (scalar ℝ): (sin x)
Output (scalar ℝ; antiderivative): -cos(x)

[CAS.Command.details] More details
  • Variables: x
  • [CAS.Command.computation] Checked antiderivative computation
    • [CAS.Command.computation] 1. Differentiate the proposed primitive
      • Raw derivative: -(-sin(x)*1)
    • [CAS.Command.computation] 2. Form the derivative residual
      • Raw residual: -(-sin(x)*1) - sin(x)
      • Definition: CAS.IntegrationCheck.residual
    • [CAS.Command.computation] 3. Check the residual normal form
      • Checked residual normal form: 0
      • Certificate condition: checked residual normal form = 0
    • [CAS.Command.computation] 4. Record analytic domain requirements
      • Certificate nonzero requirements (compacted): (none)
      • Certificate positivity requirements (compacted): (none)
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Integral of the input
        • Proposition: ∀ (a b : ℝ), ∫ (x : ℝ) in a..b, Real.sin x = -Real.cos b + Real.cos a
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.intervalIntegral_eq_sub_of_line
      • [CAS.explanation.checkedStep] Primitive derivative in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg).rawDerivative = CAS.Verified.Expr.diff 0 𝕏[0].cos.neg
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Primitive derivative in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Primitive derivative in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg)).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg)).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Primitive derivative in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^1), CAS.Verified.Expr.ValidAt x.ofLp 𝕏[0].cos.neg → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg)).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp 𝕏[0].cos.neg) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].cos.neg)).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Residual route reaches zero
        • Proposition: (CAS.IntegrationCheck.route 0 𝕏[0].sin { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.candidate).rhs = 0
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.routeZero
      • [CAS.explanation.checkedStep] Symbolic antiderivative identity under the displayed requirements
        • Proposition: ∀ (x : ℝ^1), { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.requirements.Holds x.ofLp → CAS.Verified.Expr.eval x.ofLp (CAS.Verified.Expr.diff 0 { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.candidate) = CAS.Verified.Expr.eval x.ofLp 𝕏[0].sin
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.eval_diff_eq
      • [CAS.explanation.checkedStep] Coordinate-line derivative theorem
        • Proposition: ∀ (x : ℝ^1) (t : ℝ), { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.requirements.Holds (x.ofLp + t • (EuclideanSpace.single 0 1).ofLp) → HasDerivAt (fun s ↦ CAS.Verified.Expr.eval (x + s • EuclideanSpace.single 0 1).ofLp { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.candidate) (CAS.Verified.Expr.eval (x + t • EuclideanSpace.single 0 1).ofLp 𝕏[0].sin) t
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.hasDerivAt_eval_add_smul_single
      • [CAS.explanation.checkedStep] Coordinate-line fundamental theorem of calculus
        • Proposition: ∀ (x : ℝ^1) (a b : ℝ), (∀ t ∈ Set.uIcc a b, { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.requirements.Holds (x.ofLp + t • (EuclideanSpace.single 0 1).ofLp)) → ∫ (t : ℝ) in a..b, CAS.Verified.Expr.eval (x + t • EuclideanSpace.single 0 1).ofLp 𝕏[0].sin = CAS.Verified.Expr.eval (x + b • EuclideanSpace.single 0 1).ofLp { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.candidate - CAS.Verified.Expr.eval (x + a • EuclideanSpace.single 0 1).ofLp { candidate := 𝕏[0].cos.neg, routeZero := ⋯ }.candidate
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.intervalIntegral_eq_sub_eval_add_smul_single
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] direct: ordered-sparse-polynomial: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: pythagorean: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: algebra: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: pythagorean: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: algebra: attempted
        • checked

The detailed calculation has four mathematical stages:

  1. differentiate the proposed primitive using the indexed symbolic rules;

  2. subtract the original integrand to form a residual;

  3. prove that the residual normalizes to zero;

  4. retain every nonzero or positivity requirement needed by the analytic derivative theorem.

For this example there are no side conditions. An accepted antiderivative certificate supplies both a pointwise derivative identity and its coordinate-line fundamental theorem of calculus consequence. The ordinary tactic chooses how to prove the stated goal. The elementary HasDerivAt branch checks the function already in the goal. An interval-integral equality can provide a primitive through its endpoint expression, or leave the bounded planner to find one. These are separate tactic calls:

-- Check the stated function's derivative. example (x : ℝ) : HasDerivAt (fun t : ℝ ↦ -Real.cos t) (Real.sin x) x := x:ℝ⊢ HasDerivAt (fun t ↦ -Real.cos t) (Real.sin x) x All goals completed! 🐙 -- Search for a primitive and apply the fundamental theorem of calculus. example (a b : ℝ) : (∫ t in a..b, Real.sin t) = Real.cos a - Real.cos b := a:ℝb:ℝ⊢ ∫ (t : ℝ) in a..b, Real.sin t = Real.cos a - Real.cos b All goals completed! 🐙

Substitution can reuse the integration methods rather than guess another formula. For f(x)=\log(x)/x, choose u=\log x. Dividing by u'=1/x leaves u, whose integral is u^2/2. Substituting back gives (\log x)^2/2; differentiation certifies the result wherever x\ne0. The same step works for a rational function of an exponential:

#cas [integrate] #cas [integrate] Domain: x ∈ ℝ Input (scalar ℝ): log x / x Output (scalar ℝ; antiderivative): 1/2*log(x)^2 Conditions: x ≠ 0
[CAS.Command.details] More details
  • Variables: x
  • [CAS.Command.computation] Checked antiderivative computation
    • [CAS.Command.computation] 1. Differentiate the proposed primitive
      • Raw derivative: 0*log(x)^2 + 1/2*2*log(x)^1*1/x
    • [CAS.Command.computation] 2. Form the derivative residual
      • Raw residual: 0*log(x)^2 + 1/2*2*log(x)^1*1/x - log(x)/x
      • Definition: CAS.IntegrationCheck.residual
    • [CAS.Command.computation] 3. Check the residual normal form
      • Checked residual normal form: 0
      • Certificate condition: checked residual normal form = 0
    • [CAS.Command.computation] 4. Record analytic domain requirements
      • Certificate nonzero requirements (compacted): x
      • Certificate positivity requirements (compacted): (none)
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Integral of the input
        • Proposition: ∀ (a b : ℝ), (∀ x ∈ Set.uIcc a b, x ≠ 0) → ∫ (x : ℝ) in a..b, Real.log x / x = 1 / 2 * Real.log b ^ 2 - 1 / 2 * Real.log a ^ 2
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.intervalIntegral_eq_sub_of_line
      • [CAS.explanation.checkedStep] Primitive derivative in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 ((CAS.Verified.Expr.rat 1 2).mul (𝕏[0].log.pow 2))).rawDerivative = CAS.Verified.Expr.diff 0 ((CAS.Verified.Expr.rat 1 2).mul (𝕏[0].log.pow 2))
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Primitive derivative in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((CAS.Verified.Expr.rat 1 2).mul (𝕏[0].log.pow 2))).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((CAS.Verified.Expr.rat 1 2).mul (𝕏[0].log.pow 2))).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Primitive derivative in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((CAS.Verified.Expr.rat 1 2).mul (𝕏[0].log.pow 2)))).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((CAS.Verified.Expr.rat 1 2).mul (𝕏[0].log.pow 2)))).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 ((CAS.Verified.Expr.rat 1 2).mul (𝕏[0].log.pow 2))).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Primitive derivative in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^1), CAS.Verified.Expr.ValidAt x.ofLp ((CAS.Verified.Expr.rat 1 2).mul (𝕏[0].log.pow 2)) → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((CAS.Verified.Expr.rat 1 2).mul (𝕏[0].log.pow 2)))).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp ((CAS.Verified.Expr.rat 1 2).mul (𝕏[0].log.pow 2))) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 ((CAS.Verified.Expr.rat 1 2).mul (𝕏[0].log.pow 2)))).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Residual route reaches zero
        • Proposition: (CAS.IntegrationCheck.route 0 (𝕏[0].log.div 𝕏[0]) { candidate := (CAS.Verified.Expr.rat 1 2).mul (𝕏[0].log.pow 2), routeZero := ⋯ }.candidate).rhs = 0
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.routeZero
      • [CAS.explanation.checkedStep] Symbolic antiderivative identity under the displayed requirements
        • Proposition: ∀ (x : ℝ^1), { candidate := (CAS.Verified.Expr.rat 1 2).mul (𝕏[0].log.pow 2), routeZero := ⋯ }.requirements.Holds x.ofLp → CAS.Verified.Expr.eval x.ofLp (CAS.Verified.Expr.diff 0 { candidate := (CAS.Verified.Expr.rat 1 2).mul (𝕏[0].log.pow 2), routeZero := ⋯ }.candidate) = CAS.Verified.Expr.eval x.ofLp (𝕏[0].log.div 𝕏[0])
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.eval_diff_eq
      • [CAS.explanation.checkedStep] Coordinate-line derivative theorem
        • Proposition: ∀ (x : ℝ^1) (t : ℝ), { candidate := (CAS.Verified.Expr.rat 1 2).mul (𝕏[0].log.pow 2), routeZero := ⋯ }.requirements.Holds (x.ofLp + t • (EuclideanSpace.single 0 1).ofLp) → HasDerivAt (fun s ↦ CAS.Verified.Expr.eval (x + s • EuclideanSpace.single 0 1).ofLp { candidate := (CAS.Verified.Expr.rat 1 2).mul (𝕏[0].log.pow 2), routeZero := ⋯ }.candidate) (CAS.Verified.Expr.eval (x + t • EuclideanSpace.single 0 1).ofLp (𝕏[0].log.div 𝕏[0])) t
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.hasDerivAt_eval_add_smul_single
      • [CAS.explanation.checkedStep] Coordinate-line fundamental theorem of calculus
        • Proposition: ∀ (x : ℝ^1) (a b : ℝ), (∀ t ∈ Set.uIcc a b, { candidate := (CAS.Verified.Expr.rat 1 2).mul (𝕏[0].log.pow 2), routeZero := ⋯ }.requirements.Holds (x.ofLp + t • (EuclideanSpace.single 0 1).ofLp)) → ∫ (t : ℝ) in a..b, CAS.Verified.Expr.eval (x + t • EuclideanSpace.single 0 1).ofLp (𝕏[0].log.div 𝕏[0]) = CAS.Verified.Expr.eval (x + b • EuclideanSpace.single 0 1).ofLp { candidate := (CAS.Verified.Expr.rat 1 2).mul (𝕏[0].log.pow 2), routeZero := ⋯ }.candidate - CAS.Verified.Expr.eval (x + a • EuclideanSpace.single 0 1).ofLp { candidate := (CAS.Verified.Expr.rat 1 2).mul (𝕏[0].log.pow 2), routeZero := ⋯ }.candidate
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.intervalIntegral_eq_sub_eval_add_smul_single
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] direct: ordered-sparse-polynomial: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: pythagorean: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: algebra: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: pythagorean: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: algebra: attempted
        • checked
(fun x ↦ log x / x)
#cas [integrate] #cas [integrate] Domain: x ∈ ℝ Input (scalar ℝ): exp x / (1 + (exp x) ^ 2) Output (scalar ℝ; antiderivative): atan(exp(x))
[CAS.Command.details] More details
  • Variables: x
  • [CAS.Command.computation] Checked antiderivative computation
    • [CAS.Command.computation] 1. Differentiate the proposed primitive
      • Raw derivative: exp(x)*1/(1 + exp(x)^2)
    • [CAS.Command.computation] 2. Form the derivative residual
      • Raw residual: exp(x)*1/(1 + exp(x)^2) - exp(x)/(1 + exp(x)^2)
      • Definition: CAS.IntegrationCheck.residual
    • [CAS.Command.computation] 3. Check the residual normal form
      • Checked residual normal form: 0
      • Certificate condition: checked residual normal form = 0
    • [CAS.Command.computation] 4. Record analytic domain requirements
      • Certificate nonzero requirements (compacted): 1 + exp(2*x)
      • Certificate positivity requirements (compacted): (none)
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Integral of the input
        • Proposition: ∀ (a b : ℝ), ∫ (x : ℝ) in a..b, Real.exp x / (1 + Real.exp x ^ 2) = Real.arctan (Real.exp b) - Real.arctan (Real.exp a)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.intervalIntegral_eq_sub_of_line
      • [CAS.explanation.checkedStep] Primitive derivative in x: indexed rules compute Expr.diff
        • Proposition: (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].exp.atan).rawDerivative = CAS.Verified.Expr.diff 0 𝕏[0].exp.atan
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.rawDerivative_eq_diff
      • [CAS.explanation.checkedStep] Primitive derivative in x: normalization preserves evaluation
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].exp.atan).simplifiedDerivative = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].exp.atan).rawDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Verified.Expr.DiffDerivation.eval_simplifiedDerivative_eq_rawDerivative
      • [CAS.explanation.checkedStep] Primitive derivative in x: side-conditioned display normalization
        • Proposition: ∀ (ρ : Fin 1 → ℝ), CAS.Verified.Expr.Alg.SideHolds ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].exp.atan)).nonzero → CAS.Verified.Expr.eval ρ (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].exp.atan)).rhs = CAS.Verified.Expr.eval ρ (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].exp.atan).simplifiedDerivative
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.displayDerivativeRoute_sound
      • [CAS.explanation.checkedStep] Primitive derivative in x: analytic semantics of the displayed result
        • Proposition: ∀ (x : ℝ^1), CAS.Verified.Expr.ValidAt x.ofLp 𝕏[0].exp.atan → CAS.Verified.Expr.Alg.SideHolds x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].exp.atan)).nonzero → (fderiv ℝ (fun y ↦ CAS.Verified.Expr.eval y.ofLp 𝕏[0].exp.atan) x) (EuclideanSpace.single 0 1) = CAS.Verified.Expr.eval x.ofLp (CAS.Command.displayDerivativeRoute (CAS.Verified.Expr.DiffDerivation.build 0 𝕏[0].exp.atan)).rhs
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Command.fderiv_apply_single_eq_eval_displayDerivative
      • [CAS.explanation.checkedStep] Residual route reaches zero
        • Proposition: (CAS.IntegrationCheck.route 0 (𝕏[0].exp.div ((CAS.Verified.Expr.nat 1).add (𝕏[0].exp.pow 2))) { candidate := 𝕏[0].exp.atan, routeZero := ⋯ }.candidate).rhs = 0
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.routeZero
      • [CAS.explanation.checkedStep] Symbolic antiderivative identity under the displayed requirements
        • Proposition: ∀ (x : ℝ^1), { candidate := 𝕏[0].exp.atan, routeZero := ⋯ }.requirements.Holds x.ofLp → CAS.Verified.Expr.eval x.ofLp (CAS.Verified.Expr.diff 0 { candidate := 𝕏[0].exp.atan, routeZero := ⋯ }.candidate) = CAS.Verified.Expr.eval x.ofLp (𝕏[0].exp.div ((CAS.Verified.Expr.nat 1).add (𝕏[0].exp.pow 2)))
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.eval_diff_eq
      • [CAS.explanation.checkedStep] Coordinate-line derivative theorem
        • Proposition: ∀ (x : ℝ^1) (t : ℝ), { candidate := 𝕏[0].exp.atan, routeZero := ⋯ }.requirements.Holds (x.ofLp + t • (EuclideanSpace.single 0 1).ofLp) → HasDerivAt (fun s ↦ CAS.Verified.Expr.eval (x + s • EuclideanSpace.single 0 1).ofLp { candidate := 𝕏[0].exp.atan, routeZero := ⋯ }.candidate) (CAS.Verified.Expr.eval (x + t • EuclideanSpace.single 0 1).ofLp (𝕏[0].exp.div ((CAS.Verified.Expr.nat 1).add (𝕏[0].exp.pow 2)))) t
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.hasDerivAt_eval_add_smul_single
      • [CAS.explanation.checkedStep] Coordinate-line fundamental theorem of calculus
        • Proposition: ∀ (x : ℝ^1) (a b : ℝ), (∀ t ∈ Set.uIcc a b, { candidate := 𝕏[0].exp.atan, routeZero := ⋯ }.requirements.Holds (x.ofLp + t • (EuclideanSpace.single 0 1).ofLp)) → ∫ (t : ℝ) in a..b, CAS.Verified.Expr.eval (x + t • EuclideanSpace.single 0 1).ofLp (𝕏[0].exp.div ((CAS.Verified.Expr.nat 1).add (𝕏[0].exp.pow 2))) = CAS.Verified.Expr.eval (x + b • EuclideanSpace.single 0 1).ofLp { candidate := 𝕏[0].exp.atan, routeZero := ⋯ }.candidate - CAS.Verified.Expr.eval (x + a • EuclideanSpace.single 0 1).ofLp { candidate := 𝕏[0].exp.atan, routeZero := ⋯ }.candidate
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.IntegrationCheck.AntiderivativeCert.intervalIntegral_eq_sub_eval_add_smul_single
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] direct: ordered-sparse-polynomial: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: pythagorean: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: algebra: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: pythagorean: attempted
        • checked
      • [CAS.explanation.plannerStep] direct: algebra: attempted
        • checked
(fun x ↦ exp x / (1 + (exp x) ^ 2))

For the second expression, u=\exp x gives 1/(1+u^2), so the primitive is \arctan(\exp x). Other variables remain coefficients. The rational calculation (a x+b)/(1+x^2) has primitive a\log(1+x^2)/2+b\arctan x, without assigning values to a and b. Mixed sine–cosine powers first use \sin^2 x+\cos^2 x=1. Rational expressions in a common affine trigonometric phase can use the tangent half-angle substitution; its primitive may require a restricted interval to avoid a branch singularity.

The search runs in compiled code, and the kernel checks the proposed primitive against the original integrand. A division introduced during discovery does not, by itself, become a hypothesis: for 2x\cos(x^2), the primitive \sin(x^2) is valid at x=0 as well.

Suppose the requested endpoint difference is F b - F a. When its two terms exhibit a common function, the tactic can try that function as a primitive. It differentiates the candidate and checks the residual against the original integrand. An unsuccessful automatic candidate leaves bounded search available. A function supplied with cas [integrate primitive := F] is a different contract: that candidate must pass, including the interval requirements and the final endpoint equality.

For example, Real.log t ^ 2 / 2 is a useful proposed primitive for Real.log t / t. Its use requires that every point of Set.uIcc a b avoid zero. The interval includes both endpoints and works in either orientation. Adding a constant to the primitive leaves its endpoint difference unchanged; adding a constant to the requested integral value changes the proposition that must be proved. Candidate selection cannot excuse that mismatch.

The integration engine is deliberately incomplete. It searches a bounded collection of polynomial, rational, substitution, integration-by-parts, exponential, trigonometric, logarithmic, and quadratic-terminal patterns. Finding a candidate is not enough: failure of the residual check or any required side condition makes the tactic fail without changing the goal.

10.5.5. Numerical Integration🔗

An exact primitive is often unnecessary for a numerical estimate. The Gaussian integral \int_0^1 e^{-x^2}\,dx, for example, can be bounded directly:

example : |(∫ x in (0 : ℝ)..1, Real.exp (-x ^ 2)) - 746824 / 1000000| ≤ 1 / 1000000 := ⊢ |(∫ (x : ℝ) in 0..1, Real.exp (-x ^ 2)) - 746824 / 1000000| ≤ 1 / 1000000 All goals completed! 🐙

On a panel [a,b], Simpson's approximation is

S=\frac{b-a}{6}\left(f(a)+4f\left(\frac{a+b}{2}\right)+f(b)\right).

If f is four times continuously differentiable there and |f^{(4)}|\leq M, then |\int_a^b f-S|\leq M(b-a)^5/2880. CEGA bounds the fourth derivative and each of the three sample values. It adds the sample uncertainty and the analytic remainder to obtain an interval containing the integral, then adds the intervals from adjacent panels. Compiled code doubles the number of panels from one until the stated bound holds and then chooses the leanest working precision for the elementary function enclosures; (panels := n) fixes the panel count and (digits := d) the precision. Both errors are included in the proved bound.

At a corner or a nonsmooth endpoint, Simpson's hypotheses may fail even though the integral exists. If continuity can be proved, the tactic can instead bound the range on each panel: l\leq f\leq u implies (b-a)l\leq\int_a^b f\leq(b-a)u. This route applies to \sqrt{x} at zero and to |x| across zero, though its bounds can require more subdivision. The automatic frontend requires a closed real expression and rational limits. Failure to prove the requested accuracy is not a claim that the integral does not exist.

10.5.6. Certified Numerical Enclosures🔗

The numerical command

-- Enclose every value on the interval, -- rather than sampling points. set_option linter.hashCommand false in #cas [enclose x in [-1 / 10, 1 / 10]] #cas [enclose x in [-1 / 10, 1 / 10]] Domain: x ∈ [-1/10, 1/10] ⊆ ℝ Input (scalar map ℝ → ℝ): (cos x) Output (certified interval in ℝ): [0.995004, 1] Upper bound: 1 Absolute bound: 1 Center and radius: ≈0.997502 ± 0.002498
[CAS.Command.details] More details
  • Coordinates: x
  • Certified domain: x ∈ [-1/10, 1/10] ⊆ ℝ
  • [CAS.Command.computation] 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: [338582372456999262606763096490687899987/340282366920938463463374607431768211456, 1]
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc (-1 / 10) (1 / 10), 0.995004 ≤ Real.cos x ∧ Real.cos x ≤ 1
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc (-1 / 10) (1 / 10), Real.cos x ≤ 1
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc (-1 / 10) (1 / 10), |Real.cos x| ≤ 1
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc (-1 / 10) (1 / 10), |Real.cos x - 0.997502| ≤ 1249 / 500000
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: CAS.Certificate.EnclosedOn (CAS.Exact.exprFn 𝕏[0].cos) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1 / 10) (1 / 10) ⋯].get coordinate) (↑338582372456999262606763096490687899987 / ↑340282366920938463463374607431768211456) (↑1 / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: CAS.Certificate.BoundOn (CAS.Exact.exprFn 𝕏[0].cos) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1 / 10) (1 / 10) ⋯].get coordinate) (↑1 / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: CAS.Certificate.BoundOn (fun x ↦ |CAS.Exact.exprFn 𝕏[0].cos x|) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1 / 10) (1 / 10) ⋯].get coordinate) (↑1 / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: CAS.Certificate.ApproxOn (CAS.Exact.exprFn 𝕏[0].cos) (fun x ↦ ↑678864739377937726070137703922456111443 / ↑680564733841876926926749214863536422912) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1 / 10) (1 / 10) ⋯].get coordinate) (↑1699994463939200856611510941080311469 / ↑680564733841876926926749214863536422912)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
(cos x)

returns

Expand...
#cas [enclose x in [-1 / 10, 1 / 10]]
Domain: x ∈ [-1/10, 1/10] ⊆ ℝ
Input (scalar map ℝ → ℝ): (cos x)
Output (certified interval in ℝ): [0.995004, 1]
Upper bound: 1
Absolute bound: 1
Center and radius: ≈0.997502 ± 0.002498

[CAS.Command.details] More details
  • Coordinates: x
  • Certified domain: x ∈ [-1/10, 1/10] ⊆ ℝ
  • [CAS.Command.computation] 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: [338582372456999262606763096490687899987/340282366920938463463374607431768211456, 1]
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc (-1 / 10) (1 / 10), 0.995004 ≤ Real.cos x ∧ Real.cos x ≤ 1
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc (-1 / 10) (1 / 10), Real.cos x ≤ 1
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc (-1 / 10) (1 / 10), |Real.cos x| ≤ 1
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc (-1 / 10) (1 / 10), |Real.cos x - 0.997502| ≤ 1249 / 500000
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: CAS.Certificate.EnclosedOn (CAS.Exact.exprFn 𝕏[0].cos) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1 / 10) (1 / 10) ⋯].get coordinate) (↑338582372456999262606763096490687899987 / ↑340282366920938463463374607431768211456) (↑1 / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: CAS.Certificate.BoundOn (CAS.Exact.exprFn 𝕏[0].cos) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1 / 10) (1 / 10) ⋯].get coordinate) (↑1 / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: CAS.Certificate.BoundOn (fun x ↦ |CAS.Exact.exprFn 𝕏[0].cos x|) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1 / 10) (1 / 10) ⋯].get coordinate) (↑1 / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: CAS.Certificate.ApproxOn (CAS.Exact.exprFn 𝕏[0].cos) (fun x ↦ ↑678864739377937726070137703922456111443 / ↑680564733841876926926749214863536422912) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1 / 10) (1 / 10) ⋯].get coordinate) (↑1699994463939200856611510941080311469 / ↑680564733841876926926749214863536422912)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)

The output bounds every value of cosine throughout the input interval. The decimal preview rounds outward; the certificate retains exact rational endpoints. It also implies the coarser bound

\frac{716402999}{720000000}\leq\cos x\leq 1 \qquad\text{for every }x\in\left[-\frac1{10},\frac1{10}\right].

one evaluationthe input taken wholex-2-1012-2-1012[−2, 2]a coarse enclosurethe range, [−0.5, 0.5]subdividedthe union over the piecesx-2-1012-2-10124 pieces: [-1, 1]8 pieces: [-0.8, 0.8]16 pieces: [-0.64, 0.64]32 pieces: [-0.567, 0.567]1\text{ box: }[-2,2]\qquad 32\text{ boxes: }[-0.567, 0.567]and the range is [−0.5, 0.5]
What interval arithmetic overestimates, and what subdivision buys. The function \(f(x)=x/(1+x^2)\) on \([-2,2]\) has exact range \([-1/2,1/2]\), attained at \(x=-1\) and \(x=1\). Left: one interval evaluation gives \([0,4]\) for the square, \([1,5]\) for the denominator, and \([-2,2]\) for the quotient, four times the height of the true range. The slack comes from treating the two occurrences of \(x\) independently. Right: subdivide the input, evaluate each piece, and take the union. At four, eight, sixteen, and thirty-two pieces, the enclosing hull tightens from \([-1,1]\) to \([-0.567,0.567]\), always containing the dashed range. These interval operations use exact rational arithmetic; printed decimal endpoints are rounded outwards. Subdivision reduces dependency error here at the cost of more evaluations. A checked CAS enclosure additionally supplies a proof connecting the arithmetic bounds to every value of the original expression on its domain.

The figure uses a rational function to show why a valid enclosure can still be loose. Interval arithmetic treats repeated occurrences of the variable independently, losing the relation between numerator and denominator. Subdivision restricts that loss on each smaller panel. The cosine query has the same obligation: its bounds must contain every value between the endpoints, however the evaluator finds them. The figure illustrates the mechanism; the displayed theorem is the guarantee for the cosine calculation.

For a concrete example of that dependence loss, consider f(x)=x^2/(1+x^2) on [-1,1]. Write z=x^2, so 0\leq z\leq1. Bounding numerator and denominator separately gives [0,1]/[1,2]=[0,1]. To obtain the sharper upper bound, retain their common z. Since 1+z>0,

\frac{z}{1+z}\leq\frac12 \quad\Longleftrightarrow\quad 2z\leq1+z \quad\Longleftrightarrow\quad z\leq1.

Together with nonnegativity this proves f(x)\in[0,1/2], with equality at x=\pm1. A valid interval can be wider than the actual range; a failed request for a tighter interval need not mean that the requested bound is false. It may require a different representation or subdivision.

Returning to cosine, the coarser enclosure can be stated as an ordinary theorem about the one-dimensional Euclidean space and closed by cega:

open CAS.Certificate in example : EnclosedOn (fun p : ℝ^1 ↦ Real.cos (p 0)) {p | -1/10 ≤ p 0 ∧ p 0 ≤ 1/10} (716402999/720000000) 1 := ⊢ EnclosedOn (fun p ↦ Real.cos (p.ofLp 0)) {p | -1 / 10 ≤ p.ofLp 0 ∧ p.ofLp 0 ≤ 1 / 10} (716402999 / 720000000) 1 All goals completed! 🐙

The rational interval computation supplies the candidate endpoints. The theorem-facing finite-box API exposes the same guarantee through CAS.CEGA.encloseBox? and the returned attempt's EnclosureAttempt.sound; the more general encloseOn? API accepts an arbitrary semantic domain with a proved interval environment. A theorem can later consume the resulting certificate without knowing which interval algorithm produced it.

-- Import the certificate vocabulary used -- by the theorem statement. open CAS.Certificate -- CEGA exposes the certificate's stored soundness theorem. example (domain : Set ℝ) (certificate : EnclosureCert ℝ domain) : EnclosedOn certificate.fn domain certificate.lo certificate.hi := domain:Set ℝcertificate:EnclosureCert ℝ domain⊢ EnclosedOn certificate.fn domain certificate.lo certificate.hi All goals completed! 🐙

Those endpoints are exact rationals. The proposition bounds a real-valued function, while the endpoint arithmetic uses rational numbers. The certificate connects that arithmetic to the function. Endpoint representations and checking costs are discussed in the Zulip threads Interval arithmetic -- what approach? and LeanCert. Here subdivision and an explicit precision option control how much work the enclosure calculation performs.

The same box computation also proves the other numerical claims. Below the certified interval the report gives an upper bound, a bound on the magnitude, and the midpoint of the interval with its radius as a uniform error:

-- One certified interval and the bounds -- read off it. set_option linter.hashCommand false in #cas [enclose x in [0, 1]] #cas [enclose x in [0, 1]] Domain: x ∈ [0, 1] ⊆ ℝ Input (scalar map ℝ → ℝ): (x - 2) Output (certified interval in ℝ): [-2, -1] Upper bound: -1 Absolute bound: 2 Center and radius: -3/2 ± 1/2
[CAS.Command.details] More details
  • Coordinates: x
  • Certified domain: x ∈ [0, 1] ⊆ ℝ
  • [CAS.Command.computation] Certified numerical guarantee
    • Guarantee: the input lies in the output interval throughout the box
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, -2 ≤ x - 2 ∧ x - 2 ≤ -1
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, x - 2 ≤ -1
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, |x - 2| ≤ 2
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, |x - 2 + 3 / 2| ≤ 1 / 2
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: EnclosedOn (CAS.Exact.exprFn (𝕏[0].sub (CAS.Verified.Expr.nat 2))) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑(-2) / ↑1) (↑(-1) / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: BoundOn (CAS.Exact.exprFn (𝕏[0].sub (CAS.Verified.Expr.nat 2))) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑(-1) / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: BoundOn (fun x ↦ |CAS.Exact.exprFn (𝕏[0].sub (CAS.Verified.Expr.nat 2)) x|) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑2 / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: ApproxOn (CAS.Exact.exprFn (𝕏[0].sub (CAS.Verified.Expr.nat 2))) (fun x ↦ ↑(-3) / ↑2) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑1 / ↑2)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
(x - 2)
Expand...
#cas [enclose x in [0, 1]]
Domain: x ∈ [0, 1] ⊆ ℝ
Input (scalar map ℝ → ℝ): (x - 2)
Output (certified interval in ℝ): [-2, -1]
Upper bound: -1
Absolute bound: 2
Center and radius: -3/2 ± 1/2

[CAS.Command.details] More details
  • Coordinates: x
  • Certified domain: x ∈ [0, 1] ⊆ ℝ
  • [CAS.Command.computation] Certified numerical guarantee
    • Guarantee: the input lies in the output interval throughout the box
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, -2 ≤ x - 2 ∧ x - 2 ≤ -1
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, x - 2 ≤ -1
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, |x - 2| ≤ 2
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, |x - 2 + 3 / 2| ≤ 1 / 2
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: EnclosedOn (CAS.Exact.exprFn (𝕏[0].sub (CAS.Verified.Expr.nat 2))) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑(-2) / ↑1) (↑(-1) / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: BoundOn (CAS.Exact.exprFn (𝕏[0].sub (CAS.Verified.Expr.nat 2))) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑(-1) / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: BoundOn (fun x ↦ |CAS.Exact.exprFn (𝕏[0].sub (CAS.Verified.Expr.nat 2)) x|) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑2 / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: ApproxOn (CAS.Exact.exprFn (𝕏[0].sub (CAS.Verified.Expr.nat 2))) (fun x ↦ ↑(-3) / ↑2) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑1 / ↑2)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)

10.5.7. Sharper Enclosures and the Precision Option🔗

Four mechanisms help sharpen a certified range. Products and argument reduction improve interval evaluation; derivative enclosures and precision choices provide further ways to tighten it. The planner compares available routes, and every accepted enclosure carries its own soundness proof.

Products. Interval multiplication is the exact four-corner product: for x\in[a,b] and y\in[c,d] the product lies in the hull of ac, ad, bc, and bd. For xy on [-1,2]\times[2,3] a symmetric magnitude bound would give [-6,6]; the four corners give the sharp range.

-- Two coordinates, one exact product. set_option linter.hashCommand false in #cas [enclose x in [-1, 2], y in [2, 3]] #cas [enclose x in [-1, 2], y in [2, 3]] Domain: x ∈ [-1, 2], y ∈ [2, 3] ⊆ ℝ^2 Input (scalar map ℝ^2 → ℝ): (x * y) Output (certified interval in ℝ): [-3, 6] Upper bound: 6 Absolute bound: 6 Center and radius: 3/2 ± 9/2
[CAS.Command.details] More details
  • Coordinates: x, y
  • Certified domain: x ∈ [-1, 2], y ∈ [2, 3] ⊆ ℝ^2
  • [CAS.Command.computation] Certified numerical guarantee
    • Guarantee: the input lies in the output interval throughout the box
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc (-1) 2, ∀ y ∈ Set.Icc 2 3, -3 ≤ x * y ∧ x * y ≤ 6
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc (-1) 2, ∀ y ∈ Set.Icc 2 3, x * y ≤ 6
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc (-1) 2, ∀ y ∈ Set.Icc 2 3, |x * y| ≤ 6
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc (-1) 2, ∀ y ∈ Set.Icc 2 3, |x * y - 3 / 2| ≤ 9 / 2
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: EnclosedOn (CAS.Exact.exprFn (𝕏[0].mul 𝕏[1])) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1) 2 ⋯, CAS.Continuum.RationalInterval.ofBounds 2 3 ⋯].get coordinate) (↑(-3) / ↑1) (↑6 / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: BoundOn (CAS.Exact.exprFn (𝕏[0].mul 𝕏[1])) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1) 2 ⋯, CAS.Continuum.RationalInterval.ofBounds 2 3 ⋯].get coordinate) (↑6 / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: BoundOn (fun x ↦ |CAS.Exact.exprFn (𝕏[0].mul 𝕏[1]) x|) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1) 2 ⋯, CAS.Continuum.RationalInterval.ofBounds 2 3 ⋯].get coordinate) (↑6 / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: ApproxOn (CAS.Exact.exprFn (𝕏[0].mul 𝕏[1])) (fun x ↦ ↑3 / ↑2) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1) 2 ⋯, CAS.Continuum.RationalInterval.ofBounds 2 3 ⋯].get coordinate) (↑9 / ↑2)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
(x * y)
Expand...
#cas [enclose x in [-1, 2], y in [2, 3]]
Domain: x ∈ [-1, 2], y ∈ [2, 3] ⊆ ℝ^2
Input (scalar map ℝ^2 → ℝ): (x * y)
Output (certified interval in ℝ): [-3, 6]
Upper bound: 6
Absolute bound: 6
Center and radius: 3/2 ± 9/2

[CAS.Command.details] More details
  • Coordinates: x, y
  • Certified domain: x ∈ [-1, 2], y ∈ [2, 3] ⊆ ℝ^2
  • [CAS.Command.computation] Certified numerical guarantee
    • Guarantee: the input lies in the output interval throughout the box
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc (-1) 2, ∀ y ∈ Set.Icc 2 3, -3 ≤ x * y ∧ x * y ≤ 6
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc (-1) 2, ∀ y ∈ Set.Icc 2 3, x * y ≤ 6
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc (-1) 2, ∀ y ∈ Set.Icc 2 3, |x * y| ≤ 6
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc (-1) 2, ∀ y ∈ Set.Icc 2 3, |x * y - 3 / 2| ≤ 9 / 2
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: EnclosedOn (CAS.Exact.exprFn (𝕏[0].mul 𝕏[1])) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1) 2 ⋯, CAS.Continuum.RationalInterval.ofBounds 2 3 ⋯].get coordinate) (↑(-3) / ↑1) (↑6 / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: BoundOn (CAS.Exact.exprFn (𝕏[0].mul 𝕏[1])) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1) 2 ⋯, CAS.Continuum.RationalInterval.ofBounds 2 3 ⋯].get coordinate) (↑6 / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: BoundOn (fun x ↦ |CAS.Exact.exprFn (𝕏[0].mul 𝕏[1]) x|) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1) 2 ⋯, CAS.Continuum.RationalInterval.ofBounds 2 3 ⋯].get coordinate) (↑6 / ↑1)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: ApproxOn (CAS.Exact.exprFn (𝕏[0].mul 𝕏[1])) (fun x ↦ ↑3 / ↑2) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds (-1) 2 ⋯, CAS.Continuum.RationalInterval.ofBounds 2 3 ⋯].get coordinate) (↑9 / ↑2)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)

Argument reduction. FloatLib supplies sine and cosine enclosures with certified period reduction and midpoint bounds. The local adapter uses degree 32 and refines those bounds using proved monotonicity and derivative-sign conditions. A narrow panel far from the origin can receive a tighter enclosure than the global range [-1,1]:

-- A narrow panel around x = 10. set_option linter.hashCommand false in #cas [enclose x in [10, 1001 / 100]] #cas [enclose x in [10, 1001 / 100]] Domain: x ∈ [10, 1001/100] ⊆ ℝ Input (scalar map ℝ → ℝ): (sin x) Output (certified interval in ℝ): [-0.552385, -0.544021] Upper bound: -0.544021 Absolute bound: 0.552385 Center and radius: ≈-0.548203 ± 0.004182
[CAS.Command.details] More details
  • Coordinates: x
  • Certified domain: x ∈ [10, 1001/100] ⊆ ℝ
  • [CAS.Command.computation] 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]
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc 10 (1001 / 100), -0.552385 ≤ Real.sin x ∧ Real.sin x ≤ -0.544021
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc 10 (1001 / 100), Real.sin x ≤ -0.544021
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc 10 (1001 / 100), |Real.sin x| ≤ 0.552385
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc 10 (1001 / 100), |Real.sin x + 0.548203| ≤ 4182e-6
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: BoundOn (CAS.Exact.exprFn 𝕏[0].sin) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 10 (1001 / 100) ⋯].get coordinate) (↑(-92560395634196545154218951384246197009) / ↑170141183460469231731687303715884105728)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
(sin x)
Expand...
#cas [enclose x in [10, 1001 / 100]]
Domain: x ∈ [10, 1001/100] ⊆ ℝ
Input (scalar map ℝ → ℝ): (sin x)
Output (certified interval in ℝ): [-0.552385, -0.544021]
Upper bound: -0.544021
Absolute bound: 0.552385
Center and radius: ≈-0.548203 ± 0.004182

[CAS.Command.details] More details
  • Coordinates: x
  • Certified domain: x ∈ [10, 1001/100] ⊆ ℝ
  • [CAS.Command.computation] 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]
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc 10 (1001 / 100), -0.552385 ≤ Real.sin x ∧ Real.sin x ≤ -0.544021
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc 10 (1001 / 100), Real.sin x ≤ -0.544021
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc 10 (1001 / 100), |Real.sin x| ≤ 0.552385
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc 10 (1001 / 100), |Real.sin x + 0.548203| ≤ 4182e-6
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: BoundOn (CAS.Exact.exprFn 𝕏[0].sin) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 10 (1001 / 100) ⋯].get coordinate) (↑(-92560395634196545154218951384246197009) / ↑170141183460469231731687303715884105728)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)

The exact range on this panel is [\sin(10.01),\sin(10)], approximately [-0.55238449,-0.54402111]. On [100,100.001] a certified cosine enclosure is [0.862318,0.862856], and on [-7,-6.9] a certified sine enclosure is [-0.657006,-0.577702]; on [1,2] the sine enclosure is [0.841470,1]. When exact endpoints are long, the headline shows a six-place decimal preview that rounds lower endpoints down and upper endpoints up; the kernel-checked proposition keeps the exact rationals.

The centered form. When an expression repeats a coordinate, the natural interval extension overestimates. If a partial derivative keeps one sign on the box, the monotonicity route replaces the box by its two faces in that coordinate and takes the hull of their enclosures. Each face reruns the planner, so reductions can continue while fuel and fixed-sign derivative certificates remain available. The centered form also competes for selection and allows derivative enclosures of either sign. The mean value theorem in centered form, f(x)=f(m)+\sum_i\partial_i f(c)(x_i-m_i) with c on the segment from the midpoint m to x, encloses f by f(m)+\sum_i\partial_i f(B)\,(I_i-m_i); both routes work on boxes of any literal dimension. For example, xy-x on [1,2]^2 is certified to its exact range [0,2], and xy\,\mathrm e^{-xy} on [0.9,1.1]^2 to [0.303083,0.432632]. In one variable the centered form is f(m)+f'(I)\,(I-m). For x\,\mathrm e^{-x} on [0.9,1.1] the derivative \mathrm e^{-x}(1-x) changes sign; the natural extension gives [0.2996,0.4473] and the centered form gives

-- The derivative changes sign, so the -- centered form replaces monotonicity. set_option linter.hashCommand false in #cas [enclose x in [9 / 10, 11 / 10]] #cas [enclose x in [9 / 10, 11 / 10]] Domain: x ∈ [9/10, 11/10] ⊆ ℝ Input (scalar map ℝ → ℝ): (x * exp (-x)) Output (certified interval in ℝ): [0.356443, 0.379316] Upper bound: 0.379316 Absolute bound: 0.379316 Center and radius: ≈0.367879 ± 0.011437
[CAS.Command.details] More details
  • Coordinates: x
  • Certified domain: x ∈ [9/10, 11/10] ⊆ ℝ
  • [CAS.Command.computation] 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]
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc (9 / 10) (11 / 10), 0.356443 ≤ x * Real.exp (-x) ∧ x * Real.exp (-x) ≤ 0.379316
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc (9 / 10) (11 / 10), x * Real.exp (-x) ≤ 0.379316
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc (9 / 10) (11 / 10), |x * Real.exp (-x)| ≤ 0.379316
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc (9 / 10) (11 / 10), |x * Real.exp (-x) - 0.367879| ≤ 11437e-6
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] centered mean-value form: succeeded
      • [CAS.explanation.plannerStep] exponential range: succeeded
        • used by 3 local enclosure routes
(x * exp (-x))
Expand...
#cas [enclose x in [9 / 10, 11 / 10]]
Domain: x ∈ [9/10, 11/10] ⊆ ℝ
Input (scalar map ℝ → ℝ): (x * exp (-x))
Output (certified interval in ℝ): [0.356443, 0.379316]
Upper bound: 0.379316
Absolute bound: 0.379316
Center and radius: ≈0.367879 ± 0.011437

[CAS.Command.details] More details
  • Coordinates: x
  • Certified domain: x ∈ [9/10, 11/10] ⊆ ℝ
  • [CAS.Command.computation] 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]
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc (9 / 10) (11 / 10), 0.356443 ≤ x * Real.exp (-x) ∧ x * Real.exp (-x) ≤ 0.379316
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc (9 / 10) (11 / 10), x * Real.exp (-x) ≤ 0.379316
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc (9 / 10) (11 / 10), |x * Real.exp (-x)| ≤ 0.379316
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc (9 / 10) (11 / 10), |x * Real.exp (-x) - 0.367879| ≤ 11437e-6
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] centered mean-value form: succeeded
      • [CAS.explanation.plannerStep] exponential range: succeeded
        • used by 3 local enclosure routes

against the true range, approximately [0.3659,0.3679]. The planner previews the natural, monotonicity, and centered routes without proofs, then attempts certificate construction in order of previewed sharpness until a route succeeds. The preview determines which route to try; the returned certificate justifies the enclosure.

Precision. The elementary-function ranges are parameterized: a FloatLib degree for the exponential, a series-term request for the logarithm, a number of binary digits for square-root brackets, and a bisection depth for checked subdivision. A Precision value bundles them, with defaults 8, 10, 12, and 2. The configuration group (prec := n) sets the first three to n and (depth := n) sets the depth; every range theorem is proved for all parameter values, so the policy affects sharpness and cost but never soundness. With the default order,

-- FloatLib degree eight. set_option linter.hashCommand false in #cas [enclose x in [0, 1]] #cas [enclose x in [0, 1]] Domain: x ∈ [0, 1] ⊆ ℝ Input (scalar map ℝ → ℝ): (exp x) Output (certified interval in ℝ): [1, 2.718282] Upper bound: 2.718282 Absolute bound: 2.718282 Center and radius: ≈1.859140 ± 0.859142
[CAS.Command.details] More details
  • Coordinates: x
  • Certified domain: x ∈ [0, 1] ⊆ ℝ
  • [CAS.Command.computation] 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]
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, 1 ≤ Real.exp x ∧ Real.exp x ≤ 2.718282
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, Real.exp x ≤ 2.718282
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, |Real.exp x| ≤ 2.718282
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, |Real.exp x - 1.859140| ≤ 0.859142
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: EnclosedOn (CAS.Exact.exprFn 𝕏[0].exp) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑1 / ↑1) (↑462491687450482947330520547891995015533 / ↑170141183460469231731687303715884105728)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: BoundOn (CAS.Exact.exprFn 𝕏[0].exp) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑462491687450482947330520547891995015533 / ↑170141183460469231731687303715884105728)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] exponential range: succeeded
(exp x)
Expand...
#cas [enclose x in [0, 1]]
Domain: x ∈ [0, 1] ⊆ ℝ
Input (scalar map ℝ → ℝ): (exp x)
Output (certified interval in ℝ): [1, 2.718282]
Upper bound: 2.718282
Absolute bound: 2.718282
Center and radius: ≈1.859140 ± 0.859142

[CAS.Command.details] More details
  • Coordinates: x
  • Certified domain: x ∈ [0, 1] ⊆ ℝ
  • [CAS.Command.computation] 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]
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, 1 ≤ Real.exp x ∧ Real.exp x ≤ 2.718282
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, Real.exp x ≤ 2.718282
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, |Real.exp x| ≤ 2.718282
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, |Real.exp x - 1.859140| ≤ 0.859142
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: EnclosedOn (CAS.Exact.exprFn 𝕏[0].exp) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑1 / ↑1) (↑462491687450482947330520547891995015533 / ↑170141183460469231731687303715884105728)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: BoundOn (CAS.Exact.exprFn 𝕏[0].exp) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑462491687450482947330520547891995015533 / ↑170141183460469231731687303715884105728)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] exponential range: succeeded

also certifies the coarser bound \mathrm e\le876809/322560\approx2.71828187, while

-- FloatLib degree forty. set_option linter.hashCommand false in #cas (prec := 40) [enclose x in [0, 1]] #cas (prec := 40) [enclose x in [0, 1]] Domain: x ∈ [0, 1] ⊆ ℝ Input (scalar map ℝ → ℝ): (exp x) Output (certified interval in ℝ): [1, 2.718282] Upper bound: 2.718282 Absolute bound: 2.718282 Center and radius: ≈1.859140 ± 0.859142
[CAS.Command.details] More details
  • Coordinates: x
  • Certified domain: x ∈ [0, 1] ⊆ ℝ
  • [CAS.Command.computation] 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
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, 1 ≤ Real.exp x ∧ Real.exp x ≤ 2.718282
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, Real.exp x ≤ 2.718282
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, |Real.exp x| ≤ 2.718282
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, |Real.exp x - 1.859140| ≤ 0.859142
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: EnclosedOn (CAS.Exact.exprFn 𝕏[0].exp) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑1 / ↑1) (↑115622921818277542143863879480417099385 / ↑42535295865117307932921825928971026432)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: BoundOn (CAS.Exact.exprFn 𝕏[0].exp) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑115622921818277542143863879480417099385 / ↑42535295865117307932921825928971026432)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] exponential range: succeeded
(exp x)
Expand...
#cas (prec := 40) [enclose x in [0, 1]]
Domain: x ∈ [0, 1] ⊆ ℝ
Input (scalar map ℝ → ℝ): (exp x)
Output (certified interval in ℝ): [1, 2.718282]
Upper bound: 2.718282
Absolute bound: 2.718282
Center and radius: ≈1.859140 ± 0.859142

[CAS.Command.details] More details
  • Coordinates: x
  • Certified domain: x ∈ [0, 1] ⊆ ℝ
  • [CAS.Command.computation] 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
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, 1 ≤ Real.exp x ∧ Real.exp x ≤ 2.718282
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, Real.exp x ≤ 2.718282
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, |Real.exp x| ≤ 2.718282
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc 0 1, |Real.exp x - 1.859140| ≤ 0.859142
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: EnclosedOn (CAS.Exact.exprFn 𝕏[0].exp) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑1 / ↑1) (↑115622921818277542143863879480417099385 / ↑42535295865117307932921825928971026432)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: BoundOn (CAS.Exact.exprFn 𝕏[0].exp) (CAS.Continuum.RationalInterval.boxDomain fun coordinate ↦ [CAS.Continuum.RationalInterval.ofBounds 0 1 ⋯].get coordinate) (↑115622921818277542143863879480417099385 / ↑42535295865117307932921825928971026432)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] exponential range: succeeded

certifies an upper bound with twenty-four decimal places behind the six-place preview: the theorem-facing form cega (prec := 40) [enclose x in [0, 1]] (exp x) closes an EnclosedOn goal with requested upper bound 2.718281828459045235360288. Subdivision depth works the same way. For \sin x\cos x on [0,2], (depth := 2) certifies an upper bound of 53190539/83886080\approx0.634; a third level gives

-- Three checked bisection levels. set_option linter.hashCommand false in #cas (depth := 3) [enclose x in [0, 2]] #cas (depth := 3) [enclose x in [0, 2]] Domain: x ∈ [0, 2] ⊆ ℝ Input (scalar map ℝ → ℝ): (sin x * cos x) Output (certified interval in ℝ): [-0.378402, 0.544012] Upper bound: 0.544012 Absolute bound: 0.544012 Center and radius: ≈0.082805 ± 0.461207
[CAS.Command.details] More details
  • Coordinates: x
  • Certified domain: x ∈ [0, 2] ⊆ ℝ
  • [CAS.Command.computation] 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
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc 0 2, -0.378402 ≤ Real.sin x * Real.cos x ∧ Real.sin x * Real.cos x ≤ 0.544012
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 2, Real.sin x * Real.cos x ≤ 0.544012
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 2, |Real.sin x * Real.cos x| ≤ 0.544012
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc 0 2, |Real.sin x * Real.cos x - 82805e-6| ≤ 0.461207
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] checked box subdivision: succeeded
        • used by 3 local enclosure routes
      • [CAS.explanation.plannerStep] increasing endpoint range: succeeded
        • used by 2 local enclosure routes
      • [CAS.explanation.plannerStep] centered mean-value form: succeeded
      • [CAS.explanation.plannerStep] decreasing endpoint range: succeeded
(sin x * cos x)
Expand...
#cas (depth := 3) [enclose x in [0, 2]]
Domain: x ∈ [0, 2] ⊆ ℝ
Input (scalar map ℝ → ℝ): (sin x * cos x)
Output (certified interval in ℝ): [-0.378402, 0.544012]
Upper bound: 0.544012
Absolute bound: 0.544012
Center and radius: ≈0.082805 ± 0.461207

[CAS.Command.details] More details
  • Coordinates: x
  • Certified domain: x ∈ [0, 2] ⊆ ℝ
  • [CAS.Command.computation] 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
  • [CAS.explanation] Proof evidence
    • [CAS.explanation.checkedEvidence] Checked proof steps
      • [CAS.explanation.checkedStep] Enclosure of the input
        • Proposition: ∀ x ∈ Set.Icc 0 2, -0.378402 ≤ Real.sin x * Real.cos x ∧ Real.sin x * Real.cos x ≤ 0.544012
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.mem_of_enclosedOn_box
      • [CAS.explanation.checkedStep] Upper bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 2, Real.sin x * Real.cos x ≤ 0.544012
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.le_of_boundOn_box
      • [CAS.explanation.checkedStep] Absolute bound of the input
        • Proposition: ∀ x ∈ Set.Icc 0 2, |Real.sin x * Real.cos x| ≤ 0.544012
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_le_of_boundOn_abs_box
      • [CAS.explanation.checkedStep] Center and radius of the input
        • Proposition: ∀ x ∈ Set.Icc 0 2, |Real.sin x * Real.cos x - 82805e-6| ≤ 0.461207
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Tactic.BoxInequality.abs_sub_le_of_approxOn_box
      • [CAS.explanation.checkedStep] Certified enclosure
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.enclosedOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified upper bound
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_of_interval_eq
      • [CAS.explanation.checkedStep] Certified absolute bound
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.boundOn_abs_of_interval_eq
      • [CAS.explanation.checkedStep] Certified center and radius
        • Proposition: 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)
        • Validation: proof term checked by the kernel against this proposition
        • Theorem: CAS.Continuum.RationalInterval.EnclosureAttempt.approxOn_center_of_interval_eq
    • [CAS.explanation.plannerMetadata] Planner metadata (not proof)
      • [CAS.explanation.plannerStep] checked box subdivision: succeeded
        • used by 3 local enclosure routes
      • [CAS.explanation.plannerStep] increasing endpoint range: succeeded
        • used by 2 local enclosure routes
      • [CAS.explanation.plannerStep] centered mean-value form: succeeded
      • [CAS.explanation.plannerStep] decreasing endpoint range: succeeded

against the true range, approximately [-0.3784,0.5]. The trigonometric Taylor degrees are fixed and are not affected by the option. Repeated identical queries in one file reuse the kernel evaluation of the closed query term; the certificate theorem is checked again in every declaration that uses it.

10.5.8. Reading the InfoView🔗

Every #cas mode uses the same compact layout. The heading repeats the command as typed; Domain states the real coordinate space or closed interval; Input and Output state both shape and scalar type; further results read off the output, such as the bounds of an enclosure, follow it; and Conditions, when present, records branch or denominator assumptions.

The proof-evidence section lists the propositions and theorem names that Lean typechecked. Route metadata is separate and depends on the mode. For integration, the displayed normalization passes explain the accepted candidate's residual check; they do not record rejected primitive candidates. The strategy list in a planner refusal names available methods; it does not record which methods ran.

For theorem goals, cas? and cega? display the suggested proof and a short footer naming the selected route. Set cas.verbose to true locally to inspect the full evidence tree, with its checked propositions and separate planner metadata; the same option adds the derivation trees to #cas reports.

The integration route returns that explanation with its completed proof. A primitive report identifies explicit verification, verification of a goal-derived primitive, or bounded search. When the ordinary HasDerivAt fallback certifies the function already in the statement, its label is checked primitive differentiation, since the function came from the statement and was not found by search. A direct Mathlib calculus step names the theorem used and retains its analytic premises. The reporting layer checks those premise proofs separately from the proof of the original goal.

The suggested replay retains an explicit or goal-derived primitive when the route has recorded the ordinary function. Replaying it checks the residual and domain requirements again. Direct Mathlib steps can replay the completed proof with exact. A search result without a recorded ordinary function replays the integration tactic; its suggestion does not freeze an unrecorded search decision.

10.5.9. From a Calculation to a Theorem🔗

Lowercase cas is a proof tactic. It works against the ordinary proposition already written by the user. For example, a theorem with conclusion \frac d{dx}\sin x=\cos x can be closed by cas. A logarithm example with a hypothesis h_x:0<x uses cas using hx.

The derivative route accepts the ordinary Mathlib shapes in which such statements are written. For an explicit function of one real variable these are deriv f x₀ = rhs, HasDerivAt f f' x₀, HasDerivWithinAt f f' s x₀, and nested derivatives deriv (fun x ↦ deriv g x) x₀, with the inner derivative applied or not. The inner rewrite uses a proved function equality, including for the exponential representations of sinh and cosh, and requires its analytic conditions to hold at every real point. For an explicit function on ℝ^n with a literal dimension n they are partialDeriv i f p = rhs, repeated partialDeriv, laplacian f p = rhs, and fderiv ℝ f p (EuclideanSpace.single i 1) = rhs. The same reflection certifies regularity: DifferentiableAt ℝ f x₀, Differentiable ℝ f, ContDiffAt ℝ n f x₀, ContDiffOn ℝ n f s, and ContDiff ℝ n f, on ℝ or on ℝ^k with literal k, for every smoothness order n, whether a natural literal, ⊤, a variable, or the analytic order, because the Mathlib lemmas for the elementary functions hold for every order. The domain conditions are those of the derivative rules, at the point for the At forms and at every point of the set or the space for the others. Bare cas dispatches on all of these shapes, and on interval integrals when the integration frontend is imported; cas? closes the goal the same way and suggests the explicit form.

open PDE (partialDeriv laplacian) -- A HasDerivAt statement about an -- exponential decay mode. example (lambda t : ℝ) : HasDerivAt (fun s : ℝ ↦ Real.exp (-lambda * s)) (-lambda * Real.exp (-lambda * t)) t := lambda:ℝt:ℝ⊢ HasDerivAt (fun s ↦ Real.exp (-lambda * s)) (-lambda * Real.exp (-lambda * t)) t All goals completed! 🐙 -- A coordinate partial derivative on ℝ^2. example (p : ℝ^2) : partialDeriv 1 (fun q : ℝ^2 ↦ q 0 * Real.cos (q 1)) p = -p 0 * Real.sin (p 1) := p:ℝ^2⊢ (∂[1] fun q ↦ q.ofLp 0 * Real.cos (q.ofLp 1)) p = -p.ofLp 0 * Real.sin (p.ofLp 1) All goals completed! 🐙 -- The coordinate Laplacian of a harmonic function. example (p : ℝ^2) : laplacian (fun q : ℝ^2 ↦ Real.exp (q 0) * Real.sin (q 1)) p = 0 := p:ℝ^2⊢ laplacian (fun q ↦ Real.exp (q.ofLp 0) * Real.sin (q.ofLp 1)) p = 0 All goals completed! 🐙 -- A nested derivative is eliminated inner-first. example (a x : ℝ) : deriv (fun x ↦ deriv (fun y ↦ Real.sin (a * y)) x) x = -(a ^ 2) * Real.sin (a * x) := a:ℝx:ℝ⊢ deriv (fun x ↦ deriv (fun y ↦ Real.sin (a * y)) x) x = -a ^ 2 * Real.sin (a * x) All goals completed! 🐙 -- The power rule with a real exponent needs -- the positivity of the base. example (x : ℝ) (hx : 0 < x) : deriv (fun t : ℝ ↦ t ^ (3 / 2 : ℝ)) x = (3 / 2 : ℝ) * x ^ (1 / 2 : ℝ) := x:ℝhx:0 < x⊢ deriv (fun t ↦ t ^ (3 / 2)) x = 3 / 2 * x ^ (1 / 2) All goals completed! 🐙 -- A regularity statement on ℝ^2; the quotient's -- condition is read from the context. example (p : ℝ^2) (hp : p 0 ≠ 0) : DifferentiableAt ℝ (fun y : ℝ^2 ↦ y 1 / y 0) p := p:ℝ^2hp:p.ofLp 0 ≠ 0⊢ DifferentiableAt ℝ (fun y ↦ y.ofLp 1 / y.ofLp 0) p All goals completed! 🐙 -- Smoothness of every order on a half-line. example : ContDiffOn ℝ (⊤ : ℕ∞) (fun t : ℝ ↦ 1 / t) (Set.Ioi 0) := ⊢ ContDiffOn ℝ (↑⊤) (fun t ↦ 1 / t) (Set.Ioi 0) All goals completed! 🐙

Definitions of the current module that depend on the differentiated variable are unfolded automatically; an imported definition is opened with an explicit unfold so that the reader sees which definition is used, and a hypothesis stated through such a definition must be unfolded by hand before the analytic conditions can be matched against it. A false derivative value, a nested logarithm that is not valid everywhere, or a differentiability claim whose analytic condition is missing is refused without changing the proof state, and the error names the unproved condition. Outside the route are abstract functions, symbolic dimension (refused with a message asking for a literal one), norms and inner products, sums, piecewise definitions, improper integrals outside the supported half-line families, and vector-valued derivatives; those keep their Mathlib proofs.

An equality containing integrals or derivatives may need only algebra on their values. Bare cas first tries that algebra with the integral and derivative terms left as atoms. Moving an integral past another summand uses commutativity of addition, even for an abstract integrand taking values in a normed real vector space. Likewise, associating a sum containing deriv f a does not require a formula for the derivative.

For equalities, disequalities, and order relations that need explicit derivative values, the derivative-rewriting route rewrites every maximal derivative subterm of an explicit elementary function (deriv, nested deriv, partialDeriv, repeated partialDeriv, laplacian, the coordinate fderiv) to its checked closed form, all or nothing, so that a residual with several derivative terms becomes an ordinary identity. It then prepares the goal with theorem-backed steps only: a hypothesis ab\ne0 yields both factor conditions, absolute values of sign-known arguments are evaluated, powers are distributed over products, the identities (\sqrt u)^2=u and \sqrt u\,\sqrt u=u join the context wherever 0\le u is provable, and constants such as \pi and \exp a count as positive. Next come the checked simplifier with the local context and one Mathlib arithmetic procedure, with the real-valued definitions of the current module unfolded on a retry. If that fails on a real identity, it reflects both sides over atoms, runs the side-conditioned normalizer in the kernel, certifies the zero difference with decide +kernel, and discharges the recorded conditions from the context or from using evidence. This is how residual identities and the real-power and exponential identities close:

-- The wave residual of sin (x - t): both -- derivatives are rewritten first. example (t x : ℝ) : deriv (deriv (fun s : ℝ ↦ Real.sin (x - s))) t - deriv (deriv (fun y : ℝ ↦ Real.sin (y - t))) x = 0 := t:ℝx:ℝ⊢ deriv (deriv fun s ↦ Real.sin (x - s)) t - deriv (deriv fun y ↦ Real.sin (y - t)) x = 0 All goals completed! 🐙 -- π is a positive constant. example : 4 * Real.pi * (1 / (4 * Real.pi)) = 1 := ⊢ 4 * Real.pi * (1 / (4 * Real.pi)) = 1 All goals completed! 🐙 -- Powers of one base collect under 0 < a. example (a s t : ℝ) (ha : 0 < a) : a ^ (s / 2) * a ^ ((t - s) / 2) = a ^ (t / 2) := a:ℝs:ℝt:ℝha:0 < a⊢ a ^ (s / 2) * a ^ ((t - s) / 2) = a ^ (t / 2) All goals completed! 🐙 -- Exponentials recombine with no hypothesis. example (u : ℝ) : Real.exp u ^ 2 * Real.exp (-2 * u) = 1 := u:ℝ⊢ Real.exp u ^ 2 * Real.exp (-2 * u) = 1 All goals completed! 🐙

Equations in the context can also supply the algebraic relations used by cas. The explicit form cas using [h₁, h₂] adds separate equation proofs; each entry can be an applied theorem, such as h₁ 0. Over any commutative ring, the equations a * d = b * c and c * f = e * d imply c * (a * f - b * e) = 0. The factor c matters: the equations alone do not justify cancelling it.

For integrals, cas can also apply a direct theorem without selecting a primitive. Splitting the integral of a sum uses interval integrability of both summands, for the actual measure and codomain. Differentiating an integral with a varying endpoint uses the continuity, measurability and integrability premises of the corresponding fundamental theorem; the left endpoint contributes a minus sign. These rules retain abstract functions and an abstract normed codomain in the statement. Supported real expressions with Lebesgue measure go through the scalar certificate route.

cas_nf constructs a checked equality for the expression it transforms and uses congruence to replace it in its surrounding context. An opaque predicate can therefore retain its role in the statement while an algebraic argument is normalized. For example, suppose h asserts P((x^4-y^4)/(x^2-y^2)) and hden proves x^2-y^2\ne0. The factorization x^4-y^4=(x^2-y^2)(x^2+y^2) permits cancellation, so cas_nf using hden at h changes the hypothesis to P(x^2+y^2). The calculation needs no information about P. If this is the desired conclusion, exact h completes the proof.

By default the tactic works in the goal; locations select hypotheses, and conv selects an occurrence inside a larger expression. A second copy can remain unchanged when only the first is needed for the next proof step. Domain requirements still belong to each transformed expression. In particular, total division at zero does not justify cancelling a denominator, and \sqrt{x^2} becomes |x| without a sign assumption.

The ordinary interface reflects real arithmetic over opaque atoms and transports its checked equality back into the statement. Existing Verified.Expr.eval occurrences keep their evaluator and original index type. Both interfaces use the established normalization pipeline; the resulting form need not be the shortest equivalent expression.

10.5.10. Where the Calculator Is Used🔗

For algebra and ordinary real derivatives, import CAS.ExactTactic. Add PDE.Symbolic.PDEDerivatives when the calculation involves coordinate derivatives, a Laplacian, or coordinate applications of fderiv. Either import order works. For interval integrals, CAS.IntegrationTactic adds the integration route of cas, with primitive search and integration by parts. Numerical enclosures use CAS.CEGA. These choices let an algebra calculation use the calculator without importing the PDE operators.

The Blueprint build scans the library for every cas, cega, and #cas call and records its module, line, enclosing declaration, tactic form, and the statement the declaration proves. The scan finds 1661 production call sites in 619 modules of the PDE library, with a further 615 sites in the instructional modules under PDE/Examples/. Among these, 1188 use bare cas to close a residual, a derivative, or an algebraic identity, and 429 use cas using h with domain evidence. The ledger also records integration, side-conditioned calculations, enclosures, and closed finite certificate checks. A call site records a calculation inside a proof; it does not mean that the calculator proves the entire enclosing theorem.

The sites cluster where the mathematics is explicit. In the hyperbolic modules the calculator differentiates the Burgers profiles and Riemann solutions, the simple waves and Riemann invariants of the p-system, and the Hopf–Lax and characteristic formulas; in the fluid modules it checks axisymmetric coordinate identities and the exact rotation and shear flows; in the parabolic modules it differentiates the heat kernel and the heat-ball geometry; in the elliptic modules it verifies fundamental solutions, harmonic polynomials, and radial integrands; in the analysis modules it evaluates Fourier-mode integrals and Laplace transforms. Four representative uses show the pattern.

The heat kernel's time derivative. For t>0, differentiating \Phi(t,x)=(4\pi t)^{-n/2}\exp(-\|x\|^2/(4t)) gives

\partial_t\Phi=\left(\frac{\|x\|^2}{4t^2}-\frac n{2t}\right)\Phi.

The positive-time formula agrees with the heat kernel on a neighborhood of t, and 4\pi t>0 justifies differentiating its real power. cas using hgt_pos checks this calculation. Together with the spatial derivatives, it proves the heat kernel equation.

Heat-ball geometry. The squared slice radius is r_{\mathrm{slice}}^2=2n\tau\log(r^2/(4\pi\tau)). For r\ne0 and \tau\ne0, its derivative is 2n(\log(r^2/(4\pi\tau))-1). Differentiating its square root also requires r_{\mathrm{slice}}^2>0. These domain conditions enter the heat-ball mean value formula.

The affine Burgers solution. For u(t,x)=(ax+c)/(1+at) on 1+at\ne0, the derivative tactic proves u_x=a/(1+at) and u_t=-a(ax+c)/(1+at)^2. Their sum u_t+u\,u_x cancels to zero, proving the affine solution of Burgers' initial value problem.

The endpoint chord. Integrating the chord of f between a and b gives:

\int_a^b\Bigl(\frac{b-x}{b-a}\,f(a)+\frac{x-a}{b-a}\,f(b)\Bigr)\,dx =\frac{(b-a)\,(f(a)+f(b))}2.

The proof is cas using hne with b-a\ne0. The lemma is the computational half of the strict upper Hermite–Hadamard inequality used by the p-system shock theory.

example (f : ℝ → ℝ) {a b : ℝ} (hab : a < b) : (∫ x in a..b, ((b - x) / (b - a)) * f a + ((x - a) / (b - a)) * f b) = (b - a) * (f a + f b) / 2 := f:ℝ → ℝa:ℝb:ℝhab:a < b⊢ ∫ (x : ℝ) in a..b, (b - x) / (b - a) * f a + (x - a) / (b - a) * f b = (b - a) * (f a + f b) / 2 f:ℝ → ℝa:ℝb:ℝhab:a < bhne:b - a ≠ 0⊢ ∫ (x : ℝ) in a..b, (b - x) / (b - a) * f a + (x - a) / (b - a) * f b = (b - a) * (f a + f b) / 2 All goals completed! 🐙