def bx.rword
bend-osdev-mode-core@0.1.0.0 · PROOF.bend:670
import bend-osdev-mode-core@0.1.0.0/PROOF.bend as PROOF
import Base
670def bx.rword(n: Nat, a: Word(n), b: Word(n)) -> {Word.xor(n, Word.xor(n, a, b), b) == a : Word(n)}:
671 match n:
672 case 0n:
673 match a:
674 case WNil{}:
675 {==}
676 case 1n+p:
677 match a b:
678 case WCon{ah, at} WCon{bh, bt}:
679 %bx.rbool(ah, bh) : {WCon{Bool.xor(Bool.xor(ah, bh), bh), Word.xor(p, Word.xor(p, at, bt), bt)} == WCon{_, at} : Word(1n+p)}
680 %bx.rword(p, at, bt) : {WCon{Bool.xor(Bool.xor(ah, bh), bh), Word.xor(p, Word.xor(p, at, bt), bt)} == WCon{Bool.xor(Bool.xor(ah, bh), bh), _} : Word(1n+p)}
681 {==}