def xor_swap4
bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/aes/gf.bend:130
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/aes/gf.bend as Gf
import Base
130def xor_swap4(+n: Nat, +a: Word(n), +b: Word(n), +c: Word(n), +d: Word(n)) -> {Word.xor(n, Word.xor(n, a, b), Word.xor(n, c, d)) == Word.xor(n, Word.xor(n, a, c), Word.xor(n, b, d)) : Word(n)}:
131 match n a b c d:
132 case 0n WNil{} WNil{} WNil{} WNil{}:
133 {==}
134 case 1n+p WCon{x, s} WCon{y, t} WCon{z, u} WCon{w, v}:
135 %xor_swap4(p, s, t, u, v) : {WCon{Bool.xor(Bool.xor(x, y), Bool.xor(z, w)), Word.xor(p, Word.xor(p, s, t), Word.xor(p, u, v))} == WCon{Bool.xor(Bool.xor(x, z), Bool.xor(y, w)), _} : Word(1n+p)}
136 %bswap4(x, y, z, w) : {WCon{Bool.xor(Bool.xor(x, y), Bool.xor(z, w)), Word.xor(p, Word.xor(p, s, t), Word.xor(p, u, v))} == WCon{_, Word.xor(p, Word.xor(p, s, t), Word.xor(p, u, v))} : Word(1n+p)}
137 {==}