Skip to content

[Merged by Bors] - feat: port Algebra.Order.Monoid.Canonical.Defs#778

Closed
rosborn wants to merge 12 commits intomasterfrom
Algebra.Order.Monoid.Canonical.Defs
Closed

[Merged by Bors] - feat: port Algebra.Order.Monoid.Canonical.Defs#778
rosborn wants to merge 12 commits intomasterfrom
Algebra.Order.Monoid.Canonical.Defs

Conversation

@rosborn
Copy link
Copy Markdown
Contributor

@rosborn rosborn commented Nov 29, 2022

mathlib SHA: 1fc36cc9c8264e6e81253f88be7fb2cb6c92d76a

Porting Notes:
1. Haven't touched protect_proj. If someone knows what to do to fix this, please feel free.
2. LinearOrder.toLattice is found in Order.Lattice which is both not ported yet and not imported.
3. simp_rw seems to be more aggressive in lean4, so a proof was rewritten to just use rw alone.
4. simpa seemed to continue to try and solve a goal after it had already been solved.
5. one_lt_mul_iff needed an additional rfl to solve. This wasn't needed in lean3.
6. Some simp lemmas are not simp-normal form. I have not debugged any of these yet.
7. Further documentation is needed. If anyone wants to add them, please feel free.

@rosborn rosborn added WIP Work in progress mathlib-port This is a port of a theory file from mathlib. labels Nov 29, 2022
@digama0 digama0 changed the title port(Algebra/Order/Monoid/Canonical/Defs): port file feat: port Algebra.Order.Monoid.Canonical.Defs Nov 29, 2022
@kim-em
Copy link
Copy Markdown
Contributor

kim-em commented Nov 29, 2022

  1. Just remove protect_proj, and write protected in front of each field name.

@kim-em
Copy link
Copy Markdown
Contributor

kim-em commented Nov 29, 2022

  1. Try replacing simpa using f with simp at f. If simp can reduce it to False, then it will close the goal, thus making simpa fail because it then wants to run assumption. This is a change in behaviour of tactics that we probably should add a warning for.

@kim-em
Copy link
Copy Markdown
Contributor

kim-em commented Nov 29, 2022

  1. Order.Lattice has been ported? Could you double check on this. It should be imported via Order.MinMax.

@kim-em
Copy link
Copy Markdown
Contributor

kim-em commented Nov 29, 2022

Actually looks pretty close, otherwise!

@kim-em kim-em added the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 29, 2022
@rosborn
Copy link
Copy Markdown
Contributor Author

rosborn commented Nov 30, 2022

  1. Just remove protect_proj, and write protected in front of each field name.

The definitions for CanonicallyLinearOrderedAddMonoid and CanonicallyLinearOrderedMonoid only extend other classes, so there are no additional fields. Was protect_proj doing anything for those classes? Is it safe to remove the attribute without any other changes?

@rosborn
Copy link
Copy Markdown
Contributor Author

rosborn commented Nov 30, 2022

Should the NeZero instance for bit0 be deleted?

@rosborn rosborn removed the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 30, 2022
@kim-em
Copy link
Copy Markdown
Contributor

kim-em commented Nov 30, 2022

Should the NeZero instance for bit0 be deleted?

No, we're leaving stuff about bit0 in place for now. We'll need to turn off the deprecated warning.

@kim-em
Copy link
Copy Markdown
Contributor

kim-em commented Nov 30, 2022

bors merge

@bors
Copy link
Copy Markdown

bors bot commented Nov 30, 2022

👎 Rejected by label

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Nov 30, 2022
@kim-em kim-em removed the WIP Work in progress label Nov 30, 2022
@kim-em
Copy link
Copy Markdown
Contributor

kim-em commented Dec 1, 2022

bors merge

bors bot pushed a commit that referenced this pull request Dec 1, 2022
mathlib SHA: 1fc36cc9c8264e6e81253f88be7fb2cb6c92d76a

Porting Notes:
~~1. Haven't touched `protect_proj`. If someone knows what to do to fix this, please feel free.~~
~~2. `LinearOrder.toLattice` is found in `Order.Lattice` which is both not ported yet and not imported.~~
3. `simp_rw` seems to be more aggressive in lean4, so a proof was rewritten to just use `rw` alone.
4. `simpa` seemed to continue to try and solve a goal after it had already been solved.
5. `one_lt_mul_iff` needed an additional `rfl` to solve. This wasn't needed in lean3.
6. Some `simp` lemmas are not simp-normal form. I have not debugged any of these yet.
7. Further documentation is needed. If anyone wants to add them, please feel free.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@bors
Copy link
Copy Markdown

bors bot commented Dec 1, 2022

Build failed:

  • Build

@riccardobrasca
Copy link
Copy Markdown
Member

bors merge

bors bot pushed a commit that referenced this pull request Dec 1, 2022
mathlib SHA: 1fc36cc9c8264e6e81253f88be7fb2cb6c92d76a

Porting Notes:
~~1. Haven't touched `protect_proj`. If someone knows what to do to fix this, please feel free.~~
~~2. `LinearOrder.toLattice` is found in `Order.Lattice` which is both not ported yet and not imported.~~
3. `simp_rw` seems to be more aggressive in lean4, so a proof was rewritten to just use `rw` alone.
4. `simpa` seemed to continue to try and solve a goal after it had already been solved.
5. `one_lt_mul_iff` needed an additional `rfl` to solve. This wasn't needed in lean3.
6. Some `simp` lemmas are not simp-normal form. I have not debugged any of these yet.
7. Further documentation is needed. If anyone wants to add them, please feel free.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@bors
Copy link
Copy Markdown

bors bot commented Dec 1, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat: port Algebra.Order.Monoid.Canonical.Defs [Merged by Bors] - feat: port Algebra.Order.Monoid.Canonical.Defs Dec 1, 2022
@bors bors bot closed this Dec 1, 2022
@bors bors bot deleted the Algebra.Order.Monoid.Canonical.Defs branch December 1, 2022 11:09
bors bot pushed a commit to leanprover-community/mathlib3 that referenced this pull request Dec 1, 2022
Regenerated from the [port status wiki page](https://github.com/leanprover-community/mathlib/wiki/mathlib4-port-status).
Relates to the following PRs:
* `algebra.field.defs`: leanprover-community/mathlib4#668
* `algebra.group.commute`: leanprover-community/mathlib4#750
* `algebra.group_with_zero.commute`: leanprover-community/mathlib4#762
* `algebra.group_with_zero.semiconj`: leanprover-community/mathlib4#757
* `algebra.group_with_zero.units.basic`: leanprover-community/mathlib4#735
* `algebra.hom.embedding`: leanprover-community/mathlib4#764
* `algebra.order.monoid.cancel.defs`: leanprover-community/mathlib4#774
* `algebra.order.monoid.canonical.defs`: leanprover-community/mathlib4#778
* `algebra.order.monoid.defs`: leanprover-community/mathlib4#771
* `algebra.order.monoid.min_max`: leanprover-community/mathlib4#763
* `algebra.order.monoid.order_dual`: leanprover-community/mathlib4#786
* `algebra.order.sub.defs`: leanprover-community/mathlib4#732
* `algebra.regular.basic`: leanprover-community/mathlib4#758
* `algebra.ring.commute`: leanprover-community/mathlib4#759
* `algebra.ring.regular`: leanprover-community/mathlib4#795
* `algebra.ring.semiconj`: leanprover-community/mathlib4#751
* `control.applicative`: leanprover-community/mathlib4#798
* `control.functor`: leanprover-community/mathlib4#612
* `control.monad.basic`: leanprover-community/mathlib4#752
* `data.countable.defs`: leanprover-community/mathlib4#736
* `data.int.units`: leanprover-community/mathlib4#807
* `data.nat.basic`: leanprover-community/mathlib4#729
* `data.nat.psub`: leanprover-community/mathlib4#806
* `data.nat.units`: leanprover-community/mathlib4#805
* `data.pi.algebra`: leanprover-community/mathlib4#564
* `data.prod.lex`: leanprover-community/mathlib4#783
* `logic.embedding.basic`: leanprover-community/mathlib4#700
* `logic.equiv.option`: leanprover-community/mathlib4#674
* `order.bounded_order`: leanprover-community/mathlib4#697
* `order.with_bot`: leanprover-community/mathlib4#776
* `order.disjoint`: leanprover-community/mathlib4#773
* `order.min_max`: leanprover-community/mathlib4#728
* `order.prop_instances`: leanprover-community/mathlib4#792
* `order.rel_iso.basic`: leanprover-community/mathlib4#772
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mathlib-port This is a port of a theory file from mathlib. ready-to-merge This PR has been sent to bors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants