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

fix: correct matching on sigma types #26

Merged
merged 1 commit into from
Nov 15, 2023
Merged

Conversation

eric-wieser
Copy link
Member

No description provided.

@eric-wieser eric-wieser added the bug Something isn't working label Nov 15, 2023
eric-wieser added a commit to leanprover-community/mathlib4 that referenced this pull request Nov 15, 2023
@gebner
Copy link
Member

gebner commented Nov 15, 2023

Oh wow, this must've been broken since the removal of the implicit pure coercion... Thank you so much for fixing this!

@gebner gebner merged commit d3a1d25 into master Nov 15, 2023
2 checks passed
@eric-wieser
Copy link
Member Author

It would be cool if

/-- Given `x + y` of Nat, returns `(x, y)`. Otherwise fail. -/
def getNatAdd (e : Expr) : MetaM (Option (Q(Nat) × Q(Nat))) := do
  let ⟨_, ~q(Nat), ~q($a + $b)⟩ ← inferTypeQ e | return none
  return some (a, b)

worked, but that would need a more cooperative elaboration order

@eric-wieser eric-wieser deleted the eric-wieser/fix-sigma branch November 15, 2023 01:43
mathlib-bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Nov 15, 2023
alexkeizer pushed a commit to leanprover-community/mathlib4 that referenced this pull request Nov 17, 2023
alexkeizer pushed a commit to leanprover-community/mathlib4 that referenced this pull request Nov 21, 2023
grunweg pushed a commit to leanprover-community/mathlib4 that referenced this pull request Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants