PROOF.ar.valid: def of bend-osdev-caps@0.1.0.0 Import: import bend-osdev-caps@0.1.0.0/PROOF.bend as PROOF Lines 937-946 of bend-osdev-caps@0.1.0.0/PROOF.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-caps@0.1.0.0/PROOF.bend&start_line=937&end_line=946 import Base import bend-osdev-caps@0.1.0.0/caps.bend as C import bend-osdev-caps@0.1.0.0/adjust.bend as A def ar.valid(+v: Bool, +lk: Bool, +al: Bool, +c: C.CapCred, +x: U32) -> {A.CapAdjust.ambient.allowed(c, x) == al : Bool} -> {C.CapState.valid(C.CapCred.sets(c)) == True{} : Bool} -> {C.CapState.valid(C.CapCred.sets(C.Caps.or(A.CapAdjust.ambient_raise.go(v, lk, al, c, x), c))) == True{} : Bool}: match v lk al c: case False{} lk al c: h => hv => hv case True{} True{} al c: h => hv => hv case True{} False{} False{} c: h => hv => hv case True{} False{} True{} C.CapCred{r, eu, sv, nr, na, C.CapState{+p, +i, +e, +b, +a}}: +h => +hv => bool.and3(C.CapSet.subset(e, p), C.CapSet.subset(C.CapSet.union(a, C.CapSet.of(x)), p), C.CapSet.subset(C.CapSet.union(a, C.CapSet.of(x)), i))(valid.ep(C.CapState{p, i, e, b, a})(hv))(set.lub(a, C.CapSet.of(x), p)(valid.ap(C.CapState{p, i, e, b, a})(hv))(caps.has_of(C.Cap.valid(x), p, x)(bool.and_l(C.CapSet.has(p, x), C.CapSet.has(i, x))(h))))(set.lub(a, C.CapSet.of(x), i)(valid.ai(C.CapState{p, i, e, b, a})(hv))(caps.has_of(C.Cap.valid(x), i, x)(bool.and_r(C.CapSet.has(p, x), C.CapSet.has(i, x))(h)))) Uses (22): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/PROOF.bend&name=bool.and3 https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/PROOF.bend&name=bool.and_l https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/PROOF.bend&name=bool.and_r https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/PROOF.bend&name=caps.has_of https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/PROOF.bend&name=set.lub https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/PROOF.bend&name=valid.ai https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/PROOF.bend&name=valid.ap https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/PROOF.bend&name=valid.ep https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/adjust.bend&name=CapAdjust.ambient.allowed https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/adjust.bend&name=CapAdjust.ambient_raise.go https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/caps.bend&name=Cap.valid https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/caps.bend&name=CapCred https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/caps.bend&name=CapCred.sets https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/caps.bend&name=CapSet.has https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/caps.bend&name=CapSet.of https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/caps.bend&name=CapSet.subset https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/caps.bend&name=CapSet.union https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/caps.bend&name=CapState https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/caps.bend&name=CapState.valid https://jend.leeeet.dev/definition.txt?path=bend-osdev-caps@0.1.0.0/caps.bend&name=Caps.or