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(data/real/liouville, topology/metric_space/basic): further preparations for Liouville #6201

Closed
wants to merge 18 commits into from

Conversation

adomani
Copy link
Collaborator

@adomani adomani commented Feb 12, 2021

These lemmas are used to show that a Liouville number is transcendental.

The statement that Liouville numbers are transcendental is the next PR in this sequence!

Co-authored-by: Jujian Zhang jujian.zhang1998@outlook.com


…rations for Liouville

These lemmas are use to show that a Liouville number is transcendental.

The statement that Liouville numbers are transcendental is the next PR in this sequence!
@adomani adomani added the awaiting-review The author would like community review of the PR label Feb 12, 2021
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Comment on lines 866 to 867
-- This lemma could go somewhere else, but I did not find a better fit for it. Feel
-- free to suggest where it may be added. Here, all the needed imports are available!
Copy link
Member

Choose a reason for hiding this comment

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

I think this belongs in ordered_group.lean. Importing data.set.intervals.basic there is unlikely to cause problems.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok, I will wait to see if someone has strong opinion about where to move this file or about adding imports, and will go with the final suggestion.

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I'm wrong - these need to go in data.set.intervals.basic, since that imports ordered_group

-- free to suggest where it may be added. Here, all the needed imports are available!
lemma mem_Icc_iff_abs_le {R : Type*} [linear_ordered_add_comm_group R] {x y z : R} :
abs (x - y) ≤ z ↔ y ∈ Icc (x - z) (x + z) :=
abs_le.trans $ (and_comm _ _).trans $ and_congr sub_le neg_le_sub_iff_le_add
Copy link
Member

Choose a reason for hiding this comment

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

Note that sub_mem_Icc_iff_right is now almost the right lemma here, but you then need to rewrite x - -z into x + z.

Of course, you could just drop this lemma and use the pieces directly now.

Copy link
Collaborator Author

@adomani adomani Feb 13, 2021

Choose a reason for hiding this comment

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

Below is my very clumsy attempt at using lemma sub_mem_Icc_iff_right: it is not simpler than what you initially found.

I really think that symmetric intervals are at least as important as random intervals, since they are the ones that arise from balls centred at a point. For this reason, I would prefer to maintain the lemma above.

begin
  rw [← neg_neg z] { occs := occurrences.pos [3] },
  rw [← sub_eq_add_neg x (- z)],
  exact (abs_le.trans mem_Icc.symm).trans sub_mem_Icc_iff_right,
end

Comment on lines 74 to 78
/-- This lemma collects the properties needed to prove `exists_pos_real_of_irrational_root`.
It is stated in more general form than needed: in the intended application, `Z = ℤ`, `N = ℕ`,
`R = ℝ`, `d a = a ^ f.nat_degree`, `j z a = z / (a + 1)`, `f ∈ ℤ[x]`, `α` is an irrational
root of `f`, `ε` is small, `M` is a bound on the Lipschitz constant of `f` near `α`, `n` is
the degree of the polynomial `f`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

When reading the docstring, I have no clue about the content of the lemma. The docstring should explain the content of the lemma (this is missing) and explain the context and motivation (it is there, and very nicely).

Copy link
Collaborator Author

@adomani adomani Feb 15, 2021

Choose a reason for hiding this comment

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

I have tried (in my head) explaining the content of this lemma, but I find it hard to formulate a "wordy" version that is not directly a transcription of the statement. The main reason for formulating this lemma is that it helps formalizing the next one. It avoids coercions kicking in, simplifies the manipulation of terms in the algebraic expressions and replaces certain steps with hypotheses which are direct consequences of lemmas in mathlib.

Here is a very verbose attempt at an explanation: what do you think?

"Let Z, N be types, let R be a metric space, let α : R be a point and let
j : Z → N → R be a function. We aim to estimate how close we can get to α, while staying
in the image of j. The points j z a of R in the image of j come with a "cost" equal to
d a. As we get closer to α while staying in the image of j, we are interested in bounding
the quantity d a * dist α (j z a) from below by a strictly positive amount 1 / M: the intuition
is that approximating well α with the points in the image of j should come at a high cost. The
hypotheses on the function f : R → R provide us with sufficient conditions to ensure our goal.
The first hypothesis is that f is Lipschitz at α: this yields a bound on the distance.
The second hypothesis is specific to the Liouville argument and provides the missing bound
involving the cost function d.

This lemma collects the properties needed to prove exists_pos_real_of_irrational_root.
It is stated in more general form than needed: in the intended application, Z = ℤ, N = ℕ,
R = ℝ, d a = a ^ f.nat_degree, j z a = z / (a + 1), f ∈ ℤ[x], α is an irrational
root of f, ε is small, M is a bound on the Lipschitz constant of f near α, n is
the degree of the polynomial f."

src/data/real/liouville.lean Outdated Show resolved Hide resolved
src/data/real/liouville.lean Outdated Show resolved Hide resolved
Copy link
Collaborator

@sgouezel sgouezel left a comment

Choose a reason for hiding this comment

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

Just minor nitpicking left. You can merge yourself once this is done.
bors d+

src/data/real/liouville.lean Outdated Show resolved Hide resolved
src/data/real/liouville.lean Outdated Show resolved Hide resolved
@bors
Copy link

bors bot commented Feb 15, 2021

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

@sgouezel sgouezel added the delegated The PR author may merge after reviewing final suggestions. label Feb 15, 2021
adomani and others added 3 commits February 15, 2021 14:13
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr>
@adomani
Copy link
Collaborator Author

adomani commented Feb 15, 2021

I am very happy that finally Liouville is creeping into mathlib! Thank you all!

bors r+

@bors
Copy link

bors bot commented Feb 15, 2021

Canceled.

@adomani
Copy link
Collaborator Author

adomani commented Feb 15, 2021

bors r+

bors bot pushed a commit that referenced this pull request Feb 15, 2021
…rations for Liouville (#6201)

These lemmas are used to show that a Liouville number is transcendental.

The statement that Liouville numbers are transcendental is the next PR in this sequence!

Co-authored-by: Jujian Zhang <jujian.zhang1998@outlook.com>
@Julian-Kuelshammer Julian-Kuelshammer added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Feb 15, 2021
@bors
Copy link

bors bot commented Feb 15, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(data/real/liouville, topology/metric_space/basic): further preparations for Liouville [Merged by Bors] - feat(data/real/liouville, topology/metric_space/basic): further preparations for Liouville Feb 15, 2021
@bors bors bot closed this Feb 15, 2021
@bors bors bot deleted the liouville_exists_root branch February 15, 2021 20:50
b-mehta pushed a commit that referenced this pull request Apr 2, 2021
…rations for Liouville (#6201)

These lemmas are used to show that a Liouville number is transcendental.

The statement that Liouville numbers are transcendental is the next PR in this sequence!

Co-authored-by: Jujian Zhang <jujian.zhang1998@outlook.com>
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

4 participants