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

contradiction tactic creates type-incorrect term #4851

Closed
kmill opened this issue Jul 27, 2024 · 0 comments · Fixed by #6387
Closed

contradiction tactic creates type-incorrect term #4851

kmill opened this issue Jul 27, 2024 · 0 comments · Fixed by #6387
Labels
bug Something isn't working P-medium We may work on this issue if we find the time

Comments

@kmill
Copy link
Collaborator

kmill commented Jul 27, 2024

Description

The contradiction tactic uses absurd when discharging the goal using α → False, even if α is not a proposition, leading to a typechecking failure.

Context

Found on Zulip

Steps to Reproduce

theorem T0 (α : Type) (x : α) (H: α → False) : False := by
  contradiction

Expected behavior: Either this succeeds (without error) or reports "tactic 'contradiction' failed"

Actual behavior: The tactic succeeds without error, but there is an error at T0:

application type mismatch
  @absurd α
argument has type
  Type
but function has type
  ∀ {a b : Prop}, a → ¬a → b

Versions

4.11.0 commit from 7/25/2024

Impact

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

@kmill kmill added the bug Something isn't working label Jul 27, 2024
@leanprover-bot leanprover-bot added the P-medium We may work on this issue if we find the time label Aug 2, 2024
leodemoura added a commit that referenced this issue Dec 14, 2024
This PR fixes a type error in the proof generated by the `contradiction` tactic.

closes #4851
leodemoura added a commit that referenced this issue Dec 15, 2024
This PR fixes a type error in the proof generated by the `contradiction` tactic.

closes #4851
github-merge-queue bot pushed a commit that referenced this issue Dec 15, 2024
This PR fixes a type error in the proof generated by the `contradiction`
tactic.

closes #4851
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P-medium We may work on this issue if we find the time
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants