law ends_join

lawful-fields@0.1.1.0 · LAWS.bend:154

import lawful-fields@0.1.1.0/LAWS.bend as LAWS
import Base
import lawful-fields@0.1.1.0/defs.bend as F

154# Piece k ends at the k-th end: the first k+1 pieces joined, from from.
155law ends_join:
156  for ps: List<&2, List<&2, U32>>
157  for sep: U32
158  for from: Nat
159  for k: Nat
160  for h: {Nat.is_lt(k, List.length(&2, List<&2, U32>, ps)) == True{} : Bool}
161  {List.get(&2, Nat, F.ends(ps, from), k) == Some{Nat.add(from, List.length(&2, U32, F.join(List.take(&2, List<&2, U32>, ps, Nat.add(k, 1n)), sep)))} : Maybe<&2, Nat>}

Uses (13)

Used by (0)

No other definition uses this definition.