Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat: compute the integral of sqrt (1 - x ^ 2) #6905

Closed
wants to merge 4 commits into from

Conversation

xroblot
Copy link
Collaborator

@xroblot xroblot commented Aug 31, 2023

We prove

theorem integral_sqrt_one_sub_sq : ∫ x in (-1 : ℝ)..1, sqrt (1 - x ^ 2) = π / 2

which will in turn be used to compute the area of the disc and then the volume of the unit complex ball in #6907


Open in Gitpod

@xroblot xroblot added awaiting-CI t-analysis Analysis (normed *, calculus) labels Aug 31, 2023
@xroblot xroblot added the awaiting-review The author would like community review of the PR label Sep 1, 2023
Copy link
Collaborator

@Ruben-VandeVelde Ruben-VandeVelde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably move this theorem to the end of the file, rather than putting it between two sections about trig integrals

Mathlib/Analysis/SpecialFunctions/Integrals.lean Outdated Show resolved Hide resolved
Mathlib/Analysis/SpecialFunctions/Integrals.lean Outdated Show resolved Hide resolved
@xroblot
Copy link
Collaborator Author

xroblot commented Sep 2, 2023

I'd probably move this theorem to the end of the file, rather than putting it between two sections about trig integrals

Yes, I thought about that but then I would have to add a new doc section since the last one is Integral of sin x ^ m * cos x ^ n (maybe Integral of misc. functions?). Another possibility is to leave it where it is and add a docstring to explain why it's there.

@sgouezel
Copy link
Contributor

sgouezel commented Sep 2, 2023

How do this PR and the next one relate to Archive/AreaOfACircle?

@xroblot
Copy link
Collaborator Author

xroblot commented Sep 2, 2023

It is basically the same result and in fact some of the ideas of AreaOfACircle were used in #6907. The main difference is that the fact volume {x : ℝ × ℝ : x.1 ^ 2 + x.2 ^2 < 1 } = NNReal.pi is not explicitly stated in #6907 yet but that's probably going to change, see the discussion there.

@xroblot
Copy link
Collaborator Author

xroblot commented Sep 5, 2023

I'd probably move this theorem to the end of the file, rather than putting it between two sections about trig integrals

Yes, I thought about that but then I would have to add a new doc section since the last one is Integral of sin x ^ m * cos x ^ n (maybe Integral of misc. functions?). Another possibility is to leave it where it is and add a docstring to explain why it's there.

In the end, I put the result in a new section at the end of the file.

Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🎉 Let's hope that in the future we can golf the proof to a 1-liner using some integration tactic.

bors merge

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review The author would like community review of the PR labels Sep 8, 2023
bors bot pushed a commit that referenced this pull request Sep 8, 2023
We prove 
```lean
theorem integral_sqrt_one_sub_sq : ∫ x in (-1 : ℝ)..1, sqrt (1 - x ^ 2) = π / 2
```
which will in turn be used to compute the area of the disc and then the volume of the unit complex ball in #6907
@bors
Copy link

bors bot commented Sep 8, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title feat: compute the integral of sqrt (1 - x ^ 2) [Merged by Bors] - feat: compute the integral of sqrt (1 - x ^ 2) Sep 8, 2023
@bors bors bot closed this Sep 8, 2023
@bors bors bot deleted the xfr-integral_sqrt branch September 8, 2023 12:17
Julian added a commit that referenced this pull request Sep 11, 2023
* fix-lint: (463 commits)
  chore: lint-style.py was calling str.replace incorrectly
  chore: module doc for #find_home, #minimize_imports, import early (#7095)
  chore: reduce imports to Data.Rat.Cast.CharZero (#7091)
  chore: cleanup imports of Data/Rat/Cast/Defs (#7092)
  chore: linarith only needs ring1 (#7090)
  refactor(Data/Int/Bitwise): use `<<<` and `>>>` notation (#6789)
  chore: delete redundant commented-out positivity test (#7085)
  chore: fix docstrings, names and aligns about paracompacity of emetric spaces (#7064)
  feat(Data/Finsupp): add notation (#6367)
  refactor: re-home some meta code (#6921)
  fix: don't use `False` as a bool, use `false` (#7059)
  chore: fix reference to `compactCovering` in docstring (#7065)
  fix: fix link in docstring of IsWellFounded (#7063)
  chore: tidy various files (#7041)
  feat: roots in an algebra (#6740)
  chore: revert ProofWidgets bump in #7044 and #7056 (#7069)
  feat: super factorial (#6768)
  feat(LinearAlgebra/Matrix/Trace): add Matrix.trace_diagonal (#7061)
  chore: complete ProofWidgets bump (#7056)
  feat: More `Finset.sup'` lemmas (#7021)
  feat: self_lt_pow (#7058)
  chore: move some files to `MeasureTheory/MeasurableSpace/` (#7045)
  chore(RingTheory/Nilpotent): untwine two universes (#7057)
  feat: von Neumann Mean Ergodic Theorem (#6053)
  feat: (sSup, Iic) and (Ici, sInf) are Galois connections (#6951)
  feat: derivative along a vector (#7038)
  feat: check for some common git problems in CI (#7043)
  chore: bump ProofWidgets (#7044)
  feat(Topology/Algebra): add `DiscreteTopology Mˣ` (#7028)
  chore: simplify `by rfl` (#7039)
  chore: tidy various files (#7035)
  refactor(LinearAlgebra/CliffordAlgebra/Conjugation): expose implementation details of 'reverse' (#6783)
  feat: add `DiscreteTopology.of_continuous_injective` (#7029)
  feat: restore the module docstring code snippet (#7030)
  feat: flesh out the API for `realPart` and `imaginaryPart` (#7023)
  chore: missing simps lemmas for `Multiplicative` defs (#7016)
  feat: characterize isLittleO on principal filters (#7008)
  doc: cleanup documentation on Basis.constr (#7007)
  feat: cleanup API around differentiable functions (#7004)
  feat: add Nat.digits_append_digits (#6999)
  feat: definition of the homology of a short complex (#6994)
  chore: implement porting notes about Polish spaces (#6991)
  feat(Algebra/Category/ModuleCat): composition of restriction of scalar functors (#6915)
  feat: compute the integral of sqrt (1 - x ^ 2) (#6905)
  chore(*/TensorProduct): missing functorial lemmas (#6781)
  feat: a functor from a small category to a filtered category factors through a small filtered category (#6212)
  feat: expand API on locally integrable functions (#7006)
  chore: split Tactic.NormNum.Basic (#7002)
  feat: a few lemmas on continuous functions (#7005)
  feat: ZMod.castHom_self (#7013)
  ...
kodyvajjha pushed a commit that referenced this pull request Sep 22, 2023
We prove 
```lean
theorem integral_sqrt_one_sub_sq : ∫ x in (-1 : ℝ)..1, sqrt (1 - x ^ 2) = π / 2
```
which will in turn be used to compute the area of the disc and then the volume of the unit complex ball in #6907
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has been sent to bors. t-analysis Analysis (normed *, calculus)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants