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] - refactor(order/lattice): adjust proofs to avoid choice #2666

Closed
wants to merge 2 commits into from

Conversation

b-mehta
Copy link
Collaborator

@b-mehta b-mehta commented May 12, 2020

For foundational category theoretic reasons, I'd like these lattice properties to avoid choice.
In particular, I'd like the proof here: #2665 to be intuitionistic.

For most of them it was very easy, eg changing finish to simp. For sup_assoc and inf_assoc it's a bit more complex though - for inf_assoc I wrote out a term mode proof, and for sup_assoc I used ifinish. I realise ifinish is deprecated because it isn't always intuitionistic, but in this case it did give an intuitionistic proof. I think both should be proved the same way, but I'm including one of each to see which is preferred.

@b-mehta b-mehta added the awaiting-review The author would like community review of the PR label May 12, 2020
Copy link
Collaborator

@bryangingechen bryangingechen left a comment

Choose a reason for hiding this comment

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

LGTM
bors r+

@github-actions github-actions bot 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 May 12, 2020
@bryangingechen
Copy link
Collaborator

Oh wait, I misread. You wanted feedback on whether the term mode or ifinish would be preferred. I think a term mode proof is likely to be more stable here, but others might have different opinions.
bors r-

@bryangingechen bryangingechen added awaiting-review The author would like community review of the PR and removed ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) labels May 12, 2020
@robertylewis
Copy link
Member

I'd prefer to avoid any use of ifinish in mathlib unless it's really necessary.

@bryangingechen
Copy link
Collaborator

@robertylewis What counts as "really necessary"? Should all the ifinish uses in this PR be replaced?

@urkud
Copy link
Member

urkud commented May 13, 2020

If you want these proofs to stay intuitionistic, then I recommend adding a test running #print axioms on these proofs.

@robertylewis
Copy link
Member

I think the term mode proof in inf_assoc is better here. It's basically a coincidence that ifinish does them constructively.

@bryangingechen
Copy link
Collaborator

@urkud Is there a way to have Lean throw an error (so that CI will actually fail) if #print axioms contains choice?

@bryangingechen
Copy link
Collaborator

@b-mehta I think this is ready to go unless you want to add tests. I'll leave that up to you.
bors d+

@bors
Copy link

bors bot commented May 14, 2020

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

@b-mehta
Copy link
Collaborator Author

b-mehta commented May 14, 2020

bors r+

bors bot pushed a commit that referenced this pull request May 14, 2020
For foundational category theoretic reasons, I'd like these lattice properties to avoid choice.
In particular, I'd like the proof here: #2665 to be intuitionistic.

 For most of them it was very easy, eg changing `finish` to `simp`. For `sup_assoc` and `inf_assoc` it's a bit more complex though - for `inf_assoc` I wrote out a term mode proof, and for `sup_assoc` I used `ifinish`. I realise `ifinish` is deprecated because it isn't always intuitionistic, but in this case it did give an intuitionistic proof. I think both should be proved the same way, but I'm including one of each to see which is preferred.
@bryangingechen bryangingechen 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 May 14, 2020
@bors
Copy link

bors bot commented May 14, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title refactor(order/lattice): adjust proofs to avoid choice [Merged by Bors] - refactor(order/lattice): adjust proofs to avoid choice May 14, 2020
@bors bors bot closed this May 14, 2020
@bors bors bot deleted the constructive-lattice branch May 14, 2020 03:27
anrddh pushed a commit to anrddh/mathlib that referenced this pull request May 15, 2020
…mmunity#2666)

For foundational category theoretic reasons, I'd like these lattice properties to avoid choice.
In particular, I'd like the proof here: leanprover-community#2665 to be intuitionistic.

 For most of them it was very easy, eg changing `finish` to `simp`. For `sup_assoc` and `inf_assoc` it's a bit more complex though - for `inf_assoc` I wrote out a term mode proof, and for `sup_assoc` I used `ifinish`. I realise `ifinish` is deprecated because it isn't always intuitionistic, but in this case it did give an intuitionistic proof. I think both should be proved the same way, but I'm including one of each to see which is preferred.
anrddh pushed a commit to anrddh/mathlib that referenced this pull request May 16, 2020
…mmunity#2666)

For foundational category theoretic reasons, I'd like these lattice properties to avoid choice.
In particular, I'd like the proof here: leanprover-community#2665 to be intuitionistic.

 For most of them it was very easy, eg changing `finish` to `simp`. For `sup_assoc` and `inf_assoc` it's a bit more complex though - for `inf_assoc` I wrote out a term mode proof, and for `sup_assoc` I used `ifinish`. I realise `ifinish` is deprecated because it isn't always intuitionistic, but in this case it did give an intuitionistic proof. I think both should be proved the same way, but I'm including one of each to see which is preferred.
cipher1024 pushed a commit to cipher1024/mathlib that referenced this pull request Mar 15, 2022
…mmunity#2666)

For foundational category theoretic reasons, I'd like these lattice properties to avoid choice.
In particular, I'd like the proof here: leanprover-community#2665 to be intuitionistic.

 For most of them it was very easy, eg changing `finish` to `simp`. For `sup_assoc` and `inf_assoc` it's a bit more complex though - for `inf_assoc` I wrote out a term mode proof, and for `sup_assoc` I used `ifinish`. I realise `ifinish` is deprecated because it isn't always intuitionistic, but in this case it did give an intuitionistic proof. I think both should be proved the same way, but I'm including one of each to see which is preferred.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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