Skip to content

Sequence with case split #9

@dranov

Description

@dranov

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 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions