ProofSame.lists_step: law of lawful-bytes@0.1.1.0 Import: import lawful-bytes@0.1.1.0/proof_same.bend as ProofSame Lines 425-443 of lawful-bytes@0.1.1.0/proof_same.bend: https://jend.leeeet.dev/read.txt?path=lawful-bytes@0.1.1.0/proof_same.bend&start_line=425&end_line=443 import Base import lawful-bytes@0.1.1.0/defs.bend as D # One step of a comparison loop: the two slices from x and y, with the # accumulated test rebracketed. law lists_step: for +acc: Bool for +xs: List<&2, U32> for +ys: List<&2, U32> for +i: Nat for +j: Nat for +i1: U32 for +j1: U32 for +k: Nat for +x: U32 for +y: U32 for +hx: {List.get(&2, U32, xs, i) == Some{x} : Maybe<&2, U32>} for +hy: {List.get(&2, U32, ys, j) == Some{y} : Maybe<&2, U32>} for +ei: {U32.to_nat(i1) == Nat.add(i, 1n) : Nat} for +ej: {U32.to_nat(j1) == Nat.add(j, 1n) : Nat} {Bool.and(Bool.and(acc, U32.is_eq(x, y)), D.list_eq(D.slice(xs, U32.to_nat(i1), k), D.slice(ys, U32.to_nat(j1), k))) == Bool.and(acc, D.list_eq(D.slice(xs, i, 1n+k), D.slice(ys, j, 1n+k))) : Bool} Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym 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=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=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/defs.bend&name=list_eq https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/defs.bend&name=slice https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/proof_same.bend&name=and_assoc https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/proof_same.bend&name=slice_cons