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

Sequence with case split #9

Open
dranov opened this issue Mar 4, 2024 · 1 comment
Open

Sequence with case split #9

dranov opened this issue Mar 4, 2024 · 1 comment

Comments

@dranov
Copy link
Contributor

dranov commented Mar 4, 2024

In Coq, I can write something like:

Lemma lastP s : last_spec s.
Proof. case: s => [|x s]; [left | rewrite lastI; right]. Qed.

Is there something similar in Ssrlean?

Currently I do the following, which is a bit verbose:

theorem lastP (s : Seq α) : last_spec s := by
  scase: s => [|x s]
  { left }
  { srw lastI; right }
@volodeyka
Copy link
Contributor

I've never been into the [ .. | .. | ...] syntax for tactics. It actually comes from vanilla Coq, and (I suggest) not idiomatic in Lean.
Maybe you can try something like:

theorem lastP (s : Seq α) : last_spec s := by
  scase: s => [|x s]; { left }; srw lastI; right

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

2 participants