Langlib

Langlib.Automata.Turing.DSL.DropFromLastSep

Drop from the Last Separator #

This file contains the list-level operation used by separator-erasing block machines.

Key results #

def dropFromLastSep {Γ : Type} [DecidableEq Γ] (sep : Γ) :
List ΓList Γ

Drop everything up to and including the LAST occurrence of sep. If sep ∉ l, return l unchanged.

Equations
Instances For
    theorem dropFromLastSep_nil {Γ : Type} [DecidableEq Γ] (sep : Γ) :
    theorem dropFromLastSep_cons_mem {Γ : Type} [DecidableEq Γ] (sep c : Γ) (rest : List Γ) (h : sep rest) :
    dropFromLastSep sep (c :: rest) = dropFromLastSep sep rest
    theorem dropFromLastSep_cons_sep_not_mem {Γ : Type} [DecidableEq Γ] (sep : Γ) (rest : List Γ) (h : seprest) :
    dropFromLastSep sep (sep :: rest) = rest
    theorem dropFromLastSep_cons_ne_not_mem {Γ : Type} [DecidableEq Γ] (sep c : Γ) (rest : List Γ) (hc : c sep) (h : seprest) :
    dropFromLastSep sep (c :: rest) = c :: rest
    theorem dropFromLastSep_not_mem {Γ : Type} [DecidableEq Γ] (sep : Γ) (l : List Γ) (h : sepl) :

    When sep ∉ l, dropFromLastSep is the identity.

    theorem dropFromLastSep_ne_default {Γ : Type} [Inhabited Γ] [DecidableEq Γ] (sep : Γ) (l : List Γ) (hl : gl, g default) (g : Γ) :

    dropFromLastSep preserves non-defaultness.