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

split fails for non-propositional goals #4313

Closed
3 tasks done
JLimperg opened this issue May 31, 2024 · 0 comments · Fixed by #4349
Closed
3 tasks done

split fails for non-propositional goals #4313

JLimperg opened this issue May 31, 2024 · 0 comments · Fixed by #4349
Labels
bug Something isn't working

Comments

@JLimperg
Copy link
Contributor

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

The current implementation of split splits on p ∨ ¬p, where p is the condition of an ite. This fails if the goal is non-propositional since Or.elim can only eliminate into Prop. MWE:

example {A B : Type} {p : Prop} [Decidable p] (h : if p then A else B) :
    Sum A B := by
  split at h
  /-
  tactic 'cases' failed, nested error:
  tactic 'induction' failed, recursor 'Or.casesOn' can only eliminate into Prop
  AB: Type
  p: Prop
  inst✝: Decidable p
  h: if p then A else B
  hByCases✝: p ∨ ¬p
  ⊢ A ⊕ B
  -/

Versions

"4.9.0-nightly-2024-05-31"

Additional Information

I believe the implementation strategy suggested in #2414 would also fix this issue.

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

@JLimperg JLimperg added the bug Something isn't working label May 31, 2024
github-merge-queue bot pushed a commit that referenced this issue Jun 5, 2024
…goals (#4349)

Remark: when splitting an `if-then-else` term, the subgoals now have
tags `isTrue` and `isFalse` instead of `inl` and `inr`.
closes #4313

---------

Co-authored-by: Mario Carneiro <di.gama@gmail.com>
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 a pull request may close this issue.

1 participant