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] - bug (Mathlib.Data.Finset.Sym) : suppress global variable (m : Sym alpha n) #10637

Closed
wants to merge 1 commit into from

Conversation

AntoineChambert-Loir
Copy link
Collaborator

@AntoineChambert-Loir AntoineChambert-Loir commented Feb 16, 2024

A global variable {m : Sym α n} was present in Mathlib.Data.Finset.Sym with the very unfortunate effect that docs#Finset.sym_eq_empty was using it :

theorem Finset.sym_eq_empty {α : Type u_1} [DecidableEq α] {s : Finset α} {n : ℕ} 
    {m : Sym α n} :
    Finset.sym s n = ∅ ↔ n ≠ 0 ∧ s = ∅

thus making it impossible to use to prove its goal.
The line is modified, added in a few functions when needed.


Open in Gitpod

@AntoineChambert-Loir AntoineChambert-Loir added the easy < 20s of review time. See the lifecycle page for guidelines. label Feb 16, 2024
@kbuzzard
Copy link
Member

Thanks! And you get a bonus point for removing a porting note :-)

@kbuzzard
Copy link
Member

maintainer merge

Copy link

🚀 Pull request has been placed on the maintainer queue by kbuzzard.

@sgouezel
Copy link
Contributor

bors r+
Thanks!

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Feb 16, 2024
mathlib-bors bot pushed a commit that referenced this pull request Feb 16, 2024
…ha n) (#10637)

A global `variable {m : Sym α n}` was present in `Mathlib.Data.Finset.Sym` with the very unfortunate effect that docs#Finset.sym_eq_empty was using it :

```
theorem Finset.sym_eq_empty {α : Type u_1} [DecidableEq α] {s : Finset α} {n : ℕ} 
    {m : Sym α n} :
    Finset.sym s n = ∅ ↔ n ≠ 0 ∧ s = ∅
```

 thus making it impossible to use to prove its goal.
 The line is modified, added in a few functions when needed.



Co-authored-by: Antoine Chambert-Loir <antoine.chambert-loir@math.univ-paris-diderot.fr>
@eric-wieser
Copy link
Member

I assume leanprover/lean4#2452 would help here?

@AntoineChambert-Loir AntoineChambert-Loir added awaiting-review The author would like community review of the PR and removed ready-to-merge This PR has been sent to bors. maintainer-merge labels Feb 16, 2024
@AntoineChambert-Loir
Copy link
Collaborator Author

I suspect the problem comes from there, but I didn't try to understand what happened.
(In particular, I didn't really need to change the proof, so it seems there's a bug in the elaborator of needed variables.)

@kmill
Copy link
Contributor

kmill commented Feb 16, 2024

Reading the file, it looks like cases n caused m to be included into the final variable list -- it's the same gotcha as that issue is trying to address.

@sgouezel
Copy link
Contributor

Yes, with leanprover/lean4#2452 there would have been no issue here.

@mathlib-bors
Copy link

mathlib-bors bot commented Feb 16, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title bug (Mathlib.Data.Finset.Sym) : suppress global variable (m : Sym alpha n) [Merged by Bors] - bug (Mathlib.Data.Finset.Sym) : suppress global variable (m : Sym alpha n) Feb 16, 2024
@mathlib-bors mathlib-bors bot closed this Feb 16, 2024
@mathlib-bors mathlib-bors bot deleted the ACL/sym branch February 16, 2024 16:56
riccardobrasca pushed a commit that referenced this pull request Feb 18, 2024
…ha n) (#10637)

A global `variable {m : Sym α n}` was present in `Mathlib.Data.Finset.Sym` with the very unfortunate effect that docs#Finset.sym_eq_empty was using it :

```
theorem Finset.sym_eq_empty {α : Type u_1} [DecidableEq α] {s : Finset α} {n : ℕ} 
    {m : Sym α n} :
    Finset.sym s n = ∅ ↔ n ≠ 0 ∧ s = ∅
```

 thus making it impossible to use to prove its goal.
 The line is modified, added in a few functions when needed.



Co-authored-by: Antoine Chambert-Loir <antoine.chambert-loir@math.univ-paris-diderot.fr>
dagurtomas pushed a commit that referenced this pull request Mar 22, 2024
…ha n) (#10637)

A global `variable {m : Sym α n}` was present in `Mathlib.Data.Finset.Sym` with the very unfortunate effect that docs#Finset.sym_eq_empty was using it :

```
theorem Finset.sym_eq_empty {α : Type u_1} [DecidableEq α] {s : Finset α} {n : ℕ} 
    {m : Sym α n} :
    Finset.sym s n = ∅ ↔ n ≠ 0 ∧ s = ∅
```

 thus making it impossible to use to prove its goal.
 The line is modified, added in a few functions when needed.



Co-authored-by: Antoine Chambert-Loir <antoine.chambert-loir@math.univ-paris-diderot.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review The author would like community review of the PR easy < 20s of review time. See the lifecycle page for guidelines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants