PROOF.pk.len: def of bend-osdev-pkcs7@0.1.0.0 Import: import bend-osdev-pkcs7@0.1.0.0/PROOF.bend as PROOF Lines 1332-1337 of bend-osdev-pkcs7@0.1.0.0/PROOF.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-pkcs7@0.1.0.0/PROOF.bend&start_line=1332&end_line=1337 import Base import bend-osdev-bytes@0.1.1.0/bytes.bend as B import bend-osdev-bytes@0.1.1.0/LAWS.bend as BL import bend-osdev-pkcs7@0.1.0.0/pkcs7.bend as P import bend-osdev-u32@0.1.0.0/LAWS.bend as UL # the padded message's length def pk.len(+m: B.Octets, +p1: Nat) -> {B.Octets.len(B.Octets.append(m, pk.pad(p1))) == 1n+Nat.add(B.Octets.len(m), p1) : Nat}: %Equal.sym(Nat, B.Octets.len(B.Octets.append(m, pk.pad(p1))), Nat.add(B.Octets.len(m), B.Octets.len(pk.pad(p1))), BL.octets_len_append(m, pk.pad(p1))) : {_ == 1n+Nat.add(B.Octets.len(m), p1) : Nat} %Equal.sym(Nat, B.Octets.len(pk.pad(p1)), B.len(P.pkcs7.fill(1n+p1, U32.from_nat(1n+p1))), BL.octets_len_of_list(P.pkcs7.fill(1n+p1, U32.from_nat(1n+p1)))) : {Nat.add(B.Octets.len(m), _) == 1n+Nat.add(B.Octets.len(m), p1) : Nat} %Equal.sym(Nat, B.len(P.pkcs7.fill(1n+p1, U32.from_nat(1n+p1))), 1n+p1, pk.fill_len(1n+p1, U32.from_nat(1n+p1))) : {Nat.add(B.Octets.len(m), _) == 1n+Nat.add(B.Octets.len(m), p1) : Nat} UL.nat_add_succ(B.Octets.len(m), p1) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym 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.from_nat https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/LAWS.bend&name=octets_len_append https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/LAWS.bend&name=octets_len_of_list https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.append https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.len https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=len https://jend.leeeet.dev/definition.txt?path=bend-osdev-pkcs7@0.1.0.0/PROOF.bend&name=pk.fill_len https://jend.leeeet.dev/definition.txt?path=bend-osdev-pkcs7@0.1.0.0/PROOF.bend&name=pk.pad https://jend.leeeet.dev/definition.txt?path=bend-osdev-pkcs7@0.1.0.0/pkcs7.bend&name=pkcs7.fill https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/LAWS.bend&name=nat_add_succ