Skip to content
Snippets Groups Projects

Add `last_cons_Some_ne` lemma for the `last` function

Merged Jonas Kastberg requested to merge jihgfee/stdpp:last_lemma into master
All threads resolved!

A useful lemma for the [last] function, to reduce last (x::l) = Some y to last l = Some y whenever x ≠ y. This is useful since using last_cons leaves us with

match last l with
| Some y0 => Some y0
| None => Some x
end = Some y

which only reduces through a subgoal.

Edited by Robbert Krebbers

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Jonas Kastberg added 1 commit

    added 1 commit

    Compare with previous version

  • Robbert Krebbers resolved all threads

    resolved all threads

  • Jonas Kastberg resolved all threads

    resolved all threads

  • Robbert Krebbers changed title from Added [last_cons_ne] lemma for the [last] function to Add{+ +}last_cons_{+Some_+}ne{++} lemma for the {++}last{++} function

    changed title from Added [last_cons_ne] lemma for the [last] function to Add{+ +}last_cons_{+Some_+}ne{++} lemma for the {++}last{++} function

  • Robbert Krebbers enabled an automatic merge when the pipeline for 13ed6a8d succeeds

    enabled an automatic merge when the pipeline for 13ed6a8d succeeds

  • mentioned in commit e58dd720

  • Please register or sign in to reply
    Loading