Zulip Chat Archive

Stream: new members

Topic: What's the correct way to talk about indefinite integrals?


Ilmārs Cīrulis (Jun 06 2025 at 17:01):

For example, I want to say that indefinite integral of 2 * x is x ^ 2 + C.
What's the correct way to formulate such statement?

Thank you!

Kenny Lau (Jun 06 2025 at 17:12):

@Ilmārs Cīrulis The Fundamental Theorem of Calculus in Lean is:

theorem integral_deriv_eq_sub' (f) (hderiv : deriv f = f')
    (hdiff :  x  uIcc a b, DifferentiableAt  f x) (hcont : ContinuousOn f' (uIcc a b)) :
     y in a..b, f' y = f b - f a

Kenny Lau (Jun 06 2025 at 17:12):

so I think the statement you want will be that the derivative of x^2 is 2*x

Kenny Lau (Jun 06 2025 at 17:13):

import Mathlib

lemma foo (c : ) : deriv (fun x :   (x ^ 2 : )) c = 2 * c := by simp
lemma foo' : deriv (fun x :   (x ^ 2 : )) = (fun c  2 * c) := by simp
lemma foo'' : deriv (· ^ 2 :   ) = (2 * ·) := by simp

ZhiKai Pong (Jun 06 2025 at 17:26):

Ilmārs Cīrulis said:

For example, I want to say that indefinite integral of 2 * x is x ^ 2 + C.
What's the correct way to formulate such statement?

Thank you!

If you need the + C explicitly, I asked something similar in #new members > equality of derivatives

tldr: use docs#is_const_of_deriv_eq_zero


Last updated: Dec 20 2025 at 21:32 UTC