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

chore(*): switch to lean 3.6.1 #2064

Merged
merged 57 commits into from Mar 5, 2020
Merged

chore(*): switch to lean 3.6.1 #2064

merged 57 commits into from Mar 5, 2020

Conversation

gebner
Copy link
Member

@gebner gebner commented Feb 27, 2020

The only remaining build failure is a class instance resolution failure in real_inner_product.


There's still lots of stuff to fix, but I'm not sure if I'll have time to do it until next week. I got as far as derivatives.

There's roughly 4 different kinds of breakage:

  1. Some lemmas relied on add_comm, add_left_comm, sub_eq_add_neg being in the simp set. @semorrison suggested to just add an attribute [simp] for the moment, but I'm not sure if this makes porting much easier. It's pretty easy to modify the simp invocation, and there's other breakage you need to fix anyhow.
  2. field no longer implies decidable_eq, so you need to add classical, open_locale classical, etc., as necessary.
  3. field no longer has the inv_mul_cancel field, so you need to remove it from the instances.
  4. Lots of lemmas in core got renamed / changed / have fewer arguments now due to the field change.

TO CONTRIBUTORS:

Make sure you have:

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

If this PR is related to a discussion on Zulip, please include a link in the discussion.

For reviewers: code review check list

@gebner gebner added enhancement help-wanted The author needs attention to resolve issues WIP Work in progress labels Feb 27, 2020
@robertylewis
Copy link
Member

robertylewis commented Feb 27, 2020

2. field no longer implies decidable_eq, so you need to add classical, open_locale classical, etc., as necessary.

I haven't looked closely at the changes yet, but the fix should often be to add a [decidable_eq T] hypothesis instead of open_locale classical, no? I'll look more carefully in the office tomorrow.

