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(algebra/group_power/basic): add abs_add_eq_add_abs_iff #6593

Closed
wants to merge 9 commits into from

Conversation

riccardobrasca
Copy link
Member

I've added

lemma abs_add_eq_add_abs_iff {α : Type*} [linear_ordered_add_comm_group α]  (a b : α) :
  abs (a + b) = abs a + abs b ↔ (0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0)

from lean-liquid. For some reasons I am not able to use wlog hle : a ≤ b using [a b, b a] at the beginning of the proof, Lean says unknown identifier 'wlog' and if I try to import tactic.wlog I have tons of errors.

@riccardobrasca riccardobrasca added the awaiting-review The author would like community review of the PR label Mar 8, 2021
@bryangingechen
Copy link
Collaborator

For some reasons I am not able to use wlog hle : a ≤ b using [a b, b a] at the beginning of the proof, Lean says unknown identifier 'wlog' and if I try to import tactic.wlog I have tons of errors.

The problem is that algebra.group_power.basic is in the transitive imports of tactic.wlog. You could try moving it to algebra.group_power.lemmas, which is apparently a place for lemmas which require more imports.

@riccardobrasca
Copy link
Member Author

riccardobrasca commented Mar 9, 2021

Thank you for the suggestion! I've moved the results to algebra.group_power.lemmas (using wlog) and I also added abs_gsmul.

src/algebra/group_power/lemmas.lean Outdated Show resolved Hide resolved
src/algebra/group_power/lemmas.lean Outdated Show resolved Hide resolved
riccardobrasca and others added 3 commits March 9, 2021 15:45
Co-authored-by: damiano <adomani@gmail.com>
Co-authored-by: damiano <adomani@gmail.com>
Co-authored-by: damiano <adomani@gmail.com>
Copy link
Member

@jcommelin jcommelin 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 d+

src/algebra/group_power/lemmas.lean Outdated Show resolved Hide resolved
src/algebra/group_power/lemmas.lean Outdated Show resolved Hide resolved
@bors
Copy link

bors bot commented Mar 9, 2021

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

@jcommelin jcommelin added awaiting-author A reviewer has asked the author a question or requested changes delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels Mar 9, 2021
@riccardobrasca
Copy link
Member Author

bors r+

@bryangingechen
Copy link
Collaborator

@riccardobrasca did you forget to push a commit or accept Johan's suggestions?

@bryangingechen
Copy link
Collaborator

bors r-

@bors
Copy link

bors bot commented Mar 9, 2021

Canceled.

@riccardobrasca
Copy link
Member Author

Sorry, you're right!

riccardobrasca and others added 2 commits March 9, 2021 19:43
Co-authored-by: Johan Commelin <johan@commelin.net>
Co-authored-by: Johan Commelin <johan@commelin.net>
@riccardobrasca
Copy link
Member Author

bors r+

bors bot pushed a commit that referenced this pull request Mar 9, 2021
I've added
```
lemma abs_add_eq_add_abs_iff {α : Type*} [linear_ordered_add_comm_group α]  (a b : α) :
  abs (a + b) = abs a + abs b ↔ (0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0)
```
from `lean-liquid`. For some reasons I am not able to use `wlog hle : a ≤ b using [a b, b a]` at the beginning of the proof, Lean says `unknown identifier 'wlog'` and if I try to import `tactic.wlog` I have tons of errors.
@bors
Copy link

bors bot commented Mar 9, 2021

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Mar 9, 2021
I've added
```
lemma abs_add_eq_add_abs_iff {α : Type*} [linear_ordered_add_comm_group α]  (a b : α) :
  abs (a + b) = abs a + abs b ↔ (0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0)
```
from `lean-liquid`. For some reasons I am not able to use `wlog hle : a ≤ b using [a b, b a]` at the beginning of the proof, Lean says `unknown identifier 'wlog'` and if I try to import `tactic.wlog` I have tons of errors.
@bors
Copy link

bors bot commented Mar 10, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(algebra/group_power/basic): add abs_add_eq_add_abs_iff [Merged by Bors] - feat(algebra/group_power/basic): add abs_add_eq_add_abs_iff Mar 10, 2021
@bors bors bot closed this Mar 10, 2021
@bors bors bot deleted the abs_smul branch March 10, 2021 02:23
ocfnash pushed a commit that referenced this pull request Mar 12, 2021
I've added
```
lemma abs_add_eq_add_abs_iff {α : Type*} [linear_ordered_add_comm_group α]  (a b : α) :
  abs (a + b) = abs a + abs b ↔ (0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0)
```
from `lean-liquid`. For some reasons I am not able to use `wlog hle : a ≤ b using [a b, b a]` at the beginning of the proof, Lean says `unknown identifier 'wlog'` and if I try to import `tactic.wlog` I have tons of errors.
b-mehta pushed a commit that referenced this pull request Apr 2, 2021
I've added
```
lemma abs_add_eq_add_abs_iff {α : Type*} [linear_ordered_add_comm_group α]  (a b : α) :
  abs (a + b) = abs a + abs b ↔ (0 ≤ a ∧ 0 ≤ b ∨ a ≤ 0 ∧ b ≤ 0)
```
from `lean-liquid`. For some reasons I am not able to use `wlog hle : a ≤ b using [a b, b a]` at the beginning of the proof, Lean says `unknown identifier 'wlog'` and if I try to import `tactic.wlog` I have tons of errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-author A reviewer has asked the author a question or requested changes delegated The PR author may merge after reviewing final suggestions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants