Drop from the Last Separator #
This file contains the list-level operation used by separator-erasing block machines.
Key results #
dropFromLastSep: drops everything through the final occurrence ofsep.dropFromLastSep_not_mem: ifsepis absent, the operation is the identity.dropFromLastSep_ne_default: non-default cells stay non-default.
Drop everything up to and including the LAST occurrence of sep.
If sep ∉ l, return l unchanged.
Equations
Instances For
theorem
dropFromLastSep_cons_mem
{Γ : Type}
[DecidableEq Γ]
(sep c : Γ)
(rest : List Γ)
(h : sep ∈ rest)
:
theorem
dropFromLastSep_cons_sep_not_mem
{Γ : Type}
[DecidableEq Γ]
(sep : Γ)
(rest : List Γ)
(h : sep ∉ rest)
:
theorem
dropFromLastSep_cons_ne_not_mem
{Γ : Type}
[DecidableEq Γ]
(sep c : Γ)
(rest : List Γ)
(hc : c ≠ sep)
(h : sep ∉ rest)
:
When sep ∉ l, dropFromLastSep is the identity.
theorem
dropFromLastSep_ne_default
{Γ : Type}
[Inhabited Γ]
[DecidableEq Γ]
(sep : Γ)
(l : List Γ)
(hl : ∀ g ∈ l, g ≠ default)
(g : Γ)
:
g ∈ dropFromLastSep sep l → g ≠ default
dropFromLastSep preserves non-defaultness.