Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

feat(data/complex/exponential): exp, sin, cos, arcsin etc.#386

Merged
johoelzl merged 56 commits intoleanprover-community:masterfrom
leanprover-fork:exp
Oct 17, 2018
Merged

feat(data/complex/exponential): exp, sin, cos, arcsin etc.#386
johoelzl merged 56 commits intoleanprover-community:masterfrom
leanprover-fork:exp

Conversation

@ChrisHughes24
Copy link
Copy Markdown
Member

This PR includes definitions for exp, sin, cos, tan, sinh, cosh and tanh, and log on complex numbers and reals. There are two large files created, data/complex/exponential and analysis/exponential. The latter file contains all the definitions that depend on continuity.

arcsin, arccos, and arctan on reals

pi

arg function on complex numbers.

the intermediate value theorem on reals.

One other point is that I changed the definition of floor_ring, from extends linear_ordered_ring, to taking [linear_ordered_ring α] as an argument, since I proved lemmas true in a floor field, and didn't want to create a floor_field class.

TO CONTRIBUTORS:

Make sure you have:

  • reviewed and applied the coding style: coding, naming
  • make sure definitions and lemmas are put in the right files
  • make sure definitions and lemmas are not redundant

For reviewers: code review check list

@ChrisHughes24 ChrisHughes24 changed the title feat(data/complex/exponential): the exponential function feat(data/complex/exponential): exp, sin, cos, arcsin etc. Oct 3, 2018
open real

lemma real.intermediate_value {f : ℝ → ℝ} {a b t : ℝ}
(hf : ∀ x, a ≤ x → x ≤ b → tendsto f (nhds x) (nhds (f x)))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You are assuming full continuity at a and b instead of one-sided continuity (i.e., continuity within [a,b]), that would be the natural condition here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

what @sgouezel wants is:
hf : ∀ x, a ≤ x → x ≤ b → tendsto f (inf (nhds x) (principal (Icc a b))) (nhds (f x))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@johoelzl What do you think of defining a filter nhds_within S x = inf (nhds x) (principal S) and use it to define continuity within S (not in this pull request, of course!). Or is it better design to always go first to the subtype S and then use nhds x for the induced topology? (Of course, the two are equivalent). With my Isabelle-biased point of view, I tend to prefer the first approach, avoiding subtypes when possible.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

My hope is that the subtype approach is working. So also here it would be an option to write:

hf : ∀ x:Icc a b, tendsto (λx:Icc a b, f x.1) (nhds x) (nhds (f x.1))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think if you really want to pursue this route you should just treat Icc a b as a topological space in its own right, and f is a continuous function on that domain. We will probably need a lot of lemmas about the unit interval as a topological space anyway, since it plays so prominently in path connectedness and the fundamental group.

@johoelzl
Copy link
Copy Markdown
Collaborator

johoelzl commented Oct 4, 2018

@dorhinj Up to now, I only was roughly going over this PR. Its amazing!


open finset filter

#print classical.em
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Remove

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Oups, it is already removed in the next commit. Forget it!

@johoelzl
Copy link
Copy Markdown
Collaborator

I'm fine with merging this.

My biggest critique is that it develops quiet some theory around Cauchy limits instead of using topological limits. But it sounds Mario wants to have it that way.

Anything against merging it now? It is quiet big and has often merge conflicts, so I would prefer to merge it now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants