def append_snoc

bend-collections-laws-math@1.0.0.0 · proofs/lib/list.bend:177

import bend-collections-laws-math@1.0.0.0/proofs/lib/list.bend as List
import Base
import bend-collections-laws-math@1.0.0.0/spec/lib/common.bend as SC

177def append_snoc(-A: Data, +xs: List<&2, A>, +ys: List<&2, A>, +x: A) -> {SC.append(A, xs, SC.snoc(A, ys, x)) == SC.snoc(A, SC.append(A, xs, ys), x) : List<&2, A>}:
178  match xs:
179    case Nil{}:
180      {==}
181    case Con{+h, +t}:
182      cons_cong(A, h, SC.append(A, t, SC.snoc(A, ys, x)), SC.snoc(A, SC.append(A, t, ys), x), append_snoc(A, t, ys, x))

Uses (4)

Used by (1)