PROOFWhole.ckw.chk: def of bend-osdev-acpi@0.1.2.0 Import: import bend-osdev-acpi@0.1.2.0/PROOF_whole.bend as PROOFWhole Lines 185-194 of bend-osdev-acpi@0.1.2.0/PROOF_whole.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-acpi@0.1.2.0/PROOF_whole.bend&start_line=185&end_line=194 import Base import bend-osdev-bytes@0.1.1.1/bytes.bend as B import bend-osdev-bytes@0.1.1.1/LAWS.bend as BL import bend-osdev-u32@0.1.0.0/LAWS.bend as UL import bend-osdev-u32@0.1.0.0/LAWS_order.bend as UO import bend-osdev-acpi@0.1.2.0/error.bend as E import bend-osdev-acpi@0.1.2.0/header.bend as H import bend-osdev-acpi@0.1.2.0/checksum.bend as C import bend-osdev-acpi@0.1.2.0/PROOF_tables.bend as TP def ckw.chk(+s: B.Octets, +r: U32, +k: U32, +o: B.Octets, +t: B.Octets, +orv: U32, +ci: B.Octets, +cr: U32, +sig4: {B.Octets.len(s) == 4n : Nat}, +oem6: {B.Octets.len(o) == 6n : Nat}, +tid8: {B.Octets.len(t) == 8n : Nat}, +cid4: {B.Octets.len(ci) == 4n : Nat}, +body: B.Octets, +z: U32, +fit: {Nat.is_le(Nat.add(36n, B.Octets.len(body)), U32.to_nat(z)) == True{} : Bool}, +okq: {C.AcpiChecksum.ok(B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)) == True{} : Bool}) -> {H.AcpiSdt.check(B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)) == Done{B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)} : Result<&2, &2, E.AcpiError, B.Octets>}: %Equal.sym(Maybe<&2, U32>, B.Octets.le32_at(B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body), 4n), Some{U32.from_nat(Nat.add(36n, B.Octets.len(body)))}, ckw.p1(s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr, sig4, body)) : {H.sdt.c1(_, B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)) == Done{B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)} : Result<&2, &2, E.AcpiError, B.Octets>} %Equal.sym(Nat, U32.to_nat(U32.from_nat(Nat.add(36n, B.Octets.len(body)))), Nat.add(36n, B.Octets.len(body)), ckw.fnv(Nat.add(36n, B.Octets.len(body)), z, fit)) : {H.sdt.c2(Bool.and(Nat.is_le(36n, _), Nat.is_le(_, B.Octets.len(B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)))), U32.from_nat(Nat.add(36n, B.Octets.len(body))), B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)) == Done{B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)} : Result<&2, &2, E.AcpiError, B.Octets>} %TP.tb.lenchk(s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr, sig4, oem6, tid8, cid4, body) : {H.sdt.c2(Bool.and(Nat.is_le(36n, Nat.add(36n, B.Octets.len(body))), Nat.is_le(Nat.add(36n, B.Octets.len(body)), _)), U32.from_nat(Nat.add(36n, B.Octets.len(body))), B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)) == Done{B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)} : Result<&2, &2, E.AcpiError, B.Octets>} %Equal.sym(Bool, Nat.is_le(36n, Nat.add(36n, B.Octets.len(body))), True{}, UO.nat_le_add_r(36n, B.Octets.len(body))) : {H.sdt.c2(Bool.and(_, Nat.is_le(Nat.add(36n, B.Octets.len(body)), Nat.add(36n, B.Octets.len(body)))), U32.from_nat(Nat.add(36n, B.Octets.len(body))), B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)) == Done{B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)} : Result<&2, &2, E.AcpiError, B.Octets>} %Equal.sym(Bool, Nat.is_le(Nat.add(36n, B.Octets.len(body)), Nat.add(36n, B.Octets.len(body))), True{}, UL.nat_le_refl(Nat.add(36n, B.Octets.len(body)))) : {H.sdt.c2(Bool.and(True{}, _), U32.from_nat(Nat.add(36n, B.Octets.len(body))), B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)) == Done{B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)} : Result<&2, &2, E.AcpiError, B.Octets>} %Equal.trans(Nat, B.Octets.len(B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)), Nat.add(36n, B.Octets.len(body)), U32.to_nat(U32.from_nat(Nat.add(36n, B.Octets.len(body)))), Equal.sym(Nat, Nat.add(36n, B.Octets.len(body)), B.Octets.len(B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)), TP.tb.lenchk(s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr, sig4, oem6, tid8, cid4, body)), Equal.sym(Nat, U32.to_nat(U32.from_nat(Nat.add(36n, B.Octets.len(body)))), Nat.add(36n, B.Octets.len(body)), ckw.fnv(Nat.add(36n, B.Octets.len(body)), z, fit))) : {H.sdt.c3(C.AcpiChecksum.ok(B.Octets.take(_, B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body))), B.Octets.take(_, B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body))) == Done{B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)} : Result<&2, &2, E.AcpiError, B.Octets>} %Equal.sym(B.Octets, B.Octets.take(B.Octets.len(B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)), B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)), B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body), BL.octets_take_len(B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body))) : {H.sdt.c3(C.AcpiChecksum.ok(_), _) == Done{B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)} : Result<&2, &2, E.AcpiError, B.Octets>} %Equal.sym(Bool, C.AcpiChecksum.ok(B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)), True{}, okq) : {H.sdt.c3(_, B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)) == Done{B.Octets.append(H.AcpiHeader.encode(H.AcpiHeader{s, U32.from_nat(Nat.add(36n, B.Octets.len(body))), r, k, o, t, orv, ci, cr}), body)} : Result<&2, &2, E.AcpiError, B.Octets>} {==} Uses (31): 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=Equal.trans 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_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.from_nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.2.0/PROOF_tables.bend&name=tb.lenchk https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.2.0/PROOF_whole.bend&name=ckw.fnv https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.2.0/PROOF_whole.bend&name=ckw.p1 https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.2.0/checksum.bend&name=AcpiChecksum.ok https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.2.0/error.bend&name=AcpiError https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.2.0/header.bend&name=AcpiHeader https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.2.0/header.bend&name=AcpiHeader.encode https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.2.0/header.bend&name=AcpiSdt.check https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.2.0/header.bend&name=sdt.c1 https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.2.0/header.bend&name=sdt.c2 https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.2.0/header.bend&name=sdt.c3 https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.1/LAWS.bend&name=octets_take_len https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.1/bytes.bend&name=Octets https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.1/bytes.bend&name=Octets.append https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.1/bytes.bend&name=Octets.le32_at https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.1/bytes.bend&name=Octets.len https://jend.leeeet.dev/definition.txt?path=bend-osdev-bytes@0.1.1.1/bytes.bend&name=Octets.take https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/LAWS.bend&name=nat_le_refl https://jend.leeeet.dev/definition.txt?path=bend-osdev-u32@0.1.0.0/LAWS_order.bend&name=nat_le_add_r