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(data/subtype): add heq_of_coe_eq ext lemma #6259

Closed
wants to merge 1 commit into from

Conversation

eric-wieser
Copy link
Member

This means that ext breaks equality of sigma types into the following goals:

example {ι : Sort*} {α : Type*} {p : ι → α → Prop} {a b : Σ i, subtype (p i)} : a = b :=
begin
  ext,
  sorry, -- a.fst = b.fst
  sorry, -- p a.fst x ↔ p b.fst x
  sorry, -- ↑(a.snd) = ↑(b.snd)
end

This overlaps with #6257, although we probably want both lemmas.

This means that `ext` breaks equality of sigma types into the following goals:
```lean
example {ι : Sort*} {α : Type*} {p : ι → α → Prop} {a b : Σ i, subtype (p i)} : a = b :=
begin
  ext,
  sorry, -- a.fst = b.fst
  sorry, -- p a.fst x ↔ p b.fst x
  sorry, -- ↑(a.snd) = ↑(b.snd)
end
```
@eric-wieser eric-wieser added awaiting-review The author would like community review of the PR help-wanted The author needs attention to resolve issues and removed awaiting-review The author would like community review of the PR labels Feb 16, 2021
@eric-wieser eric-wieser removed the request for review from jcommelin February 16, 2021 11:57
@eric-wieser
Copy link
Member Author

This fails, but I don't understand why.

@bryangingechen
Copy link
Collaborator

Replacing the ext1 before the failing change with show_term { ext1 } before this PR returns:

Try this: refine subtype.ext _

And the goal becomes: ↑(bitvec.of_nat n (bitvec.to_nat ⟨xs, h⟩)) = ↑⟨xs, h⟩ where the coes are to list bool.

With this PR, it returns:

Try this: refine vector.ext (λ (m : fin n), _[m])

(For some reason, the suggestion has a stray [m] at the end; refine vector.ext (λ (m : fin n), _) results in the goal vector.nth (bitvec.of_nat n (bitvec.to_nat ⟨xs, h⟩)) m = vector.nth ⟨xs, h⟩ m as stated in the build error.)

I'm not sure why your change would have had this effect (but admittedly I don't know how ext1 works either).

@github-actions github-actions bot added the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Jul 17, 2021
@semorrison semorrison added the too-late This PR was ready too late for inclusion in mathlib3 label Jul 16, 2023
@YaelDillies YaelDillies closed this Oct 6, 2023
@YaelDillies YaelDillies deleted the eric-wieser/subtype.heq_of_coe_eq branch October 6, 2023 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-wanted The author needs attention to resolve issues merge-conflict Please `git merge origin/master` then a bot will remove this label. too-late This PR was ready too late for inclusion in mathlib3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants