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(ring_theory/polynomial): show gaussian form of hermite n #18896

Closed
wants to merge 31 commits into from

Conversation

lukemantle
Copy link
Collaborator

@lukemantle lukemantle commented Apr 28, 2023

Show the equivalence of the polynomial form of the Hermite polynomials to the explicit form involving derivatives of the gaussian function.

Co-authored-by: Jake Levinson levinson.jake@gmail.com


We are interested in feedback about two parts of this PR:

- Should the definition gaussian be removed and replaced with its definition written out explicitly? Or if gaussian is kept, should it be placed somewhere else in mathlib? (removed)
- Should the auxiliary definition hermite_gauss also be removed the same way? If not, should it be hidden using protected def or something along these lines? (removed)

Open in Gitpod

@lukemantle lukemantle added the awaiting-review The author would like community review of the PR label Apr 28, 2023
Comment on lines 47 to 52
{ simp_rw [aeval_def, eval₂_eq_eval_map],
apply polynomial.differentiable },
{ simp_rw [aeval_def, eval₂_eq_eval_map],
apply differentiable.const_mul,
apply polynomial.differentiable },
{ simp } }
Copy link
Member

@eric-wieser eric-wieser May 5, 2023

Choose a reason for hiding this comment

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

These side goals go away if you work with has_deriv_at instead of deriv:

  induction n with n ih generalizing x,
  { rw [function.iterate_zero_apply, pow_zero, one_mul, hermite_zero, C_1, map_one, one_mul] },
  { replace ih : (deriv^[n] _) = _ := _root_.funext ih,
    have has_deriv_at_gaussian : ∀ x,
      has_deriv_at (λ y, real.exp (-(y^2 / 2))) ((-x) * real.exp (-(x^2 / 2))) x,
    { intro x,
      simpa [mul_div_cancel_left x (two_ne_zero), neg_mul, mul_comm]
        using (((has_deriv_at_id' x).pow 2).div_const 2).neg.exp },
    rw [function.iterate_succ_apply', ih],
    have := ((polynomial.has_deriv_at_aeval _ _).const_mul ((-1 : ℝ) ^ n)).mul (has_deriv_at_gaussian x),
    refine this.deriv.trans _,
    sorry },

Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually also deriv_const_mul_field doesn't generate a side goal, I didn't notice it before (versus deriv_const_mul).

Copy link
Collaborator

Choose a reason for hiding this comment

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

The new version is pretty close to this, let's just go with it.

src/analysis/calculus/cont_diff.lean Outdated Show resolved Hide resolved
src/analysis/calculus/cont_diff.lean Outdated Show resolved Hide resolved
@jakelev jakelev added the awaiting-review The author would like community review of the PR label May 7, 2023
@jakelev
Copy link
Collaborator

jakelev commented May 7, 2023

Is this PR ready to merge?

@eric-wieser
Copy link
Member

My hope was to get #18945 in first since I think that golfs a few proofs slightly here.

bors bot pushed a commit that referenced this pull request May 8, 2023
This duplicates every lemma about differentiation of `polynomial.eval` for `polynomial.aeval` too.
Some of these turned out to be needed in #18896.
Copy link
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

bors d+

Thanks!

@bors
Copy link

bors bot commented May 11, 2023

✌️ lukemantle can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@leanprover-community-bot-assistant leanprover-community-bot-assistant added delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels May 11, 2023
@lukemantle
Copy link
Collaborator Author

bors r+

bors bot pushed a commit that referenced this pull request May 11, 2023
Show the equivalence of the polynomial form of the Hermite polynomials to the explicit form involving derivatives of the gaussian function.

Co-authored-by: Jake Levinson <levinson.jake@gmail.com>



Co-authored-by: Jake Levinson <levinson.jake@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Johan Commelin <johan@commelin.net>
Co-authored-by: jakelev <levinson.jake@gmail.com>
@bors
Copy link

bors bot commented May 11, 2023

Build failed:

@jcommelin
Copy link
Member

Thanks 🎉

bors merge

bors bot pushed a commit that referenced this pull request May 12, 2023
Show the equivalence of the polynomial form of the Hermite polynomials to the explicit form involving derivatives of the gaussian function.

Co-authored-by: Jake Levinson <levinson.jake@gmail.com>



Co-authored-by: lukemantle <lukeomantle@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Johan Commelin <johan@commelin.net>
@bors
Copy link

bors bot commented May 12, 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(ring_theory/polynomial): show gaussian form of hermite n [Merged by Bors] - feat(ring_theory/polynomial): show gaussian form of hermite n May 12, 2023
@bors bors bot closed this May 12, 2023
@bors bors bot deleted the hermite_gauss branch May 12, 2023 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated The PR author may merge after reviewing final suggestions. ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants