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

interval_cases using .. appears to only support names of hypotheses, not terms #18690

Open
Ruben-VandeVelde opened this issue Nov 6, 2024 · 0 comments

Comments

@Ruben-VandeVelde
Copy link
Collaborator

Ruben-VandeVelde commented Nov 6, 2024

e.g.

import Mathlib.Tactic

example {a : ℕ} (h₁ : a ≠ 0) (h₂ : a ≠ 1) : 2 ≤ a := by
  by_contra hu
  interval_cases using (Nat.zero_le a), hu <;> contradiction

which yields

    interval_cases failed: provided bound '0 ≤ a' cannot be evaluated

This works:

import Mathlib.Tactic

example {a : ℕ} (h₁ : a ≠ 0) (h₂ : a ≠ 1) : 2 ≤ a := by
  by_contra hu
  let this := (Nat.zero_le a)
  interval_cases using this, hu <;> contradiction

Semi-relatedly, it seems like using also doesn't support passing just one bound; one imagines that non-negativity of Nats or hypotheses in the context could be used along with a single explicit bound.

as reported on zulip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant