PROOFTables.tb.rlen: def of bend-osdev-acpi@0.1.1.0 Import: import bend-osdev-acpi@0.1.1.0/PROOF_tables.bend as PROOFTables Lines 308-317 of bend-osdev-acpi@0.1.1.0/PROOF_tables.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-acpi@0.1.1.0/PROOF_tables.bend&start_line=308&end_line=317 import Base import bend-osdev-word64@0.1.1.0/word64.bend as W 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-acpi@0.1.1.0/rsdt.bend as R def tb.rlen(+xs: List<&2, W.W64>) -> {Nat.mul(List.length(&2, W.W64, xs), 4n) == B.Octets.len(B.Octets.concat(R.sl.enc(xs, False{}))) : Nat}: match xs: case Nil{}: {==} case Con{x, t}: %Equal.sym(B.Octets, B.Octets.concat(Con{B.Octets.le32(W.W64.lo(x)), R.sl.enc(t, False{})}), B.Octets.append(B.Octets.le32(W.W64.lo(x)), B.Octets.concat(R.sl.enc(t, False{}))), BL.octets_concat_cons(B.Octets.le32(W.W64.lo(x)), R.sl.enc(t, False{}))) : {Nat.mul(List.length(&2, W.W64, Con{x, t}), 4n) == B.Octets.len(_) : Nat} %tb.la(B.Octets.le32(W.W64.lo(x)), B.Octets.concat(R.sl.enc(t, False{}))) : {Nat.mul(List.length(&2, W.W64, Con{x, t}), 4n) == _ : Nat} %Equal.sym(Nat, B.Octets.len(B.Octets.le32(W.W64.lo(x))), 4n, BL.octets_len_le32(W.W64.lo(x))) : {Nat.mul(List.length(&2, W.W64, Con{x, t}), 4n) == Nat.add(_, B.Octets.len(B.Octets.concat(R.sl.enc(t, False{})))) : Nat} %tb.rlen(t) : {Nat.mul(List.length(&2, W.W64, Con{x, t}), 4n) == Nat.add(4n, _) : Nat} {==} Uses (18): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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.length 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.mul https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/PROOF_tables.bend&name=tb.la https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/rsdt.bend&name=sl.enc https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/LAWS.bend&name=octets_concat_cons https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/LAWS.bend&name=octets_len_le32 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.concat https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.0/bytes.bend&name=Octets.le32 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-word64@0.1.1.0/word64.bend&name=W64 https://jend.leeeet.dev/definition.txt?path=bend-osdev-word64@0.1.1.0/word64.bend&name=W64.lo