def last_snoc
import bend-collections-laws-math@1.0.0.0/proofs/lib/list.bend as Listimport Base
import bend-collections-laws-math@1.0.0.0/spec/lib/common.bend as SC
268def last_snoc(-A: Data, +xs: List<&2, A>, +x: A) -> {SC.last(A, SC.snoc(A, xs, x)) == Some{x} : Maybe<&2, A>}:
269 match xs:
270 case Nil{}:
271 {==}
272 case Con{h, Nil{}}:
273 {==}
274 case Con{h, Con{+h2, +t2}}:
275 last_snoc(A, Con{h2, t2}, x)
Uses (4)
Used by (0)
No other definition uses this definition.