LAWS.ends_join: law of lawful-fields@0.1.1.0 Import: import lawful-fields@0.1.1.0/LAWS.bend as LAWS Lines 154-161 of lawful-fields@0.1.1.0/LAWS.bend: https://jend.leeeet.dev/read.txt?path=lawful-fields@0.1.1.0/LAWS.bend&start_line=154&end_line=161 import Base import lawful-fields@0.1.1.0/defs.bend as F # Piece k ends at the k-th end: the first k+1 pieces joined, from from. law ends_join: for ps: List<&2, List<&2, U32>> for sep: U32 for from: Nat for k: Nat for h: {Nat.is_lt(k, List.length(&2, List<&2, U32>, ps)) == True{} : Bool} {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): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.get https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.length https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.take https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=lawful-fields@0.1.1.0/defs.bend&name=ends https://jend.leeeet.dev/definition.txt?path=lawful-fields@0.1.1.0/defs.bend&name=join https://jend.leeeet.dev/definition.txt?path=lawful-fields@0.1.1.0/proof_list.bend&name=ends_join