@@ -56,7 +56,7 @@ have hF₁ : F.eval z' = f.eval z₀ - f.eval z₀ * (g.eval z₀).abs * δ ^ n
neg_mul_eq_neg_mul_symm, mul_one, div_eq_mul_inv];
simp only [mul_comm, mul_left_comm, mul_assoc],
have hδs : (g.eval z₀).abs * δ ^ n / (f.eval z₀).abs < 1,
by rw [div_eq_mul_inv, mul_right_comm, mul_comm, ← inv_inv' (complex.abs _ * _), mul_inv',
by rw [div_eq_mul_inv, mul_right_comm, mul_comm, ← @inv_inv' _ _ (complex.abs _ * _), mul_inv',
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
by rw [div_eq_mul_inv, mul_right_comm, mul_comm, ← @inv_inv' _ _ (complex.abs _ * _), mul_inv',
by rw [div_eq_mul_inv, mul_right_comm, mul_comm, ← inv_inv'' (complex.abs _ * _), mul_inv',

@urkud
Copy link
Member

urkud commented Mar 2, 2020

BTW, should we increase mathlib version here so that people will be able to easily stick to lean-3.5.1 version for some time?

@urkud
Copy link
Member

urkud commented Mar 2, 2020

  1. field no longer implies decidable_eq, so you need to add classical, open_locale classical, etc., as necessary.

I haven't looked closely at the changes yet, but the fix should often be to add a [decidable_eq T] hypothesis instead of open_locale classical, no? I'll look more carefully in the office tomorrow.

As far as I understand, it should be [deciddable_eq T] in definitions and classical in theorems.


lemma inv_involutive' [discrete_field α] : function.involutive (has_inv.inv : α → α) :=
lemma inv_inv'' [division_ring α] (x : α) : x⁻¹⁻¹ = x :=
inv_inv'
Copy link
Member

Choose a reason for hiding this comment

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

What's the difference between inv_inv' and inv_inv''? Why do we need both?

Copy link
Member

Choose a reason for hiding this comment

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

As far as I can see, the only difference is that inv_inv' takes x as an implicit argument. I think, this should be fixed in the stdlib.

@urkud
Copy link
Member

urkud commented Mar 2, 2020

I wonder why class instance resolution fails in real_inner_product.

@@ -299,7 +299,7 @@ example (x y z k m n i j : ℕ)
: (m + x + n + i) * z + k = z * (j + n + m + y) + k :=
Copy link
Member

Choose a reason for hiding this comment

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

It seems that there are a lot of : at the beginning of lines in this file...

@gebner
Copy link
Member Author

gebner commented Mar 5, 2020

Wow, it builds!!

@gebner gebner added awaiting-review The author would like community review of the PR and removed WIP Work in progress help-wanted The author needs attention to resolve issues labels Mar 5, 2020
@jcommelin jcommelin added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label Mar 5, 2020
@mergify mergify bot merged commit 78ffbae into master Mar 5, 2020
@mergify mergify bot deleted the lean36 branch March 5, 2020 13:17
anrddh pushed a commit to anrddh/mathlib that referenced this pull request May 15, 2020
* chore(*): switch to lean 3.6.0

* Port `src/linear_algebra` to Lean 3.6c

* Port `src/ring_theory` to Lean 3.6c

* Port `src/algebra` and its dependencies to Lean 3.6c

* Port `src/group_theory` to Lean 3.6c

* WIP: Ports part of `src/data` to Lean 3.6c

* Port `src/data` (and dependencies) to Lean 3.6

* fix set_theory.lists

* fix ring2

* fix pell.lean

these aren't the cleanest proofs, but pell.lean is kind of a standalone thing.

* fix dioph.lean

* Port `src/number_theory/sum_four_squares.lean` to Lean 3.6c

* Port `src/field_theory` to Lean 3.6

* Port `src/computability` to Lean 3.6c

* Port `src/measure_theory` (and dependencies) to Lean 3.6c

* fix manifold/real_instances

* fix analysis/complex/polynomial

* Fix some compile errors in `real_inner_product`

* Upgrade to Lean 3.6.1

* perf: speed up calls to linarith

* Reduce instance priorities for potentially noncomputable instances.

* Remove cyclic instance.

* Make arguments {implicit} in instances where they can be filled in via unification.

* Make inner_product_space compile.

* Style.

* Port data.nat.modeq

* Port data.int.parity

* Port data.int.modeq

* Port data.real.hyperreal

* fix(ci): always run git setup step

closes leanprover-community#2079

(cherry picked from commit 8a0157d)

* Remove pre-3.6 legacy code.

* Fix test/monotonicity.lean

* Fix test/ring_exp.lean

* Fix test/conv.lean

* Fix archive/imo1988_q6.lean

* Fix docs/tutorial/Zmod37.lean

* Fix archive/sensitivity.lean

* refactor(algebra/lie_algebra): lie_algebra should not extend lie_ring

* remove unused argument

* add doc-string to instance that became a def

* add docstring

* Fix linting error ☺

* Fix data.real.irrational

* fixing a proof

* cleaning up proof

* fix broken proof

* fix proof

* fix some more proofs

* fix

* fix proofs

Co-authored-by: Vierkantor <Vierkantor@users.noreply.github.com>
Co-authored-by: Rob Lewis <Rob.y.lewis@gmail.com>
Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>
Co-authored-by: Scott Morrison <scott@tqft.net>
anrddh pushed a commit to anrddh/mathlib that referenced this pull request May 16, 2020
* chore(*): switch to lean 3.6.0

* Port `src/linear_algebra` to Lean 3.6c

* Port `src/ring_theory` to Lean 3.6c

* Port `src/algebra` and its dependencies to Lean 3.6c

* Port `src/group_theory` to Lean 3.6c

* WIP: Ports part of `src/data` to Lean 3.6c

* Port `src/data` (and dependencies) to Lean 3.6

* fix set_theory.lists

* fix ring2

* fix pell.lean

these aren't the cleanest proofs, but pell.lean is kind of a standalone thing.

* fix dioph.lean

* Port `src/number_theory/sum_four_squares.lean` to Lean 3.6c

* Port `src/field_theory` to Lean 3.6

* Port `src/computability` to Lean 3.6c

* Port `src/measure_theory` (and dependencies) to Lean 3.6c

* fix manifold/real_instances

* fix analysis/complex/polynomial

* Fix some compile errors in `real_inner_product`

* Upgrade to Lean 3.6.1

* perf: speed up calls to linarith

* Reduce instance priorities for potentially noncomputable instances.

* Remove cyclic instance.

* Make arguments {implicit} in instances where they can be filled in via unification.

* Make inner_product_space compile.

* Style.

* Port data.nat.modeq

* Port data.int.parity

* Port data.int.modeq

* Port data.real.hyperreal

* fix(ci): always run git setup step

closes leanprover-community#2079

(cherry picked from commit 8a0157d)

* Remove pre-3.6 legacy code.

* Fix test/monotonicity.lean

* Fix test/ring_exp.lean

* Fix test/conv.lean

* Fix archive/imo1988_q6.lean

* Fix docs/tutorial/Zmod37.lean

* Fix archive/sensitivity.lean

* refactor(algebra/lie_algebra): lie_algebra should not extend lie_ring

* remove unused argument

* add doc-string to instance that became a def

* add docstring

* Fix linting error ☺

* Fix data.real.irrational

* fixing a proof

* cleaning up proof

* fix broken proof

* fix proof

* fix some more proofs

* fix

* fix proofs

Co-authored-by: Vierkantor <Vierkantor@users.noreply.github.com>
Co-authored-by: Rob Lewis <Rob.y.lewis@gmail.com>
Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>
Co-authored-by: Scott Morrison <scott@tqft.net>
@YaelDillies YaelDillies removed the awaiting-review The author would like community review of the PR label Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 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