def bx.word

bend-osdev-cbc@0.1.0.0 · PROOF.bend:65

import bend-osdev-cbc@0.1.0.0/PROOF.bend as PROOF
import Base

65def bx.word(n: Nat, a: Word(n), b: Word(n)) -> {Word.xor(n, a, Word.xor(n, a, b)) == b : Word(n)}:
66  match n:
67    case 0n:
68      match b:
69        case WNil{}:
70          {==}
71    case 1n+p:
72      match a b:
73        case WCon{ah, at} WCon{bh, bt}:
74          %bx.bool(ah, bh) : {WCon{Bool.xor(ah, Bool.xor(ah, bh)), Word.xor(p, at, Word.xor(p, at, bt))} == WCon{_, bt} : Word(1n+p)}
75          %bx.word(p, at, bt) : {WCon{Bool.xor(ah, Bool.xor(ah, bh)), Word.xor(p, at, Word.xor(p, at, bt))} == WCon{Bool.xor(ah, Bool.xor(ah, bh)), _} : Word(1n+p)}
76          {==}

Uses (7)

Used by (1)