import Base import bend-osdev-bytes@0.1.0.0/bytes.bend as B import bend-osdev-bytes@0.1.0.0/LAWS.bend as BL import bend-osdev-bytes@0.1.0.0/PROOF.bend as BP import bend-osdev-cipher-modes@0.1.0.0/cipher_modes.bend as M import ./legacy_ciphers.bend as L import ./des.bend as D import ./tdes.bend as T import ./sm4.bend as S import ./camellia.bend as C import ./serpent.bend as P import ./twofish.bend as F import ./rc4.bend as R import ./modes64.bend as X import ./aria.bend as A import ./cast6.bend as C6 import ./blowfish.bend as BF import ./cast5.bend as C5 import ./tea.bend as TE import ./xtea.bend as XT import ./fcrypt.bend as FC import ./LAWS.bend as Laws # XOR undone: a == (a xor b) xor b, for every bit, word and block. Each lemma # is stated simple side first, the form a rewrite (%e : P) takes. def bool_xx(a: Bool, b: Bool) -> {a == Bool.xor(Bool.xor(a, b), b) : Bool}: match a b: case True{} True{}: {==} case True{} False{}: {==} case False{} True{}: {==} case False{} False{}: {==} def word_xx(n: Nat, a: Word(n), b: Word(n)) -> {a == Word.xor(n, Word.xor(n, a, b), b) : Word(n)}: match n: case 0n: match a b: case WNil{} WNil{}: {==} case 1n+p: match a b: case WCon{ah, at} WCon{bh, bt}: %bool_xx(ah, bh) : {WCon{ah, at} == WCon{_, Word.xor(p, Word.xor(p, at, bt), bt)} : Word(1n+p)} %word_xx(p, at, bt) : {WCon{ah, at} == WCon{ah, _} : Word(1n+p)} {==} def u32_xx(a: U32, b: U32) -> {a == U32.xor(U32.xor(a, b), b) : U32}: match a b: case U32{x} U32{y}: %word_xx(32n, x, y) : {U32{x} == U32{_} : U32} {==} def block_xx(s: M.CmBlock, k: M.CmBlock) -> {s == M.CmBlock.xor(M.CmBlock.xor(s, k), k) : M.CmBlock}: match s k: case M.CmBlock{+a0, +a1, +a2, +a3} M.CmBlock{+b0, +b1, +b2, +b3}: %u32_xx(a0, b0) : {M.CmBlock{a0, a1, a2, a3} == M.CmBlock{_, U32.xor(U32.xor(a1, b1), b1), U32.xor(U32.xor(a2, b2), b2), U32.xor(U32.xor(a3, b3), b3)} : M.CmBlock} %u32_xx(a1, b1) : {M.CmBlock{a0, a1, a2, a3} == M.CmBlock{a0, _, U32.xor(U32.xor(a2, b2), b2), U32.xor(U32.xor(a3, b3), b3)} : M.CmBlock} %u32_xx(a2, b2) : {M.CmBlock{a0, a1, a2, a3} == M.CmBlock{a0, a1, _, U32.xor(U32.xor(a3, b3), b3)} : M.CmBlock} %u32_xx(a3, b3) : {M.CmBlock{a0, a1, a2, a3} == M.CmBlock{a0, a1, a2, _} : M.CmBlock} {==} # BEGIN GENERATED by gen/proof.py: bits # Rotations and byte swaps undone, for every word: computed on its 32 bits def rot_1_31(x: U32) -> {x == L.lc.rotl1.bits(L.lc.rotl31.bits(x)) : U32}: match x: case U32{WCon{a0, WCon{a1, WCon{a2, WCon{a3, WCon{a4, WCon{a5, WCon{a6, WCon{a7, WCon{a8, WCon{a9, WCon{a10, WCon{a11, WCon{a12, WCon{a13, WCon{a14, WCon{a15, WCon{a16, WCon{a17, WCon{a18, WCon{a19, WCon{a20, WCon{a21, WCon{a22, WCon{a23, WCon{a24, WCon{a25, WCon{a26, WCon{a27, WCon{a28, WCon{a29, WCon{a30, WCon{a31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}: {==} def rot_31_1(x: U32) -> {x == L.lc.rotl31.bits(L.lc.rotl1.bits(x)) : U32}: match x: case U32{WCon{a0, WCon{a1, WCon{a2, WCon{a3, WCon{a4, WCon{a5, WCon{a6, WCon{a7, WCon{a8, WCon{a9, WCon{a10, WCon{a11, WCon{a12, WCon{a13, WCon{a14, WCon{a15, WCon{a16, WCon{a17, WCon{a18, WCon{a19, WCon{a20, WCon{a21, WCon{a22, WCon{a23, WCon{a24, WCon{a25, WCon{a26, WCon{a27, WCon{a28, WCon{a29, WCon{a30, WCon{a31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}: {==} def rot_19_13(x: U32) -> {x == L.lc.rotl19.bits(L.lc.rotl13.bits(x)) : U32}: match x: case U32{WCon{a0, WCon{a1, WCon{a2, WCon{a3, WCon{a4, WCon{a5, WCon{a6, WCon{a7, WCon{a8, WCon{a9, WCon{a10, WCon{a11, WCon{a12, WCon{a13, WCon{a14, WCon{a15, WCon{a16, WCon{a17, WCon{a18, WCon{a19, WCon{a20, WCon{a21, WCon{a22, WCon{a23, WCon{a24, WCon{a25, WCon{a26, WCon{a27, WCon{a28, WCon{a29, WCon{a30, WCon{a31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}: {==} def rot_13_19(x: U32) -> {x == L.lc.rotl13.bits(L.lc.rotl19.bits(x)) : U32}: match x: case U32{WCon{a0, WCon{a1, WCon{a2, WCon{a3, WCon{a4, WCon{a5, WCon{a6, WCon{a7, WCon{a8, WCon{a9, WCon{a10, WCon{a11, WCon{a12, WCon{a13, WCon{a14, WCon{a15, WCon{a16, WCon{a17, WCon{a18, WCon{a19, WCon{a20, WCon{a21, WCon{a22, WCon{a23, WCon{a24, WCon{a25, WCon{a26, WCon{a27, WCon{a28, WCon{a29, WCon{a30, WCon{a31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}: {==} def rot_29_3(x: U32) -> {x == L.lc.rotl29.bits(L.lc.rotl3.bits(x)) : U32}: match x: case U32{WCon{a0, WCon{a1, WCon{a2, WCon{a3, WCon{a4, WCon{a5, WCon{a6, WCon{a7, WCon{a8, WCon{a9, WCon{a10, WCon{a11, WCon{a12, WCon{a13, WCon{a14, WCon{a15, WCon{a16, WCon{a17, WCon{a18, WCon{a19, WCon{a20, WCon{a21, WCon{a22, WCon{a23, WCon{a24, WCon{a25, WCon{a26, WCon{a27, WCon{a28, WCon{a29, WCon{a30, WCon{a31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}: {==} def rot_3_29(x: U32) -> {x == L.lc.rotl3.bits(L.lc.rotl29.bits(x)) : U32}: match x: case U32{WCon{a0, WCon{a1, WCon{a2, WCon{a3, WCon{a4, WCon{a5, WCon{a6, WCon{a7, WCon{a8, WCon{a9, WCon{a10, WCon{a11, WCon{a12, WCon{a13, WCon{a14, WCon{a15, WCon{a16, WCon{a17, WCon{a18, WCon{a19, WCon{a20, WCon{a21, WCon{a22, WCon{a23, WCon{a24, WCon{a25, WCon{a26, WCon{a27, WCon{a28, WCon{a29, WCon{a30, WCon{a31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}: {==} def rot_25_7(x: U32) -> {x == L.lc.rotl25.bits(L.lc.rotl7.bits(x)) : U32}: match x: case U32{WCon{a0, WCon{a1, WCon{a2, WCon{a3, WCon{a4, WCon{a5, WCon{a6, WCon{a7, WCon{a8, WCon{a9, WCon{a10, WCon{a11, WCon{a12, WCon{a13, WCon{a14, WCon{a15, WCon{a16, WCon{a17, WCon{a18, WCon{a19, WCon{a20, WCon{a21, WCon{a22, WCon{a23, WCon{a24, WCon{a25, WCon{a26, WCon{a27, WCon{a28, WCon{a29, WCon{a30, WCon{a31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}: {==} def rot_7_25(x: U32) -> {x == L.lc.rotl7.bits(L.lc.rotl25.bits(x)) : U32}: match x: case U32{WCon{a0, WCon{a1, WCon{a2, WCon{a3, WCon{a4, WCon{a5, WCon{a6, WCon{a7, WCon{a8, WCon{a9, WCon{a10, WCon{a11, WCon{a12, WCon{a13, WCon{a14, WCon{a15, WCon{a16, WCon{a17, WCon{a18, WCon{a19, WCon{a20, WCon{a21, WCon{a22, WCon{a23, WCon{a24, WCon{a25, WCon{a26, WCon{a27, WCon{a28, WCon{a29, WCon{a30, WCon{a31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}: {==} def rot_27_5(x: U32) -> {x == L.lc.rotl27.bits(L.lc.rotl5.bits(x)) : U32}: match x: case U32{WCon{a0, WCon{a1, WCon{a2, WCon{a3, WCon{a4, WCon{a5, WCon{a6, WCon{a7, WCon{a8, WCon{a9, WCon{a10, WCon{a11, WCon{a12, WCon{a13, WCon{a14, WCon{a15, WCon{a16, WCon{a17, WCon{a18, WCon{a19, WCon{a20, WCon{a21, WCon{a22, WCon{a23, WCon{a24, WCon{a25, WCon{a26, WCon{a27, WCon{a28, WCon{a29, WCon{a30, WCon{a31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}: {==} def rot_5_27(x: U32) -> {x == L.lc.rotl5.bits(L.lc.rotl27.bits(x)) : U32}: match x: case U32{WCon{a0, WCon{a1, WCon{a2, WCon{a3, WCon{a4, WCon{a5, WCon{a6, WCon{a7, WCon{a8, WCon{a9, WCon{a10, WCon{a11, WCon{a12, WCon{a13, WCon{a14, WCon{a15, WCon{a16, WCon{a17, WCon{a18, WCon{a19, WCon{a20, WCon{a21, WCon{a22, WCon{a23, WCon{a24, WCon{a25, WCon{a26, WCon{a27, WCon{a28, WCon{a29, WCon{a30, WCon{a31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}: {==} def rot_10_22(x: U32) -> {x == L.lc.rotl10.bits(L.lc.rotl22.bits(x)) : U32}: match x: case U32{WCon{a0, WCon{a1, WCon{a2, WCon{a3, WCon{a4, WCon{a5, WCon{a6, WCon{a7, WCon{a8, WCon{a9, WCon{a10, WCon{a11, WCon{a12, WCon{a13, WCon{a14, WCon{a15, WCon{a16, WCon{a17, WCon{a18, WCon{a19, WCon{a20, WCon{a21, WCon{a22, WCon{a23, WCon{a24, WCon{a25, WCon{a26, WCon{a27, WCon{a28, WCon{a29, WCon{a30, WCon{a31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}: {==} def rot_22_10(x: U32) -> {x == L.lc.rotl22.bits(L.lc.rotl10.bits(x)) : U32}: match x: case U32{WCon{a0, WCon{a1, WCon{a2, WCon{a3, WCon{a4, WCon{a5, WCon{a6, WCon{a7, WCon{a8, WCon{a9, WCon{a10, WCon{a11, WCon{a12, WCon{a13, WCon{a14, WCon{a15, WCon{a16, WCon{a17, WCon{a18, WCon{a19, WCon{a20, WCon{a21, WCon{a22, WCon{a23, WCon{a24, WCon{a25, WCon{a26, WCon{a27, WCon{a28, WCon{a29, WCon{a30, WCon{a31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}: {==} def bswap2(x: U32) -> {x == L.lc.bswap.bits(L.lc.bswap.bits(x)) : U32}: match x: case U32{WCon{a0, WCon{a1, WCon{a2, WCon{a3, WCon{a4, WCon{a5, WCon{a6, WCon{a7, WCon{a8, WCon{a9, WCon{a10, WCon{a11, WCon{a12, WCon{a13, WCon{a14, WCon{a15, WCon{a16, WCon{a17, WCon{a18, WCon{a19, WCon{a20, WCon{a21, WCon{a22, WCon{a23, WCon{a24, WCon{a25, WCon{a26, WCon{a27, WCon{a28, WCon{a29, WCon{a30, WCon{a31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}: {==} # DES's IP and IP^-1 undo each other, computed on the block's 64 bits def des_ip_fp(h: D.LcDesHalves) -> {h == D.des.ip(D.des.fp(h)) : D.LcDesHalves}: match h: case D.LcDesHalves{U32{WCon{a0, WCon{a1, WCon{a2, WCon{a3, WCon{a4, WCon{a5, WCon{a6, WCon{a7, WCon{a8, WCon{a9, WCon{a10, WCon{a11, WCon{a12, WCon{a13, WCon{a14, WCon{a15, WCon{a16, WCon{a17, WCon{a18, WCon{a19, WCon{a20, WCon{a21, WCon{a22, WCon{a23, WCon{a24, WCon{a25, WCon{a26, WCon{a27, WCon{a28, WCon{a29, WCon{a30, WCon{a31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}, U32{WCon{b0, WCon{b1, WCon{b2, WCon{b3, WCon{b4, WCon{b5, WCon{b6, WCon{b7, WCon{b8, WCon{b9, WCon{b10, WCon{b11, WCon{b12, WCon{b13, WCon{b14, WCon{b15, WCon{b16, WCon{b17, WCon{b18, WCon{b19, WCon{b20, WCon{b21, WCon{b22, WCon{b23, WCon{b24, WCon{b25, WCon{b26, WCon{b27, WCon{b28, WCon{b29, WCon{b30, WCon{b31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}: {==} def des_fp_ip(b: L.LcBlock64) -> {b == D.des.fp(D.des.ip(b)) : L.LcBlock64}: match b: case L.LcBlock64{U32{WCon{a0, WCon{a1, WCon{a2, WCon{a3, WCon{a4, WCon{a5, WCon{a6, WCon{a7, WCon{a8, WCon{a9, WCon{a10, WCon{a11, WCon{a12, WCon{a13, WCon{a14, WCon{a15, WCon{a16, WCon{a17, WCon{a18, WCon{a19, WCon{a20, WCon{a21, WCon{a22, WCon{a23, WCon{a24, WCon{a25, WCon{a26, WCon{a27, WCon{a28, WCon{a29, WCon{a30, WCon{a31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}, U32{WCon{b0, WCon{b1, WCon{b2, WCon{b3, WCon{b4, WCon{b5, WCon{b6, WCon{b7, WCon{b8, WCon{b9, WCon{b10, WCon{b11, WCon{b12, WCon{b13, WCon{b14, WCon{b15, WCon{b16, WCon{b17, WCon{b18, WCon{b19, WCon{b20, WCon{b21, WCon{b22, WCon{b23, WCon{b24, WCon{b25, WCon{b26, WCon{b27, WCon{b28, WCon{b29, WCon{b30, WCon{b31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}: {==} # the low byte of a XOR depends only on the low bytes def byte_xor_byte(z: U32, k: U32) -> {B.byte(U32.xor(z, k)) == B.byte(U32.xor(B.byte(z), k)) : U32}: match z k: case U32{WCon{a0, WCon{a1, WCon{a2, WCon{a3, WCon{a4, WCon{a5, WCon{a6, WCon{a7, WCon{a8, WCon{a9, WCon{a10, WCon{a11, WCon{a12, WCon{a13, WCon{a14, WCon{a15, WCon{a16, WCon{a17, WCon{a18, WCon{a19, WCon{a20, WCon{a21, WCon{a22, WCon{a23, WCon{a24, WCon{a25, WCon{a26, WCon{a27, WCon{a28, WCon{a29, WCon{a30, WCon{a31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} U32{WCon{b0, WCon{b1, WCon{b2, WCon{b3, WCon{b4, WCon{b5, WCon{b6, WCon{b7, WCon{b8, WCon{b9, WCon{b10, WCon{b11, WCon{b12, WCon{b13, WCon{b14, WCon{b15, WCon{b16, WCon{b17, WCon{b18, WCon{b19, WCon{b20, WCon{b21, WCon{b22, WCon{b23, WCon{b24, WCon{b25, WCon{b26, WCon{b27, WCon{b28, WCon{b29, WCon{b30, WCon{b31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}: {==} # a 64-bit block's bytes, masked and read back def blk_bytes(b: L.LcBlock64) -> {L.lc.block_of(B.mask(L.lc.block_bytes(b, Nil{}))) == Some{b} : Maybe<&2, L.LcBlock64>}: match b: case L.LcBlock64{U32{WCon{a0, WCon{a1, WCon{a2, WCon{a3, WCon{a4, WCon{a5, WCon{a6, WCon{a7, WCon{a8, WCon{a9, WCon{a10, WCon{a11, WCon{a12, WCon{a13, WCon{a14, WCon{a15, WCon{a16, WCon{a17, WCon{a18, WCon{a19, WCon{a20, WCon{a21, WCon{a22, WCon{a23, WCon{a24, WCon{a25, WCon{a26, WCon{a27, WCon{a28, WCon{a29, WCon{a30, WCon{a31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}, U32{WCon{c0, WCon{c1, WCon{c2, WCon{c3, WCon{c4, WCon{c5, WCon{c6, WCon{c7, WCon{c8, WCon{c9, WCon{c10, WCon{c11, WCon{c12, WCon{c13, WCon{c14, WCon{c15, WCon{c16, WCon{c17, WCon{c18, WCon{c19, WCon{c20, WCon{c21, WCon{c22, WCon{c23, WCon{c24, WCon{c25, WCon{c26, WCon{c27, WCon{c28, WCon{c29, WCon{c30, WCon{c31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}: {==} def blk8(hi: U32, lo: U32) -> {L.LcBlock64{hi, lo} == L.lc.block8(B.byte(L.lc.b0.bits(hi)), B.byte(L.lc.b1.bits(hi)), B.byte(L.lc.b2.bits(hi)), B.byte(L.lc.b3.bits(hi)), B.byte(L.lc.b0.bits(lo)), B.byte(L.lc.b1.bits(lo)), B.byte(L.lc.b2.bits(lo)), B.byte(L.lc.b3.bits(lo))) : L.LcBlock64}: match hi lo: case U32{WCon{a0, WCon{a1, WCon{a2, WCon{a3, WCon{a4, WCon{a5, WCon{a6, WCon{a7, WCon{a8, WCon{a9, WCon{a10, WCon{a11, WCon{a12, WCon{a13, WCon{a14, WCon{a15, WCon{a16, WCon{a17, WCon{a18, WCon{a19, WCon{a20, WCon{a21, WCon{a22, WCon{a23, WCon{a24, WCon{a25, WCon{a26, WCon{a27, WCon{a28, WCon{a29, WCon{a30, WCon{a31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} U32{WCon{c0, WCon{c1, WCon{c2, WCon{c3, WCon{c4, WCon{c5, WCon{c6, WCon{c7, WCon{c8, WCon{c9, WCon{c10, WCon{c11, WCon{c12, WCon{c13, WCon{c14, WCon{c15, WCon{c16, WCon{c17, WCon{c18, WCon{c19, WCon{c20, WCon{c21, WCon{c22, WCon{c23, WCon{c24, WCon{c25, WCon{c26, WCon{c27, WCon{c28, WCon{c29, WCon{c30, WCon{c31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}: {==} # END GENERATED: bits # DES: the swap is its own inverse, and a Feistel round is undone whatever f # is (IP and IP^-1 above) def des_swap2(h: D.LcDesHalves) -> {h == D.des.swap(D.des.swap(h)) : D.LcDesHalves}: match h: case D.LcDesHalves{l, r}: {==} def des_unstep_step(+k: D.LcDesRk, h: D.LcDesHalves) -> {h == D.des.unstep(k, D.des.step(k, h)) : D.LcDesHalves}: match h: case D.LcDesHalves{l, +r}: %u32_xx(l, D.des.f(k, r)) : {D.LcDesHalves{l, r} == D.LcDesHalves{_, r} : D.LcDesHalves} {==} def des_step_unstep(+k: D.LcDesRk, h: D.LcDesHalves) -> {h == D.des.step(k, D.des.unstep(k, h)) : D.LcDesHalves}: match h: case D.LcDesHalves{+a, b}: %u32_xx(b, D.des.f(k, a)) : {D.LcDesHalves{a, b} == D.LcDesHalves{a, _} : D.LcDesHalves} {==} def des_unrounds_rounds(ks: List<&2, D.LcDesRk>, +h: D.LcDesHalves) -> {h == D.des.unrounds(ks, D.des.rounds(ks, h)) : D.LcDesHalves}: match ks: case Nil{}: {==} case Con{+k, +t}: %des_unrounds_rounds(t, D.des.step(k, h)) : {h == D.des.unstep(k, _) : D.LcDesHalves} des_unstep_step(k, h) def des_rounds_unrounds(ks: List<&2, D.LcDesRk>, +h: D.LcDesHalves) -> {h == D.des.rounds(ks, D.des.unrounds(ks, h)) : D.LcDesHalves}: match ks: case Nil{}: {==} case Con{+k, +t}: %des_step_unstep(k, D.des.unrounds(t, h)) : {h == D.des.rounds(t, _) : D.LcDesHalves} des_rounds_unrounds(t, h) def Laws.des_round_trip(k, b): match k: case D.LcDesKey{+ks}: %des_ip_fp(D.des.swap(D.des.rounds(ks, D.des.ip(b)))) : {D.des.fp(D.des.unrounds(ks, D.des.swap(_))) == b : L.LcBlock64} %des_swap2(D.des.rounds(ks, D.des.ip(b))) : {D.des.fp(D.des.unrounds(ks, _)) == b : L.LcBlock64} %des_unrounds_rounds(ks, D.des.ip(b)) : {D.des.fp(_) == b : L.LcBlock64} Equal.sym(L.LcBlock64, b, D.des.fp(D.des.ip(b)), des_fp_ip(b)) def Laws.des_round_trip_dual(k, b): match k: case D.LcDesKey{+ks}: %des_ip_fp(D.des.unrounds(ks, D.des.swap(D.des.ip(b)))) : {D.des.fp(D.des.swap(D.des.rounds(ks, _))) == b : L.LcBlock64} %des_rounds_unrounds(ks, D.des.swap(D.des.ip(b))) : {D.des.fp(D.des.swap(_)) == b : L.LcBlock64} %des_swap2(D.des.ip(b)) : {D.des.fp(_) == b : L.LcBlock64} Equal.sym(L.LcBlock64, b, D.des.fp(D.des.ip(b)), des_fp_ip(b)) # Triple DES: from DES's two laws def des_rt(k: D.LcDesKey, +b: L.LcBlock64) -> {b == D.LcDes.decrypt(k, D.LcDes.encrypt(k, b)) : L.LcBlock64}: Equal.sym(L.LcBlock64, D.LcDes.decrypt(k, D.LcDes.encrypt(k, b)), b, Laws.des_round_trip(k, b)) def des_rt_dual(k: D.LcDesKey, +b: L.LcBlock64) -> {b == D.LcDes.encrypt(k, D.LcDes.decrypt(k, b)) : L.LcBlock64}: Equal.sym(L.LcBlock64, D.LcDes.encrypt(k, D.LcDes.decrypt(k, b)), b, Laws.des_round_trip_dual(k, b)) def Laws.tdes_round_trip(k, b): match k: case T.LcTdesKey{+k1, +k2, +k3}: %des_rt(k3, D.LcDes.decrypt(k2, D.LcDes.encrypt(k1, b))) : {D.LcDes.decrypt(k1, D.LcDes.encrypt(k2, _)) == b : L.LcBlock64} %des_rt_dual(k2, D.LcDes.encrypt(k1, b)) : {D.LcDes.decrypt(k1, _) == b : L.LcBlock64} Laws.des_round_trip(k1, b) def Laws.tdes_round_trip_dual(k, b): match k: case T.LcTdesKey{+k1, +k2, +k3}: %des_rt_dual(k1, D.LcDes.encrypt(k2, D.LcDes.decrypt(k3, b))) : {D.LcDes.encrypt(k3, D.LcDes.decrypt(k2, _)) == b : L.LcBlock64} %des_rt(k2, D.LcDes.decrypt(k3, b)) : {D.LcDes.encrypt(k3, _) == b : L.LcBlock64} Laws.des_round_trip_dual(k3, b) # SM4: a round is undone whatever T is; R is its own inverse def sm4_unstep_step(+tab: L.LcTab, +rk: U32, s: M.CmBlock) -> {s == S.sm4.unstep(tab, rk, S.sm4.step(tab, rk, s)) : M.CmBlock}: match s: case M.CmBlock{x0, +x1, +x2, +x3}: %u32_xx(x0, S.sm4.t(tab, U32.xor(U32.xor(U32.xor(x1, x2), x3), rk))) : {M.CmBlock{x0, x1, x2, x3} == M.CmBlock{_, x1, x2, x3} : M.CmBlock} {==} def sm4_step_unstep(+tab: L.LcTab, +rk: U32, s: M.CmBlock) -> {s == S.sm4.step(tab, rk, S.sm4.unstep(tab, rk, s)) : M.CmBlock}: match s: case M.CmBlock{+y0, +y1, +y2, y3}: %u32_xx(y3, S.sm4.t(tab, U32.xor(U32.xor(U32.xor(y0, y1), y2), rk))) : {M.CmBlock{y0, y1, y2, y3} == M.CmBlock{y0, y1, y2, _} : M.CmBlock} {==} def sm4_unrounds_rounds(+tab: L.LcTab, ks: List<&2, U32>, +s: M.CmBlock) -> {s == S.sm4.unrounds(tab, ks, S.sm4.rounds(tab, ks, s)) : M.CmBlock}: match ks: case Nil{}: {==} case Con{+k, +t}: %sm4_unrounds_rounds(tab, t, S.sm4.step(tab, k, s)) : {s == S.sm4.unstep(tab, k, _) : M.CmBlock} sm4_unstep_step(tab, k, s) def sm4_rounds_unrounds(+tab: L.LcTab, ks: List<&2, U32>, +s: M.CmBlock) -> {s == S.sm4.rounds(tab, ks, S.sm4.unrounds(tab, ks, s)) : M.CmBlock}: match ks: case Nil{}: {==} case Con{+k, +t}: %sm4_step_unstep(tab, k, S.sm4.unrounds(tab, t, s)) : {s == S.sm4.rounds(tab, t, _) : M.CmBlock} sm4_rounds_unrounds(tab, t, s) def sm4_rev2(s: M.CmBlock) -> {s == S.sm4.rev(S.sm4.rev(s)) : M.CmBlock}: match s: case M.CmBlock{a, b, c, d}: {==} def Laws.sm4_round_trip(k, b): match k: case S.LcSm4Key{+tab, +ks}: %sm4_rev2(S.sm4.rounds(tab, ks, b)) : {S.sm4.unrounds(tab, ks, _) == b : M.CmBlock} Equal.sym(M.CmBlock, b, S.sm4.unrounds(tab, ks, S.sm4.rounds(tab, ks, b)), sm4_unrounds_rounds(tab, ks, b)) def Laws.sm4_round_trip_dual(k, b): match k: case S.LcSm4Key{+tab, +ks}: %sm4_rounds_unrounds(tab, ks, S.sm4.rev(b)) : {S.sm4.rev(_) == b : M.CmBlock} Equal.sym(M.CmBlock, b, S.sm4.rev(S.sm4.rev(b)), sm4_rev2(b)) # Camellia: each step of the cipher is undone (FL by FL^-1 and back, the # rounds and whitening by XOR, whatever F is), so the list of steps is def cam_fl_inv(x: L.LcBlock64, k: L.LcBlock64) -> {x == C.cam.flinv(C.cam.fl(x, k), k) : L.LcBlock64}: match x k: case L.LcBlock64{+x1, +x2} L.LcBlock64{+k1, +k2}: %u32_xx(x1, U32.or(U32.xor(x2, L.lc.rotl(U32.and(x1, k1), 1n)), k2)) : {L.LcBlock64{x1, x2} == L.LcBlock64{_, U32.xor(U32.xor(x2, L.lc.rotl(U32.and(x1, k1), 1n)), L.lc.rotl(U32.and(_, k1), 1n))} : L.LcBlock64} %u32_xx(x2, L.lc.rotl(U32.and(x1, k1), 1n)) : {L.LcBlock64{x1, x2} == L.LcBlock64{x1, _} : L.LcBlock64} {==} def cam_flinv_inv(y: L.LcBlock64, k: L.LcBlock64) -> {y == C.cam.fl(C.cam.flinv(y, k), k) : L.LcBlock64}: match y k: case L.LcBlock64{+y1, +y2} L.LcBlock64{+k1, +k2}: %u32_xx(y2, L.lc.rotl(U32.and(U32.xor(y1, U32.or(y2, k2)), k1), 1n)) : {L.LcBlock64{y1, y2} == L.LcBlock64{U32.xor(U32.xor(y1, U32.or(y2, k2)), U32.or(_, k2)), _} : L.LcBlock64} %u32_xx(y1, U32.or(y2, k2)) : {L.LcBlock64{y1, y2} == L.LcBlock64{_, y2} : L.LcBlock64} {==} def cam_white(a: L.LcBlock64, b: L.LcBlock64, +s: M.CmBlock) -> {s == C.cam.white(a, b, C.cam.white(a, b, s)) : M.CmBlock}: match a b: case L.LcBlock64{+a0, +a1} L.LcBlock64{+b0, +b1}: block_xx(s, M.CmBlock{a0, a1, b0, b1}) def cam_f1(+t: C.LcCamTabs, +k: L.LcBlock64, s: M.CmBlock) -> {s == C.cam.unop(C.LcCamF1{t, k}, C.cam.op(C.LcCamF1{t, k}, s)) : M.CmBlock}: match s: case M.CmBlock{+s0, +s1, +s2, +s3}: %u32_xx(s2, C.cam.hi(C.cam.f(t, L.LcBlock64{s0, s1}, k))) : {M.CmBlock{s0, s1, s2, s3} == M.CmBlock{s0, s1, _, U32.xor(U32.xor(s3, C.cam.lo(C.cam.f(t, L.LcBlock64{s0, s1}, k))), C.cam.lo(C.cam.f(t, L.LcBlock64{s0, s1}, k)))} : M.CmBlock} %u32_xx(s3, C.cam.lo(C.cam.f(t, L.LcBlock64{s0, s1}, k))) : {M.CmBlock{s0, s1, s2, s3} == M.CmBlock{s0, s1, s2, _} : M.CmBlock} {==} def cam_f1d(+t: C.LcCamTabs, +k: L.LcBlock64, s: M.CmBlock) -> {s == C.cam.op(C.LcCamF1{t, k}, C.cam.unop(C.LcCamF1{t, k}, s)) : M.CmBlock}: match s: case M.CmBlock{+s0, +s1, +s2, +s3}: %u32_xx(s2, C.cam.hi(C.cam.f(t, L.LcBlock64{s0, s1}, k))) : {M.CmBlock{s0, s1, s2, s3} == M.CmBlock{s0, s1, _, U32.xor(U32.xor(s3, C.cam.lo(C.cam.f(t, L.LcBlock64{s0, s1}, k))), C.cam.lo(C.cam.f(t, L.LcBlock64{s0, s1}, k)))} : M.CmBlock} %u32_xx(s3, C.cam.lo(C.cam.f(t, L.LcBlock64{s0, s1}, k))) : {M.CmBlock{s0, s1, s2, s3} == M.CmBlock{s0, s1, s2, _} : M.CmBlock} {==} def cam_f2(+t: C.LcCamTabs, +k: L.LcBlock64, s: M.CmBlock) -> {s == C.cam.unop(C.LcCamF2{t, k}, C.cam.op(C.LcCamF2{t, k}, s)) : M.CmBlock}: match s: case M.CmBlock{+s0, +s1, +s2, +s3}: %u32_xx(s0, C.cam.hi(C.cam.f(t, L.LcBlock64{s2, s3}, k))) : {M.CmBlock{s0, s1, s2, s3} == M.CmBlock{_, U32.xor(U32.xor(s1, C.cam.lo(C.cam.f(t, L.LcBlock64{s2, s3}, k))), C.cam.lo(C.cam.f(t, L.LcBlock64{s2, s3}, k))), s2, s3} : M.CmBlock} %u32_xx(s1, C.cam.lo(C.cam.f(t, L.LcBlock64{s2, s3}, k))) : {M.CmBlock{s0, s1, s2, s3} == M.CmBlock{s0, _, s2, s3} : M.CmBlock} {==} def cam_f2d(+t: C.LcCamTabs, +k: L.LcBlock64, s: M.CmBlock) -> {s == C.cam.op(C.LcCamF2{t, k}, C.cam.unop(C.LcCamF2{t, k}, s)) : M.CmBlock}: match s: case M.CmBlock{+s0, +s1, +s2, +s3}: %u32_xx(s0, C.cam.hi(C.cam.f(t, L.LcBlock64{s2, s3}, k))) : {M.CmBlock{s0, s1, s2, s3} == M.CmBlock{_, U32.xor(U32.xor(s1, C.cam.lo(C.cam.f(t, L.LcBlock64{s2, s3}, k))), C.cam.lo(C.cam.f(t, L.LcBlock64{s2, s3}, k))), s2, s3} : M.CmBlock} %u32_xx(s1, C.cam.lo(C.cam.f(t, L.LcBlock64{s2, s3}, k))) : {M.CmBlock{s0, s1, s2, s3} == M.CmBlock{s0, _, s2, s3} : M.CmBlock} {==} def cam_fl_step(a: L.LcBlock64, b: L.LcBlock64, s: M.CmBlock) -> {s == C.cam.unop(C.LcCamFl{a, b}, C.cam.op(C.LcCamFl{a, b}, s)) : M.CmBlock}: match a b s: case L.LcBlock64{+a0, +a1} L.LcBlock64{+b0, +b1} M.CmBlock{+s0, +s1, +s2, +s3}: %cam_fl_inv(L.LcBlock64{s0, s1}, L.LcBlock64{a0, a1}) : {M.CmBlock{s0, s1, s2, s3} == M.CmBlock{C.cam.hi(_), C.cam.lo(_), C.cam.hi(C.cam.fl(C.cam.flinv(L.LcBlock64{s2, s3}, L.LcBlock64{b0, b1}), L.LcBlock64{b0, b1})), C.cam.lo(C.cam.fl(C.cam.flinv(L.LcBlock64{s2, s3}, L.LcBlock64{b0, b1}), L.LcBlock64{b0, b1}))} : M.CmBlock} %cam_flinv_inv(L.LcBlock64{s2, s3}, L.LcBlock64{b0, b1}) : {M.CmBlock{s0, s1, s2, s3} == M.CmBlock{s0, s1, C.cam.hi(_), C.cam.lo(_)} : M.CmBlock} {==} def cam_fl_step_dual(a: L.LcBlock64, b: L.LcBlock64, s: M.CmBlock) -> {s == C.cam.op(C.LcCamFl{a, b}, C.cam.unop(C.LcCamFl{a, b}, s)) : M.CmBlock}: match a b s: case L.LcBlock64{+a0, +a1} L.LcBlock64{+b0, +b1} M.CmBlock{+s0, +s1, +s2, +s3}: %cam_flinv_inv(L.LcBlock64{s0, s1}, L.LcBlock64{a0, a1}) : {M.CmBlock{s0, s1, s2, s3} == M.CmBlock{C.cam.hi(_), C.cam.lo(_), C.cam.hi(C.cam.flinv(C.cam.fl(L.LcBlock64{s2, s3}, L.LcBlock64{b0, b1}), L.LcBlock64{b0, b1})), C.cam.lo(C.cam.flinv(C.cam.fl(L.LcBlock64{s2, s3}, L.LcBlock64{b0, b1}), L.LcBlock64{b0, b1}))} : M.CmBlock} %cam_fl_inv(L.LcBlock64{s2, s3}, L.LcBlock64{b0, b1}) : {M.CmBlock{s0, s1, s2, s3} == M.CmBlock{s0, s1, C.cam.hi(_), C.cam.lo(_)} : M.CmBlock} {==} def cam_unop_op(o: C.LcCamOp, +s: M.CmBlock) -> {s == C.cam.unop(o, C.cam.op(o, s)) : M.CmBlock}: match o: case C.LcCamWhite{a, b}: cam_white(a, b, s) case C.LcCamF1{t, k}: cam_f1(t, k, s) case C.LcCamF2{t, k}: cam_f2(t, k, s) case C.LcCamFl{a, b}: cam_fl_step(a, b, s) case C.LcCamSwap{}: match s: case M.CmBlock{s0, s1, s2, s3}: {==} def cam_op_unop(o: C.LcCamOp, +s: M.CmBlock) -> {s == C.cam.op(o, C.cam.unop(o, s)) : M.CmBlock}: match o: case C.LcCamWhite{a, b}: cam_white(a, b, s) case C.LcCamF1{t, k}: cam_f1d(t, k, s) case C.LcCamF2{t, k}: cam_f2d(t, k, s) case C.LcCamFl{a, b}: cam_fl_step_dual(a, b, s) case C.LcCamSwap{}: match s: case M.CmBlock{s0, s1, s2, s3}: {==} def cam_unrun_run(os: List<&2, C.LcCamOp>, +s: M.CmBlock) -> {s == C.cam.unrun(os, C.cam.run(os, s)) : M.CmBlock}: match os: case Nil{}: {==} case Con{+o, +t}: %cam_unrun_run(t, C.cam.op(o, s)) : {s == C.cam.unop(o, _) : M.CmBlock} cam_unop_op(o, s) def cam_run_unrun(os: List<&2, C.LcCamOp>, +s: M.CmBlock) -> {s == C.cam.run(os, C.cam.unrun(os, s)) : M.CmBlock}: match os: case Nil{}: {==} case Con{+o, +t}: %cam_op_unop(o, C.cam.unrun(t, s)) : {s == C.cam.run(t, _) : M.CmBlock} cam_run_unrun(t, s) def Laws.camellia_round_trip(k, b): match k: case C.LcCamelliaKey{ops}: Equal.sym(M.CmBlock, b, C.cam.unrun(ops, C.cam.run(ops, b)), cam_unrun_run(ops, b)) def Laws.camellia_round_trip_dual(k, b): match k: case C.LcCamelliaKey{ops}: Equal.sym(M.CmBlock, b, C.cam.run(ops, C.cam.unrun(ops, b)), cam_run_unrun(ops, b)) # Twofish: each step of the cipher is undone (a round whatever F is, by the # XORs and the 1-bit rotations undone), so the list of steps is def tf_bswap(s: M.CmBlock) -> {s == F.tf.unop(F.LcTfBswap{}, F.tf.op(F.LcTfBswap{}, s)) : M.CmBlock}: match s: case M.CmBlock{+a, +b, +c, +d}: %bswap2(a) : {M.CmBlock{a, b, c, d} == M.CmBlock{_, L.lc.bswap.bits(L.lc.bswap.bits(b)), L.lc.bswap.bits(L.lc.bswap.bits(c)), L.lc.bswap.bits(L.lc.bswap.bits(d))} : M.CmBlock} %bswap2(b) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, _, L.lc.bswap.bits(L.lc.bswap.bits(c)), L.lc.bswap.bits(L.lc.bswap.bits(d))} : M.CmBlock} %bswap2(c) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, b, _, L.lc.bswap.bits(L.lc.bswap.bits(d))} : M.CmBlock} %bswap2(d) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, b, c, _} : M.CmBlock} {==} def tf_bswapd(s: M.CmBlock) -> {s == F.tf.op(F.LcTfBswap{}, F.tf.unop(F.LcTfBswap{}, s)) : M.CmBlock}: match s: case M.CmBlock{+a, +b, +c, +d}: %bswap2(a) : {M.CmBlock{a, b, c, d} == M.CmBlock{_, L.lc.bswap.bits(L.lc.bswap.bits(b)), L.lc.bswap.bits(L.lc.bswap.bits(c)), L.lc.bswap.bits(L.lc.bswap.bits(d))} : M.CmBlock} %bswap2(b) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, _, L.lc.bswap.bits(L.lc.bswap.bits(c)), L.lc.bswap.bits(L.lc.bswap.bits(d))} : M.CmBlock} %bswap2(c) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, b, _, L.lc.bswap.bits(L.lc.bswap.bits(d))} : M.CmBlock} %bswap2(d) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, b, c, _} : M.CmBlock} {==} def tf_round(+tb: F.LcTfTabs, +sk: List<&2, U32>, +ka: U32, +kb: U32, s: M.CmBlock) -> {s == F.tf.unop(F.LcTfRound{tb, sk, ka, kb}, F.tf.op(F.LcTfRound{tb, sk, ka, kb}, s)) : M.CmBlock}: match s: case M.CmBlock{+r0, +r1, +r2, +r3}: %rot_1_31(U32.xor(r2, F.tf.f0(F.tf.f(tb, sk, r0, r1, ka, kb)))) : {M.CmBlock{r0, r1, r2, r3} == M.CmBlock{r0, r1, U32.xor(_, F.tf.f0(F.tf.f(tb, sk, r0, r1, ka, kb))), L.lc.rotl31.bits(U32.xor(U32.xor(L.lc.rotl1.bits(r3), F.tf.f1(F.tf.f(tb, sk, r0, r1, ka, kb))), F.tf.f1(F.tf.f(tb, sk, r0, r1, ka, kb))))} : M.CmBlock} %u32_xx(r2, F.tf.f0(F.tf.f(tb, sk, r0, r1, ka, kb))) : {M.CmBlock{r0, r1, r2, r3} == M.CmBlock{r0, r1, _, L.lc.rotl31.bits(U32.xor(U32.xor(L.lc.rotl1.bits(r3), F.tf.f1(F.tf.f(tb, sk, r0, r1, ka, kb))), F.tf.f1(F.tf.f(tb, sk, r0, r1, ka, kb))))} : M.CmBlock} %u32_xx(L.lc.rotl1.bits(r3), F.tf.f1(F.tf.f(tb, sk, r0, r1, ka, kb))) : {M.CmBlock{r0, r1, r2, r3} == M.CmBlock{r0, r1, r2, L.lc.rotl31.bits(_)} : M.CmBlock} %rot_31_1(r3) : {M.CmBlock{r0, r1, r2, r3} == M.CmBlock{r0, r1, r2, _} : M.CmBlock} {==} def tf_roundd(+tb: F.LcTfTabs, +sk: List<&2, U32>, +ka: U32, +kb: U32, s: M.CmBlock) -> {s == F.tf.op(F.LcTfRound{tb, sk, ka, kb}, F.tf.unop(F.LcTfRound{tb, sk, ka, kb}, s)) : M.CmBlock}: match s: case M.CmBlock{+a, +b, +c, +d}: %u32_xx(L.lc.rotl1.bits(a), F.tf.f0(F.tf.f(tb, sk, c, d, ka, kb))) : {M.CmBlock{a, b, c, d} == M.CmBlock{L.lc.rotl31.bits(_), U32.xor(L.lc.rotl1.bits(L.lc.rotl31.bits(U32.xor(b, F.tf.f1(F.tf.f(tb, sk, c, d, ka, kb))))), F.tf.f1(F.tf.f(tb, sk, c, d, ka, kb))), c, d} : M.CmBlock} %rot_31_1(a) : {M.CmBlock{a, b, c, d} == M.CmBlock{_, U32.xor(L.lc.rotl1.bits(L.lc.rotl31.bits(U32.xor(b, F.tf.f1(F.tf.f(tb, sk, c, d, ka, kb))))), F.tf.f1(F.tf.f(tb, sk, c, d, ka, kb))), c, d} : M.CmBlock} %rot_1_31(U32.xor(b, F.tf.f1(F.tf.f(tb, sk, c, d, ka, kb)))) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, U32.xor(_, F.tf.f1(F.tf.f(tb, sk, c, d, ka, kb))), c, d} : M.CmBlock} %u32_xx(b, F.tf.f1(F.tf.f(tb, sk, c, d, ka, kb))) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, _, c, d} : M.CmBlock} {==} def tf_unop_op(o: F.LcTfOp, +s: M.CmBlock) -> {s == F.tf.unop(o, F.tf.op(o, s)) : M.CmBlock}: match o: case F.LcTfBswap{}: tf_bswap(s) case F.LcTfWhite{k}: block_xx(s, k) case F.LcTfRound{tb, sk, ka, kb}: tf_round(tb, sk, ka, kb, s) case F.LcTfSwap{}: match s: case M.CmBlock{a, b, c, d}: {==} def tf_op_unop(o: F.LcTfOp, +s: M.CmBlock) -> {s == F.tf.op(o, F.tf.unop(o, s)) : M.CmBlock}: match o: case F.LcTfBswap{}: tf_bswapd(s) case F.LcTfWhite{k}: block_xx(s, k) case F.LcTfRound{tb, sk, ka, kb}: tf_roundd(tb, sk, ka, kb, s) case F.LcTfSwap{}: match s: case M.CmBlock{a, b, c, d}: {==} def tf_unrun_run(os: List<&2, F.LcTfOp>, +s: M.CmBlock) -> {s == F.tf.unrun(os, F.tf.run(os, s)) : M.CmBlock}: match os: case Nil{}: {==} case Con{+o, +t}: %tf_unrun_run(t, F.tf.op(o, s)) : {s == F.tf.unop(o, _) : M.CmBlock} tf_unop_op(o, s) def tf_run_unrun(os: List<&2, F.LcTfOp>, +s: M.CmBlock) -> {s == F.tf.run(os, F.tf.unrun(os, s)) : M.CmBlock}: match os: case Nil{}: {==} case Con{+o, +t}: %tf_op_unop(o, F.tf.unrun(t, s)) : {s == F.tf.run(t, _) : M.CmBlock} tf_run_unrun(t, s) def Laws.twofish_round_trip(k, b): match k: case F.LcTwofishKey{ops}: Equal.sym(M.CmBlock, b, F.tf.unrun(ops, F.tf.run(ops, b)), tf_unrun_run(ops, b)) def Laws.twofish_round_trip_dual(k, b): match k: case F.LcTwofishKey{ops}: Equal.sym(M.CmBlock, b, F.tf.run(ops, F.tf.unrun(ops, b)), tf_run_unrun(ops, b)) # Serpent: each step of the cipher is undone: an S-box layer one bit position # at a time (each S-box's inverse checked on all 16 inputs), the linear # transformation step by step (XORs and rotations undone), the key XORs and # the byte swaps; so the list of steps is # BEGIN GENERATED by gen/proof.py: serpent # the S-box and its inverse undo each other on every 4-bit input def sp_nib_0_t(+n: P.LcSpNib) -> {n == P.sp.nib(P.LcSp0{}, False{}, P.LcSpNib{P.sp.na(P.sp.nib(P.LcSp0{}, True{}, n)), P.sp.nb(P.sp.nib(P.LcSp0{}, True{}, n)), P.sp.nc(P.sp.nib(P.LcSp0{}, True{}, n)), P.sp.nd(P.sp.nib(P.LcSp0{}, True{}, n))}) : P.LcSpNib}: match n: case P.LcSpNib{a, b, c, d}: match a b c d: case True{} True{} True{} True{}: {==} case True{} True{} True{} False{}: {==} case True{} True{} False{} True{}: {==} case True{} True{} False{} False{}: {==} case True{} False{} True{} True{}: {==} case True{} False{} True{} False{}: {==} case True{} False{} False{} True{}: {==} case True{} False{} False{} False{}: {==} case False{} True{} True{} True{}: {==} case False{} True{} True{} False{}: {==} case False{} True{} False{} True{}: {==} case False{} True{} False{} False{}: {==} case False{} False{} True{} True{}: {==} case False{} False{} True{} False{}: {==} case False{} False{} False{} True{}: {==} case False{} False{} False{} False{}: {==} def sp_nib_0_f(+n: P.LcSpNib) -> {n == P.sp.nib(P.LcSp0{}, True{}, P.LcSpNib{P.sp.na(P.sp.nib(P.LcSp0{}, False{}, n)), P.sp.nb(P.sp.nib(P.LcSp0{}, False{}, n)), P.sp.nc(P.sp.nib(P.LcSp0{}, False{}, n)), P.sp.nd(P.sp.nib(P.LcSp0{}, False{}, n))}) : P.LcSpNib}: match n: case P.LcSpNib{a, b, c, d}: match a b c d: case True{} True{} True{} True{}: {==} case True{} True{} True{} False{}: {==} case True{} True{} False{} True{}: {==} case True{} True{} False{} False{}: {==} case True{} False{} True{} True{}: {==} case True{} False{} True{} False{}: {==} case True{} False{} False{} True{}: {==} case True{} False{} False{} False{}: {==} case False{} True{} True{} True{}: {==} case False{} True{} True{} False{}: {==} case False{} True{} False{} True{}: {==} case False{} True{} False{} False{}: {==} case False{} False{} True{} True{}: {==} case False{} False{} True{} False{}: {==} case False{} False{} False{} True{}: {==} case False{} False{} False{} False{}: {==} def sp_nib_1_t(+n: P.LcSpNib) -> {n == P.sp.nib(P.LcSp1{}, False{}, P.LcSpNib{P.sp.na(P.sp.nib(P.LcSp1{}, True{}, n)), P.sp.nb(P.sp.nib(P.LcSp1{}, True{}, n)), P.sp.nc(P.sp.nib(P.LcSp1{}, True{}, n)), P.sp.nd(P.sp.nib(P.LcSp1{}, True{}, n))}) : P.LcSpNib}: match n: case P.LcSpNib{a, b, c, d}: match a b c d: case True{} True{} True{} True{}: {==} case True{} True{} True{} False{}: {==} case True{} True{} False{} True{}: {==} case True{} True{} False{} False{}: {==} case True{} False{} True{} True{}: {==} case True{} False{} True{} False{}: {==} case True{} False{} False{} True{}: {==} case True{} False{} False{} False{}: {==} case False{} True{} True{} True{}: {==} case False{} True{} True{} False{}: {==} case False{} True{} False{} True{}: {==} case False{} True{} False{} False{}: {==} case False{} False{} True{} True{}: {==} case False{} False{} True{} False{}: {==} case False{} False{} False{} True{}: {==} case False{} False{} False{} False{}: {==} def sp_nib_1_f(+n: P.LcSpNib) -> {n == P.sp.nib(P.LcSp1{}, True{}, P.LcSpNib{P.sp.na(P.sp.nib(P.LcSp1{}, False{}, n)), P.sp.nb(P.sp.nib(P.LcSp1{}, False{}, n)), P.sp.nc(P.sp.nib(P.LcSp1{}, False{}, n)), P.sp.nd(P.sp.nib(P.LcSp1{}, False{}, n))}) : P.LcSpNib}: match n: case P.LcSpNib{a, b, c, d}: match a b c d: case True{} True{} True{} True{}: {==} case True{} True{} True{} False{}: {==} case True{} True{} False{} True{}: {==} case True{} True{} False{} False{}: {==} case True{} False{} True{} True{}: {==} case True{} False{} True{} False{}: {==} case True{} False{} False{} True{}: {==} case True{} False{} False{} False{}: {==} case False{} True{} True{} True{}: {==} case False{} True{} True{} False{}: {==} case False{} True{} False{} True{}: {==} case False{} True{} False{} False{}: {==} case False{} False{} True{} True{}: {==} case False{} False{} True{} False{}: {==} case False{} False{} False{} True{}: {==} case False{} False{} False{} False{}: {==} def sp_nib_2_t(+n: P.LcSpNib) -> {n == P.sp.nib(P.LcSp2{}, False{}, P.LcSpNib{P.sp.na(P.sp.nib(P.LcSp2{}, True{}, n)), P.sp.nb(P.sp.nib(P.LcSp2{}, True{}, n)), P.sp.nc(P.sp.nib(P.LcSp2{}, True{}, n)), P.sp.nd(P.sp.nib(P.LcSp2{}, True{}, n))}) : P.LcSpNib}: match n: case P.LcSpNib{a, b, c, d}: match a b c d: case True{} True{} True{} True{}: {==} case True{} True{} True{} False{}: {==} case True{} True{} False{} True{}: {==} case True{} True{} False{} False{}: {==} case True{} False{} True{} True{}: {==} case True{} False{} True{} False{}: {==} case True{} False{} False{} True{}: {==} case True{} False{} False{} False{}: {==} case False{} True{} True{} True{}: {==} case False{} True{} True{} False{}: {==} case False{} True{} False{} True{}: {==} case False{} True{} False{} False{}: {==} case False{} False{} True{} True{}: {==} case False{} False{} True{} False{}: {==} case False{} False{} False{} True{}: {==} case False{} False{} False{} False{}: {==} def sp_nib_2_f(+n: P.LcSpNib) -> {n == P.sp.nib(P.LcSp2{}, True{}, P.LcSpNib{P.sp.na(P.sp.nib(P.LcSp2{}, False{}, n)), P.sp.nb(P.sp.nib(P.LcSp2{}, False{}, n)), P.sp.nc(P.sp.nib(P.LcSp2{}, False{}, n)), P.sp.nd(P.sp.nib(P.LcSp2{}, False{}, n))}) : P.LcSpNib}: match n: case P.LcSpNib{a, b, c, d}: match a b c d: case True{} True{} True{} True{}: {==} case True{} True{} True{} False{}: {==} case True{} True{} False{} True{}: {==} case True{} True{} False{} False{}: {==} case True{} False{} True{} True{}: {==} case True{} False{} True{} False{}: {==} case True{} False{} False{} True{}: {==} case True{} False{} False{} False{}: {==} case False{} True{} True{} True{}: {==} case False{} True{} True{} False{}: {==} case False{} True{} False{} True{}: {==} case False{} True{} False{} False{}: {==} case False{} False{} True{} True{}: {==} case False{} False{} True{} False{}: {==} case False{} False{} False{} True{}: {==} case False{} False{} False{} False{}: {==} def sp_nib_3_t(+n: P.LcSpNib) -> {n == P.sp.nib(P.LcSp3{}, False{}, P.LcSpNib{P.sp.na(P.sp.nib(P.LcSp3{}, True{}, n)), P.sp.nb(P.sp.nib(P.LcSp3{}, True{}, n)), P.sp.nc(P.sp.nib(P.LcSp3{}, True{}, n)), P.sp.nd(P.sp.nib(P.LcSp3{}, True{}, n))}) : P.LcSpNib}: match n: case P.LcSpNib{a, b, c, d}: match a b c d: case True{} True{} True{} True{}: {==} case True{} True{} True{} False{}: {==} case True{} True{} False{} True{}: {==} case True{} True{} False{} False{}: {==} case True{} False{} True{} True{}: {==} case True{} False{} True{} False{}: {==} case True{} False{} False{} True{}: {==} case True{} False{} False{} False{}: {==} case False{} True{} True{} True{}: {==} case False{} True{} True{} False{}: {==} case False{} True{} False{} True{}: {==} case False{} True{} False{} False{}: {==} case False{} False{} True{} True{}: {==} case False{} False{} True{} False{}: {==} case False{} False{} False{} True{}: {==} case False{} False{} False{} False{}: {==} def sp_nib_3_f(+n: P.LcSpNib) -> {n == P.sp.nib(P.LcSp3{}, True{}, P.LcSpNib{P.sp.na(P.sp.nib(P.LcSp3{}, False{}, n)), P.sp.nb(P.sp.nib(P.LcSp3{}, False{}, n)), P.sp.nc(P.sp.nib(P.LcSp3{}, False{}, n)), P.sp.nd(P.sp.nib(P.LcSp3{}, False{}, n))}) : P.LcSpNib}: match n: case P.LcSpNib{a, b, c, d}: match a b c d: case True{} True{} True{} True{}: {==} case True{} True{} True{} False{}: {==} case True{} True{} False{} True{}: {==} case True{} True{} False{} False{}: {==} case True{} False{} True{} True{}: {==} case True{} False{} True{} False{}: {==} case True{} False{} False{} True{}: {==} case True{} False{} False{} False{}: {==} case False{} True{} True{} True{}: {==} case False{} True{} True{} False{}: {==} case False{} True{} False{} True{}: {==} case False{} True{} False{} False{}: {==} case False{} False{} True{} True{}: {==} case False{} False{} True{} False{}: {==} case False{} False{} False{} True{}: {==} case False{} False{} False{} False{}: {==} def sp_nib_4_t(+n: P.LcSpNib) -> {n == P.sp.nib(P.LcSp4{}, False{}, P.LcSpNib{P.sp.na(P.sp.nib(P.LcSp4{}, True{}, n)), P.sp.nb(P.sp.nib(P.LcSp4{}, True{}, n)), P.sp.nc(P.sp.nib(P.LcSp4{}, True{}, n)), P.sp.nd(P.sp.nib(P.LcSp4{}, True{}, n))}) : P.LcSpNib}: match n: case P.LcSpNib{a, b, c, d}: match a b c d: case True{} True{} True{} True{}: {==} case True{} True{} True{} False{}: {==} case True{} True{} False{} True{}: {==} case True{} True{} False{} False{}: {==} case True{} False{} True{} True{}: {==} case True{} False{} True{} False{}: {==} case True{} False{} False{} True{}: {==} case True{} False{} False{} False{}: {==} case False{} True{} True{} True{}: {==} case False{} True{} True{} False{}: {==} case False{} True{} False{} True{}: {==} case False{} True{} False{} False{}: {==} case False{} False{} True{} True{}: {==} case False{} False{} True{} False{}: {==} case False{} False{} False{} True{}: {==} case False{} False{} False{} False{}: {==} def sp_nib_4_f(+n: P.LcSpNib) -> {n == P.sp.nib(P.LcSp4{}, True{}, P.LcSpNib{P.sp.na(P.sp.nib(P.LcSp4{}, False{}, n)), P.sp.nb(P.sp.nib(P.LcSp4{}, False{}, n)), P.sp.nc(P.sp.nib(P.LcSp4{}, False{}, n)), P.sp.nd(P.sp.nib(P.LcSp4{}, False{}, n))}) : P.LcSpNib}: match n: case P.LcSpNib{a, b, c, d}: match a b c d: case True{} True{} True{} True{}: {==} case True{} True{} True{} False{}: {==} case True{} True{} False{} True{}: {==} case True{} True{} False{} False{}: {==} case True{} False{} True{} True{}: {==} case True{} False{} True{} False{}: {==} case True{} False{} False{} True{}: {==} case True{} False{} False{} False{}: {==} case False{} True{} True{} True{}: {==} case False{} True{} True{} False{}: {==} case False{} True{} False{} True{}: {==} case False{} True{} False{} False{}: {==} case False{} False{} True{} True{}: {==} case False{} False{} True{} False{}: {==} case False{} False{} False{} True{}: {==} case False{} False{} False{} False{}: {==} def sp_nib_5_t(+n: P.LcSpNib) -> {n == P.sp.nib(P.LcSp5{}, False{}, P.LcSpNib{P.sp.na(P.sp.nib(P.LcSp5{}, True{}, n)), P.sp.nb(P.sp.nib(P.LcSp5{}, True{}, n)), P.sp.nc(P.sp.nib(P.LcSp5{}, True{}, n)), P.sp.nd(P.sp.nib(P.LcSp5{}, True{}, n))}) : P.LcSpNib}: match n: case P.LcSpNib{a, b, c, d}: match a b c d: case True{} True{} True{} True{}: {==} case True{} True{} True{} False{}: {==} case True{} True{} False{} True{}: {==} case True{} True{} False{} False{}: {==} case True{} False{} True{} True{}: {==} case True{} False{} True{} False{}: {==} case True{} False{} False{} True{}: {==} case True{} False{} False{} False{}: {==} case False{} True{} True{} True{}: {==} case False{} True{} True{} False{}: {==} case False{} True{} False{} True{}: {==} case False{} True{} False{} False{}: {==} case False{} False{} True{} True{}: {==} case False{} False{} True{} False{}: {==} case False{} False{} False{} True{}: {==} case False{} False{} False{} False{}: {==} def sp_nib_5_f(+n: P.LcSpNib) -> {n == P.sp.nib(P.LcSp5{}, True{}, P.LcSpNib{P.sp.na(P.sp.nib(P.LcSp5{}, False{}, n)), P.sp.nb(P.sp.nib(P.LcSp5{}, False{}, n)), P.sp.nc(P.sp.nib(P.LcSp5{}, False{}, n)), P.sp.nd(P.sp.nib(P.LcSp5{}, False{}, n))}) : P.LcSpNib}: match n: case P.LcSpNib{a, b, c, d}: match a b c d: case True{} True{} True{} True{}: {==} case True{} True{} True{} False{}: {==} case True{} True{} False{} True{}: {==} case True{} True{} False{} False{}: {==} case True{} False{} True{} True{}: {==} case True{} False{} True{} False{}: {==} case True{} False{} False{} True{}: {==} case True{} False{} False{} False{}: {==} case False{} True{} True{} True{}: {==} case False{} True{} True{} False{}: {==} case False{} True{} False{} True{}: {==} case False{} True{} False{} False{}: {==} case False{} False{} True{} True{}: {==} case False{} False{} True{} False{}: {==} case False{} False{} False{} True{}: {==} case False{} False{} False{} False{}: {==} def sp_nib_6_t(+n: P.LcSpNib) -> {n == P.sp.nib(P.LcSp6{}, False{}, P.LcSpNib{P.sp.na(P.sp.nib(P.LcSp6{}, True{}, n)), P.sp.nb(P.sp.nib(P.LcSp6{}, True{}, n)), P.sp.nc(P.sp.nib(P.LcSp6{}, True{}, n)), P.sp.nd(P.sp.nib(P.LcSp6{}, True{}, n))}) : P.LcSpNib}: match n: case P.LcSpNib{a, b, c, d}: match a b c d: case True{} True{} True{} True{}: {==} case True{} True{} True{} False{}: {==} case True{} True{} False{} True{}: {==} case True{} True{} False{} False{}: {==} case True{} False{} True{} True{}: {==} case True{} False{} True{} False{}: {==} case True{} False{} False{} True{}: {==} case True{} False{} False{} False{}: {==} case False{} True{} True{} True{}: {==} case False{} True{} True{} False{}: {==} case False{} True{} False{} True{}: {==} case False{} True{} False{} False{}: {==} case False{} False{} True{} True{}: {==} case False{} False{} True{} False{}: {==} case False{} False{} False{} True{}: {==} case False{} False{} False{} False{}: {==} def sp_nib_6_f(+n: P.LcSpNib) -> {n == P.sp.nib(P.LcSp6{}, True{}, P.LcSpNib{P.sp.na(P.sp.nib(P.LcSp6{}, False{}, n)), P.sp.nb(P.sp.nib(P.LcSp6{}, False{}, n)), P.sp.nc(P.sp.nib(P.LcSp6{}, False{}, n)), P.sp.nd(P.sp.nib(P.LcSp6{}, False{}, n))}) : P.LcSpNib}: match n: case P.LcSpNib{a, b, c, d}: match a b c d: case True{} True{} True{} True{}: {==} case True{} True{} True{} False{}: {==} case True{} True{} False{} True{}: {==} case True{} True{} False{} False{}: {==} case True{} False{} True{} True{}: {==} case True{} False{} True{} False{}: {==} case True{} False{} False{} True{}: {==} case True{} False{} False{} False{}: {==} case False{} True{} True{} True{}: {==} case False{} True{} True{} False{}: {==} case False{} True{} False{} True{}: {==} case False{} True{} False{} False{}: {==} case False{} False{} True{} True{}: {==} case False{} False{} True{} False{}: {==} case False{} False{} False{} True{}: {==} case False{} False{} False{} False{}: {==} def sp_nib_7_t(+n: P.LcSpNib) -> {n == P.sp.nib(P.LcSp7{}, False{}, P.LcSpNib{P.sp.na(P.sp.nib(P.LcSp7{}, True{}, n)), P.sp.nb(P.sp.nib(P.LcSp7{}, True{}, n)), P.sp.nc(P.sp.nib(P.LcSp7{}, True{}, n)), P.sp.nd(P.sp.nib(P.LcSp7{}, True{}, n))}) : P.LcSpNib}: match n: case P.LcSpNib{a, b, c, d}: match a b c d: case True{} True{} True{} True{}: {==} case True{} True{} True{} False{}: {==} case True{} True{} False{} True{}: {==} case True{} True{} False{} False{}: {==} case True{} False{} True{} True{}: {==} case True{} False{} True{} False{}: {==} case True{} False{} False{} True{}: {==} case True{} False{} False{} False{}: {==} case False{} True{} True{} True{}: {==} case False{} True{} True{} False{}: {==} case False{} True{} False{} True{}: {==} case False{} True{} False{} False{}: {==} case False{} False{} True{} True{}: {==} case False{} False{} True{} False{}: {==} case False{} False{} False{} True{}: {==} case False{} False{} False{} False{}: {==} def sp_nib_7_f(+n: P.LcSpNib) -> {n == P.sp.nib(P.LcSp7{}, True{}, P.LcSpNib{P.sp.na(P.sp.nib(P.LcSp7{}, False{}, n)), P.sp.nb(P.sp.nib(P.LcSp7{}, False{}, n)), P.sp.nc(P.sp.nib(P.LcSp7{}, False{}, n)), P.sp.nd(P.sp.nib(P.LcSp7{}, False{}, n))}) : P.LcSpNib}: match n: case P.LcSpNib{a, b, c, d}: match a b c d: case True{} True{} True{} True{}: {==} case True{} True{} True{} False{}: {==} case True{} True{} False{} True{}: {==} case True{} True{} False{} False{}: {==} case True{} False{} True{} True{}: {==} case True{} False{} True{} False{}: {==} case True{} False{} False{} True{}: {==} case True{} False{} False{} False{}: {==} case False{} True{} True{} True{}: {==} case False{} True{} True{} False{}: {==} case False{} True{} False{} True{}: {==} case False{} True{} False{} False{}: {==} case False{} False{} True{} True{}: {==} case False{} False{} True{} False{}: {==} case False{} False{} False{} True{}: {==} case False{} False{} False{} False{}: {==} def sp_nib_inv(bx: P.LcSpBox, inv: Bool, +n: P.LcSpNib) -> {n == P.sp.nib(bx, Bool.not(inv), P.LcSpNib{P.sp.na(P.sp.nib(bx, inv, n)), P.sp.nb(P.sp.nib(bx, inv, n)), P.sp.nc(P.sp.nib(bx, inv, n)), P.sp.nd(P.sp.nib(bx, inv, n))}) : P.LcSpNib}: match bx: case P.LcSp0{}: match inv: case True{}: sp_nib_0_t(n) case False{}: sp_nib_0_f(n) case P.LcSp1{}: match inv: case True{}: sp_nib_1_t(n) case False{}: sp_nib_1_f(n) case P.LcSp2{}: match inv: case True{}: sp_nib_2_t(n) case False{}: sp_nib_2_f(n) case P.LcSp3{}: match inv: case True{}: sp_nib_3_t(n) case False{}: sp_nib_3_f(n) case P.LcSp4{}: match inv: case True{}: sp_nib_4_t(n) case False{}: sp_nib_4_f(n) case P.LcSp5{}: match inv: case True{}: sp_nib_5_t(n) case False{}: sp_nib_5_f(n) case P.LcSp6{}: match inv: case True{}: sp_nib_6_t(n) case False{}: sp_nib_6_f(n) case P.LcSp7{}: match inv: case True{}: sp_nib_7_t(n) case False{}: sp_nib_7_f(n) # a layer's input rebuilt from its fields gives the same layer def sp_eta(+bx: P.LcSpBox, +inv: Bool, -p: Nat, z: P.LcSpQ

) -> {P.sp.layer(bx, inv, p, z) == P.sp.layer(bx, inv, p, P.LcSpQ{P.sp.qa(p, z), P.sp.qb(p, z), P.sp.qc(p, z), P.sp.qd(p, z)}) : P.LcSpQ

}: match z: case P.LcSpQ{a, b, c, d}: {==} # an S-box layer and its inverse undo each other on four m-bit words def sp_layer_inv(+bx: P.LcSpBox, +inv: Bool, m: Nat, +q: P.LcSpQ) -> {q == P.sp.layer(bx, Bool.not(inv), m, P.sp.layer(bx, inv, m, q)) : P.LcSpQ}: match m: case 0n: {==} case 1n+(+p): match q: case P.LcSpQ{WCon{+x0, +t0}, WCon{+x1, +t1}, WCon{+x2, +t2}, WCon{+x3, +t3}}: %sp_nib_inv(bx, inv, P.LcSpNib{x0, x1, x2, x3}) : {P.LcSpQ{WCon{x0, t0}, WCon{x1, t1}, WCon{x2, t2}, WCon{x3, t3}} == P.LcSpQ{WCon{P.sp.na(_), P.sp.qa(p, P.sp.layer(bx, Bool.not(inv), p, P.LcSpQ{P.sp.qa(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3})), P.sp.qb(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3})), P.sp.qc(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3})), P.sp.qd(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3}))}))}, WCon{P.sp.nb(_), P.sp.qb(p, P.sp.layer(bx, Bool.not(inv), p, P.LcSpQ{P.sp.qa(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3})), P.sp.qb(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3})), P.sp.qc(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3})), P.sp.qd(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3}))}))}, WCon{P.sp.nc(_), P.sp.qc(p, P.sp.layer(bx, Bool.not(inv), p, P.LcSpQ{P.sp.qa(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3})), P.sp.qb(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3})), P.sp.qc(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3})), P.sp.qd(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3}))}))}, WCon{P.sp.nd(_), P.sp.qd(p, P.sp.layer(bx, Bool.not(inv), p, P.LcSpQ{P.sp.qa(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3})), P.sp.qb(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3})), P.sp.qc(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3})), P.sp.qd(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3}))}))}} : P.LcSpQ<1n+p>} %Equal.trans(P.LcSpQ

, P.LcSpQ{t0, t1, t2, t3}, P.sp.layer(bx, Bool.not(inv), p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3})), P.sp.layer(bx, Bool.not(inv), p, P.LcSpQ{P.sp.qa(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3})), P.sp.qb(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3})), P.sp.qc(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3})), P.sp.qd(p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3}))}), sp_layer_inv(bx, inv, p, P.LcSpQ{t0, t1, t2, t3}), sp_eta(bx, Bool.not(inv), p, P.sp.layer(bx, inv, p, P.LcSpQ{t0, t1, t2, t3}))) : {P.LcSpQ{WCon{x0, t0}, WCon{x1, t1}, WCon{x2, t2}, WCon{x3, t3}} == P.LcSpQ{WCon{x0, P.sp.qa(p, _)}, WCon{x1, P.sp.qb(p, _)}, WCon{x2, P.sp.qc(p, _)}, WCon{x3, P.sp.qd(p, _)}} : P.LcSpQ<1n+p>} {==} # an S-box step and its inverse undo each other on the state def sp_sop_inv(+bx: P.LcSpBox, +inv: Bool, s: M.CmBlock) -> {s == P.sp.sop(bx, Bool.not(inv), P.sp.sop(bx, inv, s)) : M.CmBlock}: match s: case M.CmBlock{U32{+w0}, U32{+w1}, U32{+w2}, U32{+w3}}: %Equal.trans(P.LcSpQ<32n>, P.LcSpQ{w0, w1, w2, w3}, P.sp.layer(bx, Bool.not(inv), 32n, P.sp.layer(bx, inv, 32n, P.LcSpQ{w0, w1, w2, w3})), P.sp.layer(bx, Bool.not(inv), 32n, P.LcSpQ{P.sp.qa(32n, P.sp.layer(bx, inv, 32n, P.LcSpQ{w0, w1, w2, w3})), P.sp.qb(32n, P.sp.layer(bx, inv, 32n, P.LcSpQ{w0, w1, w2, w3})), P.sp.qc(32n, P.sp.layer(bx, inv, 32n, P.LcSpQ{w0, w1, w2, w3})), P.sp.qd(32n, P.sp.layer(bx, inv, 32n, P.LcSpQ{w0, w1, w2, w3}))}), sp_layer_inv(bx, inv, 32n, P.LcSpQ{w0, w1, w2, w3}), sp_eta(bx, Bool.not(inv), 32n, P.sp.layer(bx, inv, 32n, P.LcSpQ{w0, w1, w2, w3}))) : {M.CmBlock{U32{w0}, U32{w1}, U32{w2}, U32{w3}} == M.CmBlock{U32{P.sp.qa(32n, _)}, U32{P.sp.qb(32n, _)}, U32{P.sp.qc(32n, _)}, U32{P.sp.qd(32n, _)}} : M.CmBlock} {==} # the linear transformation's steps, each undone def sp_lt1(s: M.CmBlock) -> {s == P.sp.ilt1(P.sp.lt1(s)) : M.CmBlock}: match s: case M.CmBlock{+x0, +x1, +x2, +x3}: %rot_19_13(x0) : {M.CmBlock{x0, x1, x2, x3} == M.CmBlock{_, x1, x2, x3} : M.CmBlock} {==} def sp_lt1d(s: M.CmBlock) -> {s == P.sp.lt1(P.sp.ilt1(s)) : M.CmBlock}: match s: case M.CmBlock{+x0, +x1, +x2, +x3}: %rot_13_19(x0) : {M.CmBlock{x0, x1, x2, x3} == M.CmBlock{_, x1, x2, x3} : M.CmBlock} {==} def sp_lt2(s: M.CmBlock) -> {s == P.sp.ilt2(P.sp.lt2(s)) : M.CmBlock}: match s: case M.CmBlock{+x0, +x1, +x2, +x3}: %rot_29_3(x2) : {M.CmBlock{x0, x1, x2, x3} == M.CmBlock{x0, x1, _, x3} : M.CmBlock} {==} def sp_lt2d(s: M.CmBlock) -> {s == P.sp.lt2(P.sp.ilt2(s)) : M.CmBlock}: match s: case M.CmBlock{+x0, +x1, +x2, +x3}: %rot_3_29(x2) : {M.CmBlock{x0, x1, x2, x3} == M.CmBlock{x0, x1, _, x3} : M.CmBlock} {==} def sp_lt3(s: M.CmBlock) -> {s == P.sp.lt3(P.sp.lt3(s)) : M.CmBlock}: match s: case M.CmBlock{+x0, +x1, +x2, +x3}: %u32_xx(x1, U32.xor(x0, x2)) : {M.CmBlock{x0, x1, x2, x3} == M.CmBlock{x0, _, x2, x3} : M.CmBlock} {==} def sp_lt4(s: M.CmBlock) -> {s == P.sp.lt4(P.sp.lt4(s)) : M.CmBlock}: match s: case M.CmBlock{+x0, +x1, +x2, +x3}: %u32_xx(x3, U32.xor(x2, U32.shln(x0, 3n))) : {M.CmBlock{x0, x1, x2, x3} == M.CmBlock{x0, x1, x2, _} : M.CmBlock} {==} def sp_lt5(s: M.CmBlock) -> {s == P.sp.ilt5(P.sp.lt5(s)) : M.CmBlock}: match s: case M.CmBlock{+x0, +x1, +x2, +x3}: %rot_31_1(x1) : {M.CmBlock{x0, x1, x2, x3} == M.CmBlock{x0, _, x2, L.lc.rotl25.bits(L.lc.rotl7.bits(x3))} : M.CmBlock} %rot_25_7(x3) : {M.CmBlock{x0, x1, x2, x3} == M.CmBlock{x0, x1, x2, _} : M.CmBlock} {==} def sp_lt5d(s: M.CmBlock) -> {s == P.sp.lt5(P.sp.ilt5(s)) : M.CmBlock}: match s: case M.CmBlock{+x0, +x1, +x2, +x3}: %rot_1_31(x1) : {M.CmBlock{x0, x1, x2, x3} == M.CmBlock{x0, _, x2, L.lc.rotl7.bits(L.lc.rotl25.bits(x3))} : M.CmBlock} %rot_7_25(x3) : {M.CmBlock{x0, x1, x2, x3} == M.CmBlock{x0, x1, x2, _} : M.CmBlock} {==} def sp_lt6(s: M.CmBlock) -> {s == P.sp.lt6(P.sp.lt6(s)) : M.CmBlock}: match s: case M.CmBlock{+x0, +x1, +x2, +x3}: %u32_xx(x0, U32.xor(x1, x3)) : {M.CmBlock{x0, x1, x2, x3} == M.CmBlock{_, x1, x2, x3} : M.CmBlock} {==} def sp_lt7(s: M.CmBlock) -> {s == P.sp.lt7(P.sp.lt7(s)) : M.CmBlock}: match s: case M.CmBlock{+x0, +x1, +x2, +x3}: %u32_xx(x2, U32.xor(x3, U32.shln(x1, 7n))) : {M.CmBlock{x0, x1, x2, x3} == M.CmBlock{x0, x1, _, x3} : M.CmBlock} {==} def sp_lt8(s: M.CmBlock) -> {s == P.sp.ilt8(P.sp.lt8(s)) : M.CmBlock}: match s: case M.CmBlock{+x0, +x1, +x2, +x3}: %rot_27_5(x0) : {M.CmBlock{x0, x1, x2, x3} == M.CmBlock{_, x1, L.lc.rotl10.bits(L.lc.rotl22.bits(x2)), x3} : M.CmBlock} %rot_10_22(x2) : {M.CmBlock{x0, x1, x2, x3} == M.CmBlock{x0, x1, _, x3} : M.CmBlock} {==} def sp_lt8d(s: M.CmBlock) -> {s == P.sp.lt8(P.sp.ilt8(s)) : M.CmBlock}: match s: case M.CmBlock{+x0, +x1, +x2, +x3}: %rot_5_27(x0) : {M.CmBlock{x0, x1, x2, x3} == M.CmBlock{_, x1, L.lc.rotl22.bits(L.lc.rotl10.bits(x2)), x3} : M.CmBlock} %rot_22_10(x2) : {M.CmBlock{x0, x1, x2, x3} == M.CmBlock{x0, x1, _, x3} : M.CmBlock} {==} def sp_lt_inv(+s: M.CmBlock) -> {s == P.sp.ilt(P.sp.lt(s)) : M.CmBlock}: %sp_lt8(P.sp.lt7(P.sp.lt6(P.sp.lt5(P.sp.lt4(P.sp.lt3(P.sp.lt2(P.sp.lt1(s)))))))) : {s == P.sp.ilt1(P.sp.ilt2(P.sp.lt3(P.sp.lt4(P.sp.ilt5(P.sp.lt6(P.sp.lt7(_))))))) : M.CmBlock} %sp_lt7(P.sp.lt6(P.sp.lt5(P.sp.lt4(P.sp.lt3(P.sp.lt2(P.sp.lt1(s))))))) : {s == P.sp.ilt1(P.sp.ilt2(P.sp.lt3(P.sp.lt4(P.sp.ilt5(P.sp.lt6(_)))))) : M.CmBlock} %sp_lt6(P.sp.lt5(P.sp.lt4(P.sp.lt3(P.sp.lt2(P.sp.lt1(s)))))) : {s == P.sp.ilt1(P.sp.ilt2(P.sp.lt3(P.sp.lt4(P.sp.ilt5(_))))) : M.CmBlock} %sp_lt5(P.sp.lt4(P.sp.lt3(P.sp.lt2(P.sp.lt1(s))))) : {s == P.sp.ilt1(P.sp.ilt2(P.sp.lt3(P.sp.lt4(_)))) : M.CmBlock} %sp_lt4(P.sp.lt3(P.sp.lt2(P.sp.lt1(s)))) : {s == P.sp.ilt1(P.sp.ilt2(P.sp.lt3(_))) : M.CmBlock} %sp_lt3(P.sp.lt2(P.sp.lt1(s))) : {s == P.sp.ilt1(P.sp.ilt2(_)) : M.CmBlock} %sp_lt2(P.sp.lt1(s)) : {s == P.sp.ilt1(_) : M.CmBlock} sp_lt1(s) def sp_lt_invd(+s: M.CmBlock) -> {s == P.sp.lt(P.sp.ilt(s)) : M.CmBlock}: %sp_lt1d(P.sp.ilt2(P.sp.lt3(P.sp.lt4(P.sp.ilt5(P.sp.lt6(P.sp.lt7(P.sp.ilt8(s)))))))) : {s == P.sp.lt8(P.sp.lt7(P.sp.lt6(P.sp.lt5(P.sp.lt4(P.sp.lt3(P.sp.lt2(_))))))) : M.CmBlock} %sp_lt2d(P.sp.lt3(P.sp.lt4(P.sp.ilt5(P.sp.lt6(P.sp.lt7(P.sp.ilt8(s))))))) : {s == P.sp.lt8(P.sp.lt7(P.sp.lt6(P.sp.lt5(P.sp.lt4(P.sp.lt3(_)))))) : M.CmBlock} %sp_lt3(P.sp.lt4(P.sp.ilt5(P.sp.lt6(P.sp.lt7(P.sp.ilt8(s)))))) : {s == P.sp.lt8(P.sp.lt7(P.sp.lt6(P.sp.lt5(P.sp.lt4(_))))) : M.CmBlock} %sp_lt4(P.sp.ilt5(P.sp.lt6(P.sp.lt7(P.sp.ilt8(s))))) : {s == P.sp.lt8(P.sp.lt7(P.sp.lt6(P.sp.lt5(_)))) : M.CmBlock} %sp_lt5d(P.sp.lt6(P.sp.lt7(P.sp.ilt8(s)))) : {s == P.sp.lt8(P.sp.lt7(P.sp.lt6(_))) : M.CmBlock} %sp_lt6(P.sp.lt7(P.sp.ilt8(s))) : {s == P.sp.lt8(P.sp.lt7(_)) : M.CmBlock} %sp_lt7(P.sp.ilt8(s)) : {s == P.sp.lt8(_) : M.CmBlock} sp_lt8d(s) # END GENERATED: serpent def sp_bswap(s: M.CmBlock) -> {s == P.sp.unop(P.LcSpBswap{}, P.sp.op(P.LcSpBswap{}, s)) : M.CmBlock}: match s: case M.CmBlock{+a, +b, +c, +d}: %bswap2(a) : {M.CmBlock{a, b, c, d} == M.CmBlock{_, L.lc.bswap.bits(L.lc.bswap.bits(b)), L.lc.bswap.bits(L.lc.bswap.bits(c)), L.lc.bswap.bits(L.lc.bswap.bits(d))} : M.CmBlock} %bswap2(b) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, _, L.lc.bswap.bits(L.lc.bswap.bits(c)), L.lc.bswap.bits(L.lc.bswap.bits(d))} : M.CmBlock} %bswap2(c) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, b, _, L.lc.bswap.bits(L.lc.bswap.bits(d))} : M.CmBlock} %bswap2(d) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, b, c, _} : M.CmBlock} {==} def sp_bswapd(s: M.CmBlock) -> {s == P.sp.op(P.LcSpBswap{}, P.sp.unop(P.LcSpBswap{}, s)) : M.CmBlock}: match s: case M.CmBlock{+a, +b, +c, +d}: %bswap2(a) : {M.CmBlock{a, b, c, d} == M.CmBlock{_, L.lc.bswap.bits(L.lc.bswap.bits(b)), L.lc.bswap.bits(L.lc.bswap.bits(c)), L.lc.bswap.bits(L.lc.bswap.bits(d))} : M.CmBlock} %bswap2(b) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, _, L.lc.bswap.bits(L.lc.bswap.bits(c)), L.lc.bswap.bits(L.lc.bswap.bits(d))} : M.CmBlock} %bswap2(c) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, b, _, L.lc.bswap.bits(L.lc.bswap.bits(d))} : M.CmBlock} %bswap2(d) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, b, c, _} : M.CmBlock} {==} def sp_unop_op(o: P.LcSpOp, +s: M.CmBlock) -> {s == P.sp.unop(o, P.sp.op(o, s)) : M.CmBlock}: match o: case P.LcSpBswap{}: sp_bswap(s) case P.LcSpKey{k}: block_xx(s, k) case P.LcSpS{bx}: sp_sop_inv(bx, False{}, s) case P.LcSpLt{}: sp_lt_inv(s) def sp_op_unop(o: P.LcSpOp, +s: M.CmBlock) -> {s == P.sp.op(o, P.sp.unop(o, s)) : M.CmBlock}: match o: case P.LcSpBswap{}: sp_bswapd(s) case P.LcSpKey{k}: block_xx(s, k) case P.LcSpS{bx}: sp_sop_inv(bx, True{}, s) case P.LcSpLt{}: sp_lt_invd(s) def sp_unrun_run(os: List<&2, P.LcSpOp>, +s: M.CmBlock) -> {s == P.sp.unrun(os, P.sp.run(os, s)) : M.CmBlock}: match os: case Nil{}: {==} case Con{+o, +t}: %sp_unrun_run(t, P.sp.op(o, s)) : {s == P.sp.unop(o, _) : M.CmBlock} sp_unop_op(o, s) def sp_run_unrun(os: List<&2, P.LcSpOp>, +s: M.CmBlock) -> {s == P.sp.run(os, P.sp.unrun(os, s)) : M.CmBlock}: match os: case Nil{}: {==} case Con{+o, +t}: %sp_op_unop(o, P.sp.unrun(t, s)) : {s == P.sp.run(t, _) : M.CmBlock} sp_run_unrun(t, s) def Laws.serpent_round_trip(k, b): match k: case P.LcSerpentKey{ops}: Equal.sym(M.CmBlock, b, P.sp.unrun(ops, P.sp.run(ops, b)), sp_unrun_run(ops, b)) def Laws.serpent_round_trip_dual(k, b): match k: case P.LcSerpentKey{ops}: Equal.sym(M.CmBlock, b, P.sp.run(ops, P.sp.unrun(ops, b)), sp_run_unrun(ops, b)) # A subtraction undoes an addition, for every word (TEA and XTEA) # BEGIN GENERATED by gen/proof.py: adc def adc_add_sub(n: Nat, a: Word(n), b: Word(n), c: Bool) -> {a == Word.adc(n, Word.adc(n, a, b, False{}, c), b, True{}, Bool.not(c)) : Word(n)}: match n: case 0n: match a: case WNil{}: {==} case 1n+p: match a b c: case WCon{True{}, at} WCon{True{}, bt} True{}: %adc_add_sub(p, at, bt, True{}) : {WCon{True{}, at} == WCon{True{}, _} : Word(1n+p)} {==} case WCon{True{}, at} WCon{True{}, bt} False{}: %adc_add_sub(p, at, bt, True{}) : {WCon{True{}, at} == WCon{True{}, _} : Word(1n+p)} {==} case WCon{True{}, at} WCon{False{}, bt} True{}: %adc_add_sub(p, at, bt, True{}) : {WCon{True{}, at} == WCon{True{}, _} : Word(1n+p)} {==} case WCon{True{}, at} WCon{False{}, bt} False{}: %adc_add_sub(p, at, bt, False{}) : {WCon{True{}, at} == WCon{True{}, _} : Word(1n+p)} {==} case WCon{False{}, at} WCon{True{}, bt} True{}: %adc_add_sub(p, at, bt, True{}) : {WCon{False{}, at} == WCon{False{}, _} : Word(1n+p)} {==} case WCon{False{}, at} WCon{True{}, bt} False{}: %adc_add_sub(p, at, bt, False{}) : {WCon{False{}, at} == WCon{False{}, _} : Word(1n+p)} {==} case WCon{False{}, at} WCon{False{}, bt} True{}: %adc_add_sub(p, at, bt, False{}) : {WCon{False{}, at} == WCon{False{}, _} : Word(1n+p)} {==} case WCon{False{}, at} WCon{False{}, bt} False{}: %adc_add_sub(p, at, bt, False{}) : {WCon{False{}, at} == WCon{False{}, _} : Word(1n+p)} {==} def adc_sub_add(n: Nat, a: Word(n), b: Word(n), c: Bool) -> {a == Word.adc(n, Word.adc(n, a, b, True{}, c), b, False{}, Bool.not(c)) : Word(n)}: match n: case 0n: match a: case WNil{}: {==} case 1n+p: match a b c: case WCon{True{}, at} WCon{True{}, bt} True{}: %adc_sub_add(p, at, bt, True{}) : {WCon{True{}, at} == WCon{True{}, _} : Word(1n+p)} {==} case WCon{True{}, at} WCon{True{}, bt} False{}: %adc_sub_add(p, at, bt, False{}) : {WCon{True{}, at} == WCon{True{}, _} : Word(1n+p)} {==} case WCon{True{}, at} WCon{False{}, bt} True{}: %adc_sub_add(p, at, bt, True{}) : {WCon{True{}, at} == WCon{True{}, _} : Word(1n+p)} {==} case WCon{True{}, at} WCon{False{}, bt} False{}: %adc_sub_add(p, at, bt, True{}) : {WCon{True{}, at} == WCon{True{}, _} : Word(1n+p)} {==} case WCon{False{}, at} WCon{True{}, bt} True{}: %adc_sub_add(p, at, bt, False{}) : {WCon{False{}, at} == WCon{False{}, _} : Word(1n+p)} {==} case WCon{False{}, at} WCon{True{}, bt} False{}: %adc_sub_add(p, at, bt, False{}) : {WCon{False{}, at} == WCon{False{}, _} : Word(1n+p)} {==} case WCon{False{}, at} WCon{False{}, bt} True{}: %adc_sub_add(p, at, bt, True{}) : {WCon{False{}, at} == WCon{False{}, _} : Word(1n+p)} {==} case WCon{False{}, at} WCon{False{}, bt} False{}: %adc_sub_add(p, at, bt, False{}) : {WCon{False{}, at} == WCon{False{}, _} : Word(1n+p)} {==} def u32_add_sub(a: U32, b: U32) -> {a == U32.sub(U32.add(a, b), b) : U32}: match a b: case U32{x} U32{y}: %adc_add_sub(32n, x, y, False{}) : {U32{x} == U32{_} : U32} {==} def u32_sub_add(a: U32, b: U32) -> {a == U32.add(U32.sub(a, b), b) : U32}: match a b: case U32{x} U32{y}: %adc_sub_add(32n, x, y, True{}) : {U32{x} == U32{_} : U32} {==} # END GENERATED: adc # Feistel rounds over any round function (legacy-ciphers.bend's lc.fe, for # CAST-128 and FCrypt): a round is undone whatever f is, so a list of rounds # is undone by its rounds undone in reverse order def fe_unstep_step(~RK: Data, ~f: RK -> U32 -> U32, +k: RK, b: L.LcBlock64) -> {b == L.lc.fe.unstep(~RK, ~f, k, L.lc.fe.step(~RK, ~f, k, b)) : L.LcBlock64}: match b: case L.LcBlock64{l, +r}: %u32_xx(l, f(k, r)) : {L.LcBlock64{l, r} == L.LcBlock64{_, r} : L.LcBlock64} {==} def fe_step_unstep(~RK: Data, ~f: RK -> U32 -> U32, +k: RK, b: L.LcBlock64) -> {b == L.lc.fe.step(~RK, ~f, k, L.lc.fe.unstep(~RK, ~f, k, b)) : L.LcBlock64}: match b: case L.LcBlock64{+l, r}: %u32_xx(r, f(k, l)) : {L.LcBlock64{l, r} == L.LcBlock64{l, _} : L.LcBlock64} {==} def fe_unrun_run(~RK: Data, ~f: RK -> U32 -> U32, ks: List<&2, RK>, +b: L.LcBlock64) -> {b == L.lc.fe.unrun(~RK, ~f, ks, L.lc.fe.run(~RK, ~f, ks, b)) : L.LcBlock64}: match ks: case Nil{}: {==} case Con{+k, +t}: %fe_unrun_run(~RK, ~f, t, L.lc.fe.step(~RK, ~f, k, b)) : {b == L.lc.fe.unstep(~RK, ~f, k, _) : L.LcBlock64} fe_unstep_step(~RK, ~f, k, b) def fe_run_unrun(~RK: Data, ~f: RK -> U32 -> U32, ks: List<&2, RK>, +b: L.LcBlock64) -> {b == L.lc.fe.run(~RK, ~f, ks, L.lc.fe.unrun(~RK, ~f, ks, b)) : L.LcBlock64}: match ks: case Nil{}: {==} case Con{+k, +t}: %fe_step_unstep(~RK, ~f, k, L.lc.fe.unrun(~RK, ~f, t, b)) : {b == L.lc.fe.run(~RK, ~f, t, _) : L.LcBlock64} fe_run_unrun(~RK, ~f, t, b) def swap2(b: L.LcBlock64) -> {b == L.lc.swap(L.lc.swap(b)) : L.LcBlock64}: match b: case L.LcBlock64{h, l}: {==} # FCrypt: its rounds, undone def Laws.fcrypt_round_trip(k, b): match k: case FC.LcFcryptKey{+rks}: Equal.sym(L.LcBlock64, b, L.lc.fe.unrun(~FC.LcFcRk, ~FC.fc.f, rks, L.lc.fe.run(~FC.LcFcRk, ~FC.fc.f, rks, b)), fe_unrun_run(~FC.LcFcRk, ~FC.fc.f, rks, b)) def Laws.fcrypt_round_trip_dual(k, b): match k: case FC.LcFcryptKey{+rks}: Equal.sym(L.LcBlock64, b, L.lc.fe.run(~FC.LcFcRk, ~FC.fc.f, rks, L.lc.fe.unrun(~FC.LcFcRk, ~FC.fc.f, rks, b)), fe_run_unrun(~FC.LcFcRk, ~FC.fc.f, rks, b)) # CAST-128: its rounds, then the exchange of the halves, undone def Laws.cast5_round_trip(k, b): match k: case C5.LcCast5Key{+rks}: %swap2(L.lc.fe.run(~C5.LcCast5Rk, ~C5.cast5.f, rks, b)) : {L.lc.fe.unrun(~C5.LcCast5Rk, ~C5.cast5.f, rks, _) == b : L.LcBlock64} Equal.sym(L.LcBlock64, b, L.lc.fe.unrun(~C5.LcCast5Rk, ~C5.cast5.f, rks, L.lc.fe.run(~C5.LcCast5Rk, ~C5.cast5.f, rks, b)), fe_unrun_run(~C5.LcCast5Rk, ~C5.cast5.f, rks, b)) def Laws.cast5_round_trip_dual(k, b): match k: case C5.LcCast5Key{+rks}: %fe_run_unrun(~C5.LcCast5Rk, ~C5.cast5.f, rks, L.lc.swap(b)) : {L.lc.swap(_) == b : L.LcBlock64} Equal.sym(L.LcBlock64, b, L.lc.swap(L.lc.swap(b)), swap2(b)) # TEA and XTEA: each step adds a function of one half to the other, undone # by subtracting it (the "adc" lemmas below); the byte swaps undone by # themselves def tea_unop_op(o: TE.LcTeaOp, b: L.LcBlock64) -> {b == TE.tea.unop(o, TE.tea.op(o, b)) : L.LcBlock64}: match o: case TE.LcTeaY{+s, +ka, +kb}: match b: case L.LcBlock64{y, +z}: %u32_add_sub(y, TE.tea.g(z, s, ka, kb)) : {L.LcBlock64{y, z} == L.LcBlock64{_, z} : L.LcBlock64} {==} case TE.LcTeaZ{+s, +ka, +kb}: match b: case L.LcBlock64{+y, z}: %u32_add_sub(z, TE.tea.g(y, s, ka, kb)) : {L.LcBlock64{y, z} == L.LcBlock64{y, _} : L.LcBlock64} {==} case TE.LcXteaY{+c}: match b: case L.LcBlock64{y, +z}: %u32_add_sub(y, TE.xtea.g(z, c)) : {L.LcBlock64{y, z} == L.LcBlock64{_, z} : L.LcBlock64} {==} case TE.LcXteaZ{+c}: match b: case L.LcBlock64{+y, z}: %u32_add_sub(z, TE.xtea.g(y, c)) : {L.LcBlock64{y, z} == L.LcBlock64{y, _} : L.LcBlock64} {==} case TE.LcTeaBswap{}: match b: case L.LcBlock64{+y, +z}: %bswap2(y) : {L.LcBlock64{y, z} == L.LcBlock64{_, L.lc.bswap.bits(L.lc.bswap.bits(z))} : L.LcBlock64} %bswap2(z) : {L.LcBlock64{y, z} == L.LcBlock64{y, _} : L.LcBlock64} {==} def tea_op_unop(o: TE.LcTeaOp, b: L.LcBlock64) -> {b == TE.tea.op(o, TE.tea.unop(o, b)) : L.LcBlock64}: match o: case TE.LcTeaY{+s, +ka, +kb}: match b: case L.LcBlock64{y, +z}: %u32_sub_add(y, TE.tea.g(z, s, ka, kb)) : {L.LcBlock64{y, z} == L.LcBlock64{_, z} : L.LcBlock64} {==} case TE.LcTeaZ{+s, +ka, +kb}: match b: case L.LcBlock64{+y, z}: %u32_sub_add(z, TE.tea.g(y, s, ka, kb)) : {L.LcBlock64{y, z} == L.LcBlock64{y, _} : L.LcBlock64} {==} case TE.LcXteaY{+c}: match b: case L.LcBlock64{y, +z}: %u32_sub_add(y, TE.xtea.g(z, c)) : {L.LcBlock64{y, z} == L.LcBlock64{_, z} : L.LcBlock64} {==} case TE.LcXteaZ{+c}: match b: case L.LcBlock64{+y, z}: %u32_sub_add(z, TE.xtea.g(y, c)) : {L.LcBlock64{y, z} == L.LcBlock64{y, _} : L.LcBlock64} {==} case TE.LcTeaBswap{}: match b: case L.LcBlock64{+y, +z}: %bswap2(y) : {L.LcBlock64{y, z} == L.LcBlock64{_, L.lc.bswap.bits(L.lc.bswap.bits(z))} : L.LcBlock64} %bswap2(z) : {L.LcBlock64{y, z} == L.LcBlock64{y, _} : L.LcBlock64} {==} def tea_unrun_run(os: List<&2, TE.LcTeaOp>, +b: L.LcBlock64) -> {b == TE.tea.unrun(os, TE.tea.run(os, b)) : L.LcBlock64}: match os: case Nil{}: {==} case Con{+o, +t}: %tea_unrun_run(t, TE.tea.op(o, b)) : {b == TE.tea.unop(o, _) : L.LcBlock64} tea_unop_op(o, b) def tea_run_unrun(os: List<&2, TE.LcTeaOp>, +b: L.LcBlock64) -> {b == TE.tea.run(os, TE.tea.unrun(os, b)) : L.LcBlock64}: match os: case Nil{}: {==} case Con{+o, +t}: %tea_op_unop(o, TE.tea.unrun(t, b)) : {b == TE.tea.run(t, _) : L.LcBlock64} tea_run_unrun(t, b) def Laws.tea_round_trip(k, b): match k: case TE.LcTeaKey{+ops}: Equal.sym(L.LcBlock64, b, TE.tea.unrun(ops, TE.tea.run(ops, b)), tea_unrun_run(ops, b)) def Laws.tea_round_trip_dual(k, b): match k: case TE.LcTeaKey{+ops}: Equal.sym(L.LcBlock64, b, TE.tea.run(ops, TE.tea.unrun(ops, b)), tea_run_unrun(ops, b)) def Laws.xtea_round_trip(k, b): match k: case XT.LcXteaKey{+ops}: Equal.sym(L.LcBlock64, b, TE.tea.unrun(ops, TE.tea.run(ops, b)), tea_unrun_run(ops, b)) def Laws.xtea_round_trip_dual(k, b): match k: case XT.LcXteaKey{+ops}: Equal.sym(L.LcBlock64, b, TE.tea.run(ops, TE.tea.unrun(ops, b)), tea_run_unrun(ops, b)) # Blowfish: a round and the final step, each undone by XOR whatever F is def bf_unop_op(o: BF.LcBfOp, b: L.LcBlock64) -> {b == BF.bf.unop(o, BF.bf.op(o, b)) : L.LcBlock64}: match o: case BF.LcBfRound{+p, +t}: match b: case L.LcBlock64{+l, +r}: %u32_xx(l, p) : {L.LcBlock64{l, r} == L.LcBlock64{_, U32.xor(U32.xor(r, BF.bf.f(t, U32.xor(l, p))), BF.bf.f(t, U32.xor(l, p)))} : L.LcBlock64} %u32_xx(r, BF.bf.f(t, U32.xor(l, p))) : {L.LcBlock64{l, r} == L.LcBlock64{l, _} : L.LcBlock64} {==} case BF.LcBfFinal{+p17, +p18}: match b: case L.LcBlock64{+l, +r}: %u32_xx(l, p17) : {L.LcBlock64{l, r} == L.LcBlock64{_, U32.xor(U32.xor(r, p18), p18)} : L.LcBlock64} %u32_xx(r, p18) : {L.LcBlock64{l, r} == L.LcBlock64{l, _} : L.LcBlock64} {==} def bf_op_unop(o: BF.LcBfOp, b: L.LcBlock64) -> {b == BF.bf.op(o, BF.bf.unop(o, b)) : L.LcBlock64}: match o: case BF.LcBfRound{+p, +t}: match b: case L.LcBlock64{+x, +y}: %u32_xx(y, p) : {L.LcBlock64{x, y} == L.LcBlock64{U32.xor(U32.xor(x, BF.bf.f(t, y)), BF.bf.f(t, _)), _} : L.LcBlock64} %u32_xx(x, BF.bf.f(t, y)) : {L.LcBlock64{x, y} == L.LcBlock64{_, y} : L.LcBlock64} {==} case BF.LcBfFinal{+p17, +p18}: match b: case L.LcBlock64{+x, +y}: %u32_xx(x, p18) : {L.LcBlock64{x, y} == L.LcBlock64{_, U32.xor(U32.xor(y, p17), p17)} : L.LcBlock64} %u32_xx(y, p17) : {L.LcBlock64{x, y} == L.LcBlock64{x, _} : L.LcBlock64} {==} def bf_unrun_run(os: List<&2, BF.LcBfOp>, +b: L.LcBlock64) -> {b == BF.bf.unrun(os, BF.bf.run(os, b)) : L.LcBlock64}: match os: case Nil{}: {==} case Con{+o, +t}: %bf_unrun_run(t, BF.bf.op(o, b)) : {b == BF.bf.unop(o, _) : L.LcBlock64} bf_unop_op(o, b) def bf_run_unrun(os: List<&2, BF.LcBfOp>, +b: L.LcBlock64) -> {b == BF.bf.run(os, BF.bf.unrun(os, b)) : L.LcBlock64}: match os: case Nil{}: {==} case Con{+o, +t}: %bf_op_unop(o, BF.bf.unrun(t, b)) : {b == BF.bf.run(t, _) : L.LcBlock64} bf_run_unrun(t, b) def Laws.blowfish_round_trip(k, b): match k: case BF.LcBlowfishKey{+ops}: Equal.sym(L.LcBlock64, b, BF.bf.unrun(ops, BF.bf.run(ops, b)), bf_unrun_run(ops, b)) def Laws.blowfish_round_trip_dual(k, b): match k: case BF.LcBlowfishKey{+ops}: Equal.sym(L.LcBlock64, b, BF.bf.run(ops, BF.bf.unrun(ops, b)), bf_run_unrun(ops, b)) # CAST-256: each step of a quad-round is undone by itself, so QBAR undoes Q # and Q undoes QBAR def c6_sc2(k: C6.LcCast6Ks, s: M.CmBlock) -> {s == C6.c6.sc(k, C6.c6.sc(k, s)) : M.CmBlock}: match k: case C6.LcCast6Ks{+m0, +m1, +m2, +m3, +r0, +r1, +r2, +r3, +t}: match s: case M.CmBlock{a, b, c, +d}: %u32_xx(c, C5.cast.f(C5.LcCastF1{}, t, d, m0, r0)) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, b, _, d} : M.CmBlock} {==} def c6_sb2(k: C6.LcCast6Ks, s: M.CmBlock) -> {s == C6.c6.sb(k, C6.c6.sb(k, s)) : M.CmBlock}: match k: case C6.LcCast6Ks{+m0, +m1, +m2, +m3, +r0, +r1, +r2, +r3, +t}: match s: case M.CmBlock{a, b, +c, d}: %u32_xx(b, C5.cast.f(C5.LcCastF2{}, t, c, m1, r1)) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, _, c, d} : M.CmBlock} {==} def c6_sa2(k: C6.LcCast6Ks, s: M.CmBlock) -> {s == C6.c6.sa(k, C6.c6.sa(k, s)) : M.CmBlock}: match k: case C6.LcCast6Ks{+m0, +m1, +m2, +m3, +r0, +r1, +r2, +r3, +t}: match s: case M.CmBlock{a, +b, c, d}: %u32_xx(a, C5.cast.f(C5.LcCastF3{}, t, b, m2, r2)) : {M.CmBlock{a, b, c, d} == M.CmBlock{_, b, c, d} : M.CmBlock} {==} def c6_sd2(k: C6.LcCast6Ks, s: M.CmBlock) -> {s == C6.c6.sd(k, C6.c6.sd(k, s)) : M.CmBlock}: match k: case C6.LcCast6Ks{+m0, +m1, +m2, +m3, +r0, +r1, +r2, +r3, +t}: match s: case M.CmBlock{+a, b, c, d}: %u32_xx(d, C5.cast.f(C5.LcCastF1{}, t, a, m3, r3)) : {M.CmBlock{a, b, c, d} == M.CmBlock{a, b, c, _} : M.CmBlock} {==} def c6_qq(+k: C6.LcCast6Ks, +s: M.CmBlock) -> {s == C6.c6.qbar(k, C6.c6.q(k, s)) : M.CmBlock}: %c6_sd2(k, C6.c6.sa(k, C6.c6.sb(k, C6.c6.sc(k, s)))) : {s == C6.c6.sc(k, C6.c6.sb(k, C6.c6.sa(k, _))) : M.CmBlock} %c6_sa2(k, C6.c6.sb(k, C6.c6.sc(k, s))) : {s == C6.c6.sc(k, C6.c6.sb(k, _)) : M.CmBlock} %c6_sb2(k, C6.c6.sc(k, s)) : {s == C6.c6.sc(k, _) : M.CmBlock} c6_sc2(k, s) def c6_qbq(+k: C6.LcCast6Ks, +s: M.CmBlock) -> {s == C6.c6.q(k, C6.c6.qbar(k, s)) : M.CmBlock}: %c6_sc2(k, C6.c6.sb(k, C6.c6.sa(k, C6.c6.sd(k, s)))) : {s == C6.c6.sd(k, C6.c6.sa(k, C6.c6.sb(k, _))) : M.CmBlock} %c6_sb2(k, C6.c6.sa(k, C6.c6.sd(k, s))) : {s == C6.c6.sd(k, C6.c6.sa(k, _)) : M.CmBlock} %c6_sa2(k, C6.c6.sd(k, s)) : {s == C6.c6.sd(k, _) : M.CmBlock} c6_sd2(k, s) def c6_unop_op(o: C6.LcCast6Op, +s: M.CmBlock) -> {s == C6.c6.unop(o, C6.c6.op(o, s)) : M.CmBlock}: match o: case C6.LcCast6Op{fwd, +k}: match fwd: case True{}: c6_qq(k, s) case False{}: c6_qbq(k, s) def c6_op_unop(o: C6.LcCast6Op, +s: M.CmBlock) -> {s == C6.c6.op(o, C6.c6.unop(o, s)) : M.CmBlock}: match o: case C6.LcCast6Op{fwd, +k}: match fwd: case True{}: c6_qbq(k, s) case False{}: c6_qq(k, s) def c6_unrun_run(os: List<&2, C6.LcCast6Op>, +s: M.CmBlock) -> {s == C6.c6.unrun(os, C6.c6.run(os, s)) : M.CmBlock}: match os: case Nil{}: {==} case Con{+o, +t}: %c6_unrun_run(t, C6.c6.op(o, s)) : {s == C6.c6.unop(o, _) : M.CmBlock} c6_unop_op(o, s) def c6_run_unrun(os: List<&2, C6.LcCast6Op>, +s: M.CmBlock) -> {s == C6.c6.run(os, C6.c6.unrun(os, s)) : M.CmBlock}: match os: case Nil{}: {==} case Con{+o, +t}: %c6_op_unop(o, C6.c6.unrun(t, s)) : {s == C6.c6.run(t, _) : M.CmBlock} c6_run_unrun(t, s) def Laws.cast6_round_trip(k, b): match k: case C6.LcCast6Key{+ops}: Equal.sym(M.CmBlock, b, C6.c6.unrun(ops, C6.c6.run(ops, b)), c6_unrun_run(ops, b)) def Laws.cast6_round_trip_dual(k, b): match k: case C6.LcCast6Key{+ops}: Equal.sym(M.CmBlock, b, C6.c6.run(ops, C6.c6.unrun(ops, b)), c6_run_unrun(ops, b)) # ARIA: each step of the cipher undone (the "aria" lemmas below), so the # list of steps is; and a block survives its bytes # BEGIN GENERATED by gen/proof.py: aria # each S-box and its inverse undo each other on every byte def aria_sb31(w0: Word(8n)) -> {w0 == A.aria.sb3(A.aria.sb1(w0)) : Word(8n)}: match w0: case WCon{False{}, w1}: match w1: case WCon{False{}, w2}: match w2: case WCon{False{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w2}: match w2: case WCon{False{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w1}: match w1: case WCon{False{}, w2}: match w2: case WCon{False{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w2}: match w2: case WCon{False{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} def aria_sb13(w0: Word(8n)) -> {w0 == A.aria.sb1(A.aria.sb3(w0)) : Word(8n)}: match w0: case WCon{False{}, w1}: match w1: case WCon{False{}, w2}: match w2: case WCon{False{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w2}: match w2: case WCon{False{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w1}: match w1: case WCon{False{}, w2}: match w2: case WCon{False{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w2}: match w2: case WCon{False{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} def aria_sb42(w0: Word(8n)) -> {w0 == A.aria.sb4(A.aria.sb2(w0)) : Word(8n)}: match w0: case WCon{False{}, w1}: match w1: case WCon{False{}, w2}: match w2: case WCon{False{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w2}: match w2: case WCon{False{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w1}: match w1: case WCon{False{}, w2}: match w2: case WCon{False{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w2}: match w2: case WCon{False{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} def aria_sb24(w0: Word(8n)) -> {w0 == A.aria.sb2(A.aria.sb4(w0)) : Word(8n)}: match w0: case WCon{False{}, w1}: match w1: case WCon{False{}, w2}: match w2: case WCon{False{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w2}: match w2: case WCon{False{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w1}: match w1: case WCon{False{}, w2}: match w2: case WCon{False{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w2}: match w2: case WCon{False{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w3}: match w3: case WCon{False{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w4}: match w4: case WCon{False{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w5}: match w5: case WCon{False{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w6}: match w6: case WCon{False{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w7}: match w7: case WCon{False{}, w8}: match w8: case WNil{}: {==} case WCon{True{}, w8}: match w8: case WNil{}: {==} # SL2 undoes SL1, and SL1 undoes SL2, a byte at a time def aria_sl21(s: A.LcAriaSt) -> {s == A.aria.sl2(A.aria.sl1(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %aria_sb31(x0) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{_, A.aria.sb4(A.aria.sb2(x1)), A.aria.sb1(A.aria.sb3(x2)), A.aria.sb2(A.aria.sb4(x3)), A.aria.sb3(A.aria.sb1(x4)), A.aria.sb4(A.aria.sb2(x5)), A.aria.sb1(A.aria.sb3(x6)), A.aria.sb2(A.aria.sb4(x7)), A.aria.sb3(A.aria.sb1(x8)), A.aria.sb4(A.aria.sb2(x9)), A.aria.sb1(A.aria.sb3(x10)), A.aria.sb2(A.aria.sb4(x11)), A.aria.sb3(A.aria.sb1(x12)), A.aria.sb4(A.aria.sb2(x13)), A.aria.sb1(A.aria.sb3(x14)), A.aria.sb2(A.aria.sb4(x15))} : A.LcAriaSt} %aria_sb42(x1) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, _, A.aria.sb1(A.aria.sb3(x2)), A.aria.sb2(A.aria.sb4(x3)), A.aria.sb3(A.aria.sb1(x4)), A.aria.sb4(A.aria.sb2(x5)), A.aria.sb1(A.aria.sb3(x6)), A.aria.sb2(A.aria.sb4(x7)), A.aria.sb3(A.aria.sb1(x8)), A.aria.sb4(A.aria.sb2(x9)), A.aria.sb1(A.aria.sb3(x10)), A.aria.sb2(A.aria.sb4(x11)), A.aria.sb3(A.aria.sb1(x12)), A.aria.sb4(A.aria.sb2(x13)), A.aria.sb1(A.aria.sb3(x14)), A.aria.sb2(A.aria.sb4(x15))} : A.LcAriaSt} %aria_sb13(x2) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, _, A.aria.sb2(A.aria.sb4(x3)), A.aria.sb3(A.aria.sb1(x4)), A.aria.sb4(A.aria.sb2(x5)), A.aria.sb1(A.aria.sb3(x6)), A.aria.sb2(A.aria.sb4(x7)), A.aria.sb3(A.aria.sb1(x8)), A.aria.sb4(A.aria.sb2(x9)), A.aria.sb1(A.aria.sb3(x10)), A.aria.sb2(A.aria.sb4(x11)), A.aria.sb3(A.aria.sb1(x12)), A.aria.sb4(A.aria.sb2(x13)), A.aria.sb1(A.aria.sb3(x14)), A.aria.sb2(A.aria.sb4(x15))} : A.LcAriaSt} %aria_sb24(x3) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, _, A.aria.sb3(A.aria.sb1(x4)), A.aria.sb4(A.aria.sb2(x5)), A.aria.sb1(A.aria.sb3(x6)), A.aria.sb2(A.aria.sb4(x7)), A.aria.sb3(A.aria.sb1(x8)), A.aria.sb4(A.aria.sb2(x9)), A.aria.sb1(A.aria.sb3(x10)), A.aria.sb2(A.aria.sb4(x11)), A.aria.sb3(A.aria.sb1(x12)), A.aria.sb4(A.aria.sb2(x13)), A.aria.sb1(A.aria.sb3(x14)), A.aria.sb2(A.aria.sb4(x15))} : A.LcAriaSt} %aria_sb31(x4) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, _, A.aria.sb4(A.aria.sb2(x5)), A.aria.sb1(A.aria.sb3(x6)), A.aria.sb2(A.aria.sb4(x7)), A.aria.sb3(A.aria.sb1(x8)), A.aria.sb4(A.aria.sb2(x9)), A.aria.sb1(A.aria.sb3(x10)), A.aria.sb2(A.aria.sb4(x11)), A.aria.sb3(A.aria.sb1(x12)), A.aria.sb4(A.aria.sb2(x13)), A.aria.sb1(A.aria.sb3(x14)), A.aria.sb2(A.aria.sb4(x15))} : A.LcAriaSt} %aria_sb42(x5) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, _, A.aria.sb1(A.aria.sb3(x6)), A.aria.sb2(A.aria.sb4(x7)), A.aria.sb3(A.aria.sb1(x8)), A.aria.sb4(A.aria.sb2(x9)), A.aria.sb1(A.aria.sb3(x10)), A.aria.sb2(A.aria.sb4(x11)), A.aria.sb3(A.aria.sb1(x12)), A.aria.sb4(A.aria.sb2(x13)), A.aria.sb1(A.aria.sb3(x14)), A.aria.sb2(A.aria.sb4(x15))} : A.LcAriaSt} %aria_sb13(x6) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, _, A.aria.sb2(A.aria.sb4(x7)), A.aria.sb3(A.aria.sb1(x8)), A.aria.sb4(A.aria.sb2(x9)), A.aria.sb1(A.aria.sb3(x10)), A.aria.sb2(A.aria.sb4(x11)), A.aria.sb3(A.aria.sb1(x12)), A.aria.sb4(A.aria.sb2(x13)), A.aria.sb1(A.aria.sb3(x14)), A.aria.sb2(A.aria.sb4(x15))} : A.LcAriaSt} %aria_sb24(x7) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, _, A.aria.sb3(A.aria.sb1(x8)), A.aria.sb4(A.aria.sb2(x9)), A.aria.sb1(A.aria.sb3(x10)), A.aria.sb2(A.aria.sb4(x11)), A.aria.sb3(A.aria.sb1(x12)), A.aria.sb4(A.aria.sb2(x13)), A.aria.sb1(A.aria.sb3(x14)), A.aria.sb2(A.aria.sb4(x15))} : A.LcAriaSt} %aria_sb31(x8) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, _, A.aria.sb4(A.aria.sb2(x9)), A.aria.sb1(A.aria.sb3(x10)), A.aria.sb2(A.aria.sb4(x11)), A.aria.sb3(A.aria.sb1(x12)), A.aria.sb4(A.aria.sb2(x13)), A.aria.sb1(A.aria.sb3(x14)), A.aria.sb2(A.aria.sb4(x15))} : A.LcAriaSt} %aria_sb42(x9) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, _, A.aria.sb1(A.aria.sb3(x10)), A.aria.sb2(A.aria.sb4(x11)), A.aria.sb3(A.aria.sb1(x12)), A.aria.sb4(A.aria.sb2(x13)), A.aria.sb1(A.aria.sb3(x14)), A.aria.sb2(A.aria.sb4(x15))} : A.LcAriaSt} %aria_sb13(x10) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, _, A.aria.sb2(A.aria.sb4(x11)), A.aria.sb3(A.aria.sb1(x12)), A.aria.sb4(A.aria.sb2(x13)), A.aria.sb1(A.aria.sb3(x14)), A.aria.sb2(A.aria.sb4(x15))} : A.LcAriaSt} %aria_sb24(x11) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, _, A.aria.sb3(A.aria.sb1(x12)), A.aria.sb4(A.aria.sb2(x13)), A.aria.sb1(A.aria.sb3(x14)), A.aria.sb2(A.aria.sb4(x15))} : A.LcAriaSt} %aria_sb31(x12) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, _, A.aria.sb4(A.aria.sb2(x13)), A.aria.sb1(A.aria.sb3(x14)), A.aria.sb2(A.aria.sb4(x15))} : A.LcAriaSt} %aria_sb42(x13) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, _, A.aria.sb1(A.aria.sb3(x14)), A.aria.sb2(A.aria.sb4(x15))} : A.LcAriaSt} %aria_sb13(x14) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, _, A.aria.sb2(A.aria.sb4(x15))} : A.LcAriaSt} %aria_sb24(x15) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, _} : A.LcAriaSt} {==} def aria_sl12(s: A.LcAriaSt) -> {s == A.aria.sl1(A.aria.sl2(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %aria_sb13(x0) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{_, A.aria.sb2(A.aria.sb4(x1)), A.aria.sb3(A.aria.sb1(x2)), A.aria.sb4(A.aria.sb2(x3)), A.aria.sb1(A.aria.sb3(x4)), A.aria.sb2(A.aria.sb4(x5)), A.aria.sb3(A.aria.sb1(x6)), A.aria.sb4(A.aria.sb2(x7)), A.aria.sb1(A.aria.sb3(x8)), A.aria.sb2(A.aria.sb4(x9)), A.aria.sb3(A.aria.sb1(x10)), A.aria.sb4(A.aria.sb2(x11)), A.aria.sb1(A.aria.sb3(x12)), A.aria.sb2(A.aria.sb4(x13)), A.aria.sb3(A.aria.sb1(x14)), A.aria.sb4(A.aria.sb2(x15))} : A.LcAriaSt} %aria_sb24(x1) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, _, A.aria.sb3(A.aria.sb1(x2)), A.aria.sb4(A.aria.sb2(x3)), A.aria.sb1(A.aria.sb3(x4)), A.aria.sb2(A.aria.sb4(x5)), A.aria.sb3(A.aria.sb1(x6)), A.aria.sb4(A.aria.sb2(x7)), A.aria.sb1(A.aria.sb3(x8)), A.aria.sb2(A.aria.sb4(x9)), A.aria.sb3(A.aria.sb1(x10)), A.aria.sb4(A.aria.sb2(x11)), A.aria.sb1(A.aria.sb3(x12)), A.aria.sb2(A.aria.sb4(x13)), A.aria.sb3(A.aria.sb1(x14)), A.aria.sb4(A.aria.sb2(x15))} : A.LcAriaSt} %aria_sb31(x2) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, _, A.aria.sb4(A.aria.sb2(x3)), A.aria.sb1(A.aria.sb3(x4)), A.aria.sb2(A.aria.sb4(x5)), A.aria.sb3(A.aria.sb1(x6)), A.aria.sb4(A.aria.sb2(x7)), A.aria.sb1(A.aria.sb3(x8)), A.aria.sb2(A.aria.sb4(x9)), A.aria.sb3(A.aria.sb1(x10)), A.aria.sb4(A.aria.sb2(x11)), A.aria.sb1(A.aria.sb3(x12)), A.aria.sb2(A.aria.sb4(x13)), A.aria.sb3(A.aria.sb1(x14)), A.aria.sb4(A.aria.sb2(x15))} : A.LcAriaSt} %aria_sb42(x3) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, _, A.aria.sb1(A.aria.sb3(x4)), A.aria.sb2(A.aria.sb4(x5)), A.aria.sb3(A.aria.sb1(x6)), A.aria.sb4(A.aria.sb2(x7)), A.aria.sb1(A.aria.sb3(x8)), A.aria.sb2(A.aria.sb4(x9)), A.aria.sb3(A.aria.sb1(x10)), A.aria.sb4(A.aria.sb2(x11)), A.aria.sb1(A.aria.sb3(x12)), A.aria.sb2(A.aria.sb4(x13)), A.aria.sb3(A.aria.sb1(x14)), A.aria.sb4(A.aria.sb2(x15))} : A.LcAriaSt} %aria_sb13(x4) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, _, A.aria.sb2(A.aria.sb4(x5)), A.aria.sb3(A.aria.sb1(x6)), A.aria.sb4(A.aria.sb2(x7)), A.aria.sb1(A.aria.sb3(x8)), A.aria.sb2(A.aria.sb4(x9)), A.aria.sb3(A.aria.sb1(x10)), A.aria.sb4(A.aria.sb2(x11)), A.aria.sb1(A.aria.sb3(x12)), A.aria.sb2(A.aria.sb4(x13)), A.aria.sb3(A.aria.sb1(x14)), A.aria.sb4(A.aria.sb2(x15))} : A.LcAriaSt} %aria_sb24(x5) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, _, A.aria.sb3(A.aria.sb1(x6)), A.aria.sb4(A.aria.sb2(x7)), A.aria.sb1(A.aria.sb3(x8)), A.aria.sb2(A.aria.sb4(x9)), A.aria.sb3(A.aria.sb1(x10)), A.aria.sb4(A.aria.sb2(x11)), A.aria.sb1(A.aria.sb3(x12)), A.aria.sb2(A.aria.sb4(x13)), A.aria.sb3(A.aria.sb1(x14)), A.aria.sb4(A.aria.sb2(x15))} : A.LcAriaSt} %aria_sb31(x6) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, _, A.aria.sb4(A.aria.sb2(x7)), A.aria.sb1(A.aria.sb3(x8)), A.aria.sb2(A.aria.sb4(x9)), A.aria.sb3(A.aria.sb1(x10)), A.aria.sb4(A.aria.sb2(x11)), A.aria.sb1(A.aria.sb3(x12)), A.aria.sb2(A.aria.sb4(x13)), A.aria.sb3(A.aria.sb1(x14)), A.aria.sb4(A.aria.sb2(x15))} : A.LcAriaSt} %aria_sb42(x7) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, _, A.aria.sb1(A.aria.sb3(x8)), A.aria.sb2(A.aria.sb4(x9)), A.aria.sb3(A.aria.sb1(x10)), A.aria.sb4(A.aria.sb2(x11)), A.aria.sb1(A.aria.sb3(x12)), A.aria.sb2(A.aria.sb4(x13)), A.aria.sb3(A.aria.sb1(x14)), A.aria.sb4(A.aria.sb2(x15))} : A.LcAriaSt} %aria_sb13(x8) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, _, A.aria.sb2(A.aria.sb4(x9)), A.aria.sb3(A.aria.sb1(x10)), A.aria.sb4(A.aria.sb2(x11)), A.aria.sb1(A.aria.sb3(x12)), A.aria.sb2(A.aria.sb4(x13)), A.aria.sb3(A.aria.sb1(x14)), A.aria.sb4(A.aria.sb2(x15))} : A.LcAriaSt} %aria_sb24(x9) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, _, A.aria.sb3(A.aria.sb1(x10)), A.aria.sb4(A.aria.sb2(x11)), A.aria.sb1(A.aria.sb3(x12)), A.aria.sb2(A.aria.sb4(x13)), A.aria.sb3(A.aria.sb1(x14)), A.aria.sb4(A.aria.sb2(x15))} : A.LcAriaSt} %aria_sb31(x10) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, _, A.aria.sb4(A.aria.sb2(x11)), A.aria.sb1(A.aria.sb3(x12)), A.aria.sb2(A.aria.sb4(x13)), A.aria.sb3(A.aria.sb1(x14)), A.aria.sb4(A.aria.sb2(x15))} : A.LcAriaSt} %aria_sb42(x11) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, _, A.aria.sb1(A.aria.sb3(x12)), A.aria.sb2(A.aria.sb4(x13)), A.aria.sb3(A.aria.sb1(x14)), A.aria.sb4(A.aria.sb2(x15))} : A.LcAriaSt} %aria_sb13(x12) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, _, A.aria.sb2(A.aria.sb4(x13)), A.aria.sb3(A.aria.sb1(x14)), A.aria.sb4(A.aria.sb2(x15))} : A.LcAriaSt} %aria_sb24(x13) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, _, A.aria.sb3(A.aria.sb1(x14)), A.aria.sb4(A.aria.sb2(x15))} : A.LcAriaSt} %aria_sb31(x14) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, _, A.aria.sb4(A.aria.sb2(x15))} : A.LcAriaSt} %aria_sb42(x15) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, _} : A.LcAriaSt} {==} # a round key XORed twice def aria_xor2(s: A.LcAriaSt, k: M.CmBlock) -> {s == A.aria.xor(A.aria.xor(s, k), k) : A.LcAriaSt}: match s k: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15} M.CmBlock{U32{+k0}, U32{+k1}, U32{+k2}, U32{+k3}}: %word_xx(8n, x0, A.aria.byte0(k0)) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{_, Word.xor(8n, Word.xor(8n, x1, A.aria.byte1(k0)), A.aria.byte1(k0)), Word.xor(8n, Word.xor(8n, x2, A.aria.byte2(k0)), A.aria.byte2(k0)), Word.xor(8n, Word.xor(8n, x3, A.aria.byte3(k0)), A.aria.byte3(k0)), Word.xor(8n, Word.xor(8n, x4, A.aria.byte0(k1)), A.aria.byte0(k1)), Word.xor(8n, Word.xor(8n, x5, A.aria.byte1(k1)), A.aria.byte1(k1)), Word.xor(8n, Word.xor(8n, x6, A.aria.byte2(k1)), A.aria.byte2(k1)), Word.xor(8n, Word.xor(8n, x7, A.aria.byte3(k1)), A.aria.byte3(k1)), Word.xor(8n, Word.xor(8n, x8, A.aria.byte0(k2)), A.aria.byte0(k2)), Word.xor(8n, Word.xor(8n, x9, A.aria.byte1(k2)), A.aria.byte1(k2)), Word.xor(8n, Word.xor(8n, x10, A.aria.byte2(k2)), A.aria.byte2(k2)), Word.xor(8n, Word.xor(8n, x11, A.aria.byte3(k2)), A.aria.byte3(k2)), Word.xor(8n, Word.xor(8n, x12, A.aria.byte0(k3)), A.aria.byte0(k3)), Word.xor(8n, Word.xor(8n, x13, A.aria.byte1(k3)), A.aria.byte1(k3)), Word.xor(8n, Word.xor(8n, x14, A.aria.byte2(k3)), A.aria.byte2(k3)), Word.xor(8n, Word.xor(8n, x15, A.aria.byte3(k3)), A.aria.byte3(k3))} : A.LcAriaSt} %word_xx(8n, x1, A.aria.byte1(k0)) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, _, Word.xor(8n, Word.xor(8n, x2, A.aria.byte2(k0)), A.aria.byte2(k0)), Word.xor(8n, Word.xor(8n, x3, A.aria.byte3(k0)), A.aria.byte3(k0)), Word.xor(8n, Word.xor(8n, x4, A.aria.byte0(k1)), A.aria.byte0(k1)), Word.xor(8n, Word.xor(8n, x5, A.aria.byte1(k1)), A.aria.byte1(k1)), Word.xor(8n, Word.xor(8n, x6, A.aria.byte2(k1)), A.aria.byte2(k1)), Word.xor(8n, Word.xor(8n, x7, A.aria.byte3(k1)), A.aria.byte3(k1)), Word.xor(8n, Word.xor(8n, x8, A.aria.byte0(k2)), A.aria.byte0(k2)), Word.xor(8n, Word.xor(8n, x9, A.aria.byte1(k2)), A.aria.byte1(k2)), Word.xor(8n, Word.xor(8n, x10, A.aria.byte2(k2)), A.aria.byte2(k2)), Word.xor(8n, Word.xor(8n, x11, A.aria.byte3(k2)), A.aria.byte3(k2)), Word.xor(8n, Word.xor(8n, x12, A.aria.byte0(k3)), A.aria.byte0(k3)), Word.xor(8n, Word.xor(8n, x13, A.aria.byte1(k3)), A.aria.byte1(k3)), Word.xor(8n, Word.xor(8n, x14, A.aria.byte2(k3)), A.aria.byte2(k3)), Word.xor(8n, Word.xor(8n, x15, A.aria.byte3(k3)), A.aria.byte3(k3))} : A.LcAriaSt} %word_xx(8n, x2, A.aria.byte2(k0)) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, _, Word.xor(8n, Word.xor(8n, x3, A.aria.byte3(k0)), A.aria.byte3(k0)), Word.xor(8n, Word.xor(8n, x4, A.aria.byte0(k1)), A.aria.byte0(k1)), Word.xor(8n, Word.xor(8n, x5, A.aria.byte1(k1)), A.aria.byte1(k1)), Word.xor(8n, Word.xor(8n, x6, A.aria.byte2(k1)), A.aria.byte2(k1)), Word.xor(8n, Word.xor(8n, x7, A.aria.byte3(k1)), A.aria.byte3(k1)), Word.xor(8n, Word.xor(8n, x8, A.aria.byte0(k2)), A.aria.byte0(k2)), Word.xor(8n, Word.xor(8n, x9, A.aria.byte1(k2)), A.aria.byte1(k2)), Word.xor(8n, Word.xor(8n, x10, A.aria.byte2(k2)), A.aria.byte2(k2)), Word.xor(8n, Word.xor(8n, x11, A.aria.byte3(k2)), A.aria.byte3(k2)), Word.xor(8n, Word.xor(8n, x12, A.aria.byte0(k3)), A.aria.byte0(k3)), Word.xor(8n, Word.xor(8n, x13, A.aria.byte1(k3)), A.aria.byte1(k3)), Word.xor(8n, Word.xor(8n, x14, A.aria.byte2(k3)), A.aria.byte2(k3)), Word.xor(8n, Word.xor(8n, x15, A.aria.byte3(k3)), A.aria.byte3(k3))} : A.LcAriaSt} %word_xx(8n, x3, A.aria.byte3(k0)) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, _, Word.xor(8n, Word.xor(8n, x4, A.aria.byte0(k1)), A.aria.byte0(k1)), Word.xor(8n, Word.xor(8n, x5, A.aria.byte1(k1)), A.aria.byte1(k1)), Word.xor(8n, Word.xor(8n, x6, A.aria.byte2(k1)), A.aria.byte2(k1)), Word.xor(8n, Word.xor(8n, x7, A.aria.byte3(k1)), A.aria.byte3(k1)), Word.xor(8n, Word.xor(8n, x8, A.aria.byte0(k2)), A.aria.byte0(k2)), Word.xor(8n, Word.xor(8n, x9, A.aria.byte1(k2)), A.aria.byte1(k2)), Word.xor(8n, Word.xor(8n, x10, A.aria.byte2(k2)), A.aria.byte2(k2)), Word.xor(8n, Word.xor(8n, x11, A.aria.byte3(k2)), A.aria.byte3(k2)), Word.xor(8n, Word.xor(8n, x12, A.aria.byte0(k3)), A.aria.byte0(k3)), Word.xor(8n, Word.xor(8n, x13, A.aria.byte1(k3)), A.aria.byte1(k3)), Word.xor(8n, Word.xor(8n, x14, A.aria.byte2(k3)), A.aria.byte2(k3)), Word.xor(8n, Word.xor(8n, x15, A.aria.byte3(k3)), A.aria.byte3(k3))} : A.LcAriaSt} %word_xx(8n, x4, A.aria.byte0(k1)) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, _, Word.xor(8n, Word.xor(8n, x5, A.aria.byte1(k1)), A.aria.byte1(k1)), Word.xor(8n, Word.xor(8n, x6, A.aria.byte2(k1)), A.aria.byte2(k1)), Word.xor(8n, Word.xor(8n, x7, A.aria.byte3(k1)), A.aria.byte3(k1)), Word.xor(8n, Word.xor(8n, x8, A.aria.byte0(k2)), A.aria.byte0(k2)), Word.xor(8n, Word.xor(8n, x9, A.aria.byte1(k2)), A.aria.byte1(k2)), Word.xor(8n, Word.xor(8n, x10, A.aria.byte2(k2)), A.aria.byte2(k2)), Word.xor(8n, Word.xor(8n, x11, A.aria.byte3(k2)), A.aria.byte3(k2)), Word.xor(8n, Word.xor(8n, x12, A.aria.byte0(k3)), A.aria.byte0(k3)), Word.xor(8n, Word.xor(8n, x13, A.aria.byte1(k3)), A.aria.byte1(k3)), Word.xor(8n, Word.xor(8n, x14, A.aria.byte2(k3)), A.aria.byte2(k3)), Word.xor(8n, Word.xor(8n, x15, A.aria.byte3(k3)), A.aria.byte3(k3))} : A.LcAriaSt} %word_xx(8n, x5, A.aria.byte1(k1)) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, _, Word.xor(8n, Word.xor(8n, x6, A.aria.byte2(k1)), A.aria.byte2(k1)), Word.xor(8n, Word.xor(8n, x7, A.aria.byte3(k1)), A.aria.byte3(k1)), Word.xor(8n, Word.xor(8n, x8, A.aria.byte0(k2)), A.aria.byte0(k2)), Word.xor(8n, Word.xor(8n, x9, A.aria.byte1(k2)), A.aria.byte1(k2)), Word.xor(8n, Word.xor(8n, x10, A.aria.byte2(k2)), A.aria.byte2(k2)), Word.xor(8n, Word.xor(8n, x11, A.aria.byte3(k2)), A.aria.byte3(k2)), Word.xor(8n, Word.xor(8n, x12, A.aria.byte0(k3)), A.aria.byte0(k3)), Word.xor(8n, Word.xor(8n, x13, A.aria.byte1(k3)), A.aria.byte1(k3)), Word.xor(8n, Word.xor(8n, x14, A.aria.byte2(k3)), A.aria.byte2(k3)), Word.xor(8n, Word.xor(8n, x15, A.aria.byte3(k3)), A.aria.byte3(k3))} : A.LcAriaSt} %word_xx(8n, x6, A.aria.byte2(k1)) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, _, Word.xor(8n, Word.xor(8n, x7, A.aria.byte3(k1)), A.aria.byte3(k1)), Word.xor(8n, Word.xor(8n, x8, A.aria.byte0(k2)), A.aria.byte0(k2)), Word.xor(8n, Word.xor(8n, x9, A.aria.byte1(k2)), A.aria.byte1(k2)), Word.xor(8n, Word.xor(8n, x10, A.aria.byte2(k2)), A.aria.byte2(k2)), Word.xor(8n, Word.xor(8n, x11, A.aria.byte3(k2)), A.aria.byte3(k2)), Word.xor(8n, Word.xor(8n, x12, A.aria.byte0(k3)), A.aria.byte0(k3)), Word.xor(8n, Word.xor(8n, x13, A.aria.byte1(k3)), A.aria.byte1(k3)), Word.xor(8n, Word.xor(8n, x14, A.aria.byte2(k3)), A.aria.byte2(k3)), Word.xor(8n, Word.xor(8n, x15, A.aria.byte3(k3)), A.aria.byte3(k3))} : A.LcAriaSt} %word_xx(8n, x7, A.aria.byte3(k1)) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, _, Word.xor(8n, Word.xor(8n, x8, A.aria.byte0(k2)), A.aria.byte0(k2)), Word.xor(8n, Word.xor(8n, x9, A.aria.byte1(k2)), A.aria.byte1(k2)), Word.xor(8n, Word.xor(8n, x10, A.aria.byte2(k2)), A.aria.byte2(k2)), Word.xor(8n, Word.xor(8n, x11, A.aria.byte3(k2)), A.aria.byte3(k2)), Word.xor(8n, Word.xor(8n, x12, A.aria.byte0(k3)), A.aria.byte0(k3)), Word.xor(8n, Word.xor(8n, x13, A.aria.byte1(k3)), A.aria.byte1(k3)), Word.xor(8n, Word.xor(8n, x14, A.aria.byte2(k3)), A.aria.byte2(k3)), Word.xor(8n, Word.xor(8n, x15, A.aria.byte3(k3)), A.aria.byte3(k3))} : A.LcAriaSt} %word_xx(8n, x8, A.aria.byte0(k2)) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, _, Word.xor(8n, Word.xor(8n, x9, A.aria.byte1(k2)), A.aria.byte1(k2)), Word.xor(8n, Word.xor(8n, x10, A.aria.byte2(k2)), A.aria.byte2(k2)), Word.xor(8n, Word.xor(8n, x11, A.aria.byte3(k2)), A.aria.byte3(k2)), Word.xor(8n, Word.xor(8n, x12, A.aria.byte0(k3)), A.aria.byte0(k3)), Word.xor(8n, Word.xor(8n, x13, A.aria.byte1(k3)), A.aria.byte1(k3)), Word.xor(8n, Word.xor(8n, x14, A.aria.byte2(k3)), A.aria.byte2(k3)), Word.xor(8n, Word.xor(8n, x15, A.aria.byte3(k3)), A.aria.byte3(k3))} : A.LcAriaSt} %word_xx(8n, x9, A.aria.byte1(k2)) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, _, Word.xor(8n, Word.xor(8n, x10, A.aria.byte2(k2)), A.aria.byte2(k2)), Word.xor(8n, Word.xor(8n, x11, A.aria.byte3(k2)), A.aria.byte3(k2)), Word.xor(8n, Word.xor(8n, x12, A.aria.byte0(k3)), A.aria.byte0(k3)), Word.xor(8n, Word.xor(8n, x13, A.aria.byte1(k3)), A.aria.byte1(k3)), Word.xor(8n, Word.xor(8n, x14, A.aria.byte2(k3)), A.aria.byte2(k3)), Word.xor(8n, Word.xor(8n, x15, A.aria.byte3(k3)), A.aria.byte3(k3))} : A.LcAriaSt} %word_xx(8n, x10, A.aria.byte2(k2)) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, _, Word.xor(8n, Word.xor(8n, x11, A.aria.byte3(k2)), A.aria.byte3(k2)), Word.xor(8n, Word.xor(8n, x12, A.aria.byte0(k3)), A.aria.byte0(k3)), Word.xor(8n, Word.xor(8n, x13, A.aria.byte1(k3)), A.aria.byte1(k3)), Word.xor(8n, Word.xor(8n, x14, A.aria.byte2(k3)), A.aria.byte2(k3)), Word.xor(8n, Word.xor(8n, x15, A.aria.byte3(k3)), A.aria.byte3(k3))} : A.LcAriaSt} %word_xx(8n, x11, A.aria.byte3(k2)) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, _, Word.xor(8n, Word.xor(8n, x12, A.aria.byte0(k3)), A.aria.byte0(k3)), Word.xor(8n, Word.xor(8n, x13, A.aria.byte1(k3)), A.aria.byte1(k3)), Word.xor(8n, Word.xor(8n, x14, A.aria.byte2(k3)), A.aria.byte2(k3)), Word.xor(8n, Word.xor(8n, x15, A.aria.byte3(k3)), A.aria.byte3(k3))} : A.LcAriaSt} %word_xx(8n, x12, A.aria.byte0(k3)) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, _, Word.xor(8n, Word.xor(8n, x13, A.aria.byte1(k3)), A.aria.byte1(k3)), Word.xor(8n, Word.xor(8n, x14, A.aria.byte2(k3)), A.aria.byte2(k3)), Word.xor(8n, Word.xor(8n, x15, A.aria.byte3(k3)), A.aria.byte3(k3))} : A.LcAriaSt} %word_xx(8n, x13, A.aria.byte1(k3)) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, _, Word.xor(8n, Word.xor(8n, x14, A.aria.byte2(k3)), A.aria.byte2(k3)), Word.xor(8n, Word.xor(8n, x15, A.aria.byte3(k3)), A.aria.byte3(k3))} : A.LcAriaSt} %word_xx(8n, x14, A.aria.byte2(k3)) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, _, Word.xor(8n, Word.xor(8n, x15, A.aria.byte3(k3)), A.aria.byte3(k3))} : A.LcAriaSt} %word_xx(8n, x15, A.aria.byte3(k3)) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, _} : A.LcAriaSt} {==} # each elementary step of the diffusion layer is undone by itself def aria_e0(s: A.LcAriaSt) -> {s == A.aria.e0(A.aria.e0(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x10, x15) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x15), x15), Word.xor(8n, Word.xor(8n, x2, x15), x15), x3, Word.xor(8n, Word.xor(8n, x4, x15), x15), Word.xor(8n, Word.xor(8n, x5, x15), x15), x6, x7, Word.xor(8n, Word.xor(8n, x8, x15), x15), x9, _, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x8, x15) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x15), x15), Word.xor(8n, Word.xor(8n, x2, x15), x15), x3, Word.xor(8n, Word.xor(8n, x4, x15), x15), Word.xor(8n, Word.xor(8n, x5, x15), x15), x6, x7, _, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x5, x15) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x15), x15), Word.xor(8n, Word.xor(8n, x2, x15), x15), x3, Word.xor(8n, Word.xor(8n, x4, x15), x15), _, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x4, x15) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x15), x15), Word.xor(8n, Word.xor(8n, x2, x15), x15), x3, _, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x2, x15) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x15), x15), _, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x1, x15) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, _, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e1(s: A.LcAriaSt) -> {s == A.aria.e1(A.aria.e1(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x11, x14) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x14), x14), x1, x2, Word.xor(8n, Word.xor(8n, x3, x14), x14), Word.xor(8n, Word.xor(8n, x4, x14), x14), Word.xor(8n, Word.xor(8n, x5, x14), x14), x6, x7, x8, Word.xor(8n, Word.xor(8n, x9, x14), x14), x10, _, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x9, x14) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x14), x14), x1, x2, Word.xor(8n, Word.xor(8n, x3, x14), x14), Word.xor(8n, Word.xor(8n, x4, x14), x14), Word.xor(8n, Word.xor(8n, x5, x14), x14), x6, x7, x8, _, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x5, x14) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x14), x14), x1, x2, Word.xor(8n, Word.xor(8n, x3, x14), x14), Word.xor(8n, Word.xor(8n, x4, x14), x14), _, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x4, x14) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x14), x14), x1, x2, Word.xor(8n, Word.xor(8n, x3, x14), x14), _, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x3, x14) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x14), x14), x1, x2, _, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x0, x14) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{_, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e2(s: A.LcAriaSt) -> {s == A.aria.e2(A.aria.e2(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x10, x13) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x13), x13), x1, x2, Word.xor(8n, Word.xor(8n, x3, x13), x13), x4, x5, Word.xor(8n, Word.xor(8n, x6, x13), x13), Word.xor(8n, Word.xor(8n, x7, x13), x13), Word.xor(8n, Word.xor(8n, x8, x13), x13), x9, _, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x8, x13) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x13), x13), x1, x2, Word.xor(8n, Word.xor(8n, x3, x13), x13), x4, x5, Word.xor(8n, Word.xor(8n, x6, x13), x13), Word.xor(8n, Word.xor(8n, x7, x13), x13), _, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x7, x13) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x13), x13), x1, x2, Word.xor(8n, Word.xor(8n, x3, x13), x13), x4, x5, Word.xor(8n, Word.xor(8n, x6, x13), x13), _, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x6, x13) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x13), x13), x1, x2, Word.xor(8n, Word.xor(8n, x3, x13), x13), x4, x5, _, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x3, x13) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x13), x13), x1, x2, _, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x0, x13) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{_, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e3(s: A.LcAriaSt) -> {s == A.aria.e3(A.aria.e3(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x11, x12) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x12), x12), Word.xor(8n, Word.xor(8n, x2, x12), x12), x3, x4, x5, Word.xor(8n, Word.xor(8n, x6, x12), x12), Word.xor(8n, Word.xor(8n, x7, x12), x12), x8, Word.xor(8n, Word.xor(8n, x9, x12), x12), x10, _, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x9, x12) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x12), x12), Word.xor(8n, Word.xor(8n, x2, x12), x12), x3, x4, x5, Word.xor(8n, Word.xor(8n, x6, x12), x12), Word.xor(8n, Word.xor(8n, x7, x12), x12), x8, _, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x7, x12) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x12), x12), Word.xor(8n, Word.xor(8n, x2, x12), x12), x3, x4, x5, Word.xor(8n, Word.xor(8n, x6, x12), x12), _, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x6, x12) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x12), x12), Word.xor(8n, Word.xor(8n, x2, x12), x12), x3, x4, x5, _, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x2, x12) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x12), x12), _, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x1, x12) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, _, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e4(s: A.LcAriaSt) -> {s == A.aria.e4(A.aria.e4(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x9, x11) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x11), x11), Word.xor(8n, Word.xor(8n, x1, x11), x11), Word.xor(8n, Word.xor(8n, x2, x11), x11), Word.xor(8n, Word.xor(8n, x3, x11), x11), Word.xor(8n, Word.xor(8n, x4, x11), x11), Word.xor(8n, Word.xor(8n, x5, x11), x11), Word.xor(8n, Word.xor(8n, x6, x11), x11), Word.xor(8n, Word.xor(8n, x7, x11), x11), x8, _, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x7, x11) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x11), x11), Word.xor(8n, Word.xor(8n, x1, x11), x11), Word.xor(8n, Word.xor(8n, x2, x11), x11), Word.xor(8n, Word.xor(8n, x3, x11), x11), Word.xor(8n, Word.xor(8n, x4, x11), x11), Word.xor(8n, Word.xor(8n, x5, x11), x11), Word.xor(8n, Word.xor(8n, x6, x11), x11), _, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x6, x11) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x11), x11), Word.xor(8n, Word.xor(8n, x1, x11), x11), Word.xor(8n, Word.xor(8n, x2, x11), x11), Word.xor(8n, Word.xor(8n, x3, x11), x11), Word.xor(8n, Word.xor(8n, x4, x11), x11), Word.xor(8n, Word.xor(8n, x5, x11), x11), _, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x5, x11) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x11), x11), Word.xor(8n, Word.xor(8n, x1, x11), x11), Word.xor(8n, Word.xor(8n, x2, x11), x11), Word.xor(8n, Word.xor(8n, x3, x11), x11), Word.xor(8n, Word.xor(8n, x4, x11), x11), _, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x4, x11) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x11), x11), Word.xor(8n, Word.xor(8n, x1, x11), x11), Word.xor(8n, Word.xor(8n, x2, x11), x11), Word.xor(8n, Word.xor(8n, x3, x11), x11), _, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x3, x11) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x11), x11), Word.xor(8n, Word.xor(8n, x1, x11), x11), Word.xor(8n, Word.xor(8n, x2, x11), x11), _, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x2, x11) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x11), x11), Word.xor(8n, Word.xor(8n, x1, x11), x11), _, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x1, x11) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x11), x11), _, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x0, x11) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{_, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e5(s: A.LcAriaSt) -> {s == A.aria.e5(A.aria.e5(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x8, x10) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x10), x10), Word.xor(8n, Word.xor(8n, x1, x10), x10), Word.xor(8n, Word.xor(8n, x2, x10), x10), Word.xor(8n, Word.xor(8n, x3, x10), x10), Word.xor(8n, Word.xor(8n, x4, x10), x10), Word.xor(8n, Word.xor(8n, x5, x10), x10), Word.xor(8n, Word.xor(8n, x6, x10), x10), Word.xor(8n, Word.xor(8n, x7, x10), x10), _, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x7, x10) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x10), x10), Word.xor(8n, Word.xor(8n, x1, x10), x10), Word.xor(8n, Word.xor(8n, x2, x10), x10), Word.xor(8n, Word.xor(8n, x3, x10), x10), Word.xor(8n, Word.xor(8n, x4, x10), x10), Word.xor(8n, Word.xor(8n, x5, x10), x10), Word.xor(8n, Word.xor(8n, x6, x10), x10), _, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x6, x10) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x10), x10), Word.xor(8n, Word.xor(8n, x1, x10), x10), Word.xor(8n, Word.xor(8n, x2, x10), x10), Word.xor(8n, Word.xor(8n, x3, x10), x10), Word.xor(8n, Word.xor(8n, x4, x10), x10), Word.xor(8n, Word.xor(8n, x5, x10), x10), _, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x5, x10) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x10), x10), Word.xor(8n, Word.xor(8n, x1, x10), x10), Word.xor(8n, Word.xor(8n, x2, x10), x10), Word.xor(8n, Word.xor(8n, x3, x10), x10), Word.xor(8n, Word.xor(8n, x4, x10), x10), _, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x4, x10) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x10), x10), Word.xor(8n, Word.xor(8n, x1, x10), x10), Word.xor(8n, Word.xor(8n, x2, x10), x10), Word.xor(8n, Word.xor(8n, x3, x10), x10), _, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x3, x10) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x10), x10), Word.xor(8n, Word.xor(8n, x1, x10), x10), Word.xor(8n, Word.xor(8n, x2, x10), x10), _, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x2, x10) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x10), x10), Word.xor(8n, Word.xor(8n, x1, x10), x10), _, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x1, x10) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x10), x10), _, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x0, x10) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{_, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e6(s: A.LcAriaSt) -> {s == A.aria.e6(A.aria.e6(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x14, x9) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x9), x9), Word.xor(8n, Word.xor(8n, x1, x9), x9), x2, x3, x4, Word.xor(8n, Word.xor(8n, x5, x9), x9), Word.xor(8n, Word.xor(8n, x6, x9), x9), x7, x8, x9, x10, Word.xor(8n, Word.xor(8n, x11, x9), x9), Word.xor(8n, Word.xor(8n, x12, x9), x9), x13, _, x15} : A.LcAriaSt} %word_xx(8n, x12, x9) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x9), x9), Word.xor(8n, Word.xor(8n, x1, x9), x9), x2, x3, x4, Word.xor(8n, Word.xor(8n, x5, x9), x9), Word.xor(8n, Word.xor(8n, x6, x9), x9), x7, x8, x9, x10, Word.xor(8n, Word.xor(8n, x11, x9), x9), _, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x11, x9) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x9), x9), Word.xor(8n, Word.xor(8n, x1, x9), x9), x2, x3, x4, Word.xor(8n, Word.xor(8n, x5, x9), x9), Word.xor(8n, Word.xor(8n, x6, x9), x9), x7, x8, x9, x10, _, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x6, x9) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x9), x9), Word.xor(8n, Word.xor(8n, x1, x9), x9), x2, x3, x4, Word.xor(8n, Word.xor(8n, x5, x9), x9), _, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x5, x9) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x9), x9), Word.xor(8n, Word.xor(8n, x1, x9), x9), x2, x3, x4, _, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x1, x9) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x9), x9), _, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x0, x9) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{_, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e7(s: A.LcAriaSt) -> {s == A.aria.e7(A.aria.e7(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x9, x11) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, _, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e8(s: A.LcAriaSt) -> {s == A.aria.e8(A.aria.e8(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x15, x8) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x8), x8), Word.xor(8n, Word.xor(8n, x1, x8), x8), x2, x3, Word.xor(8n, Word.xor(8n, x4, x8), x8), x5, x6, Word.xor(8n, Word.xor(8n, x7, x8), x8), x8, x9, Word.xor(8n, Word.xor(8n, x10, x8), x8), x11, x12, Word.xor(8n, Word.xor(8n, x13, x8), x8), x14, _} : A.LcAriaSt} %word_xx(8n, x13, x8) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x8), x8), Word.xor(8n, Word.xor(8n, x1, x8), x8), x2, x3, Word.xor(8n, Word.xor(8n, x4, x8), x8), x5, x6, Word.xor(8n, Word.xor(8n, x7, x8), x8), x8, x9, Word.xor(8n, Word.xor(8n, x10, x8), x8), x11, x12, _, x14, x15} : A.LcAriaSt} %word_xx(8n, x10, x8) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x8), x8), Word.xor(8n, Word.xor(8n, x1, x8), x8), x2, x3, Word.xor(8n, Word.xor(8n, x4, x8), x8), x5, x6, Word.xor(8n, Word.xor(8n, x7, x8), x8), x8, x9, _, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x7, x8) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x8), x8), Word.xor(8n, Word.xor(8n, x1, x8), x8), x2, x3, Word.xor(8n, Word.xor(8n, x4, x8), x8), x5, x6, _, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x4, x8) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x8), x8), Word.xor(8n, Word.xor(8n, x1, x8), x8), x2, x3, _, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x1, x8) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x8), x8), _, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x0, x8) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{_, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e9(s: A.LcAriaSt) -> {s == A.aria.e9(A.aria.e9(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x8, x10) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, _, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e10(s: A.LcAriaSt) -> {s == A.aria.e10(A.aria.e10(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x11, x7) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x7), x7), Word.xor(8n, Word.xor(8n, x1, x7), x7), Word.xor(8n, Word.xor(8n, x2, x7), x7), Word.xor(8n, Word.xor(8n, x3, x7), x7), x4, x5, Word.xor(8n, Word.xor(8n, x6, x7), x7), x7, Word.xor(8n, Word.xor(8n, x8, x7), x7), Word.xor(8n, Word.xor(8n, x9, x7), x7), Word.xor(8n, Word.xor(8n, x10, x7), x7), _, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x10, x7) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x7), x7), Word.xor(8n, Word.xor(8n, x1, x7), x7), Word.xor(8n, Word.xor(8n, x2, x7), x7), Word.xor(8n, Word.xor(8n, x3, x7), x7), x4, x5, Word.xor(8n, Word.xor(8n, x6, x7), x7), x7, Word.xor(8n, Word.xor(8n, x8, x7), x7), Word.xor(8n, Word.xor(8n, x9, x7), x7), _, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x9, x7) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x7), x7), Word.xor(8n, Word.xor(8n, x1, x7), x7), Word.xor(8n, Word.xor(8n, x2, x7), x7), Word.xor(8n, Word.xor(8n, x3, x7), x7), x4, x5, Word.xor(8n, Word.xor(8n, x6, x7), x7), x7, Word.xor(8n, Word.xor(8n, x8, x7), x7), _, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x8, x7) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x7), x7), Word.xor(8n, Word.xor(8n, x1, x7), x7), Word.xor(8n, Word.xor(8n, x2, x7), x7), Word.xor(8n, Word.xor(8n, x3, x7), x7), x4, x5, Word.xor(8n, Word.xor(8n, x6, x7), x7), x7, _, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x6, x7) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x7), x7), Word.xor(8n, Word.xor(8n, x1, x7), x7), Word.xor(8n, Word.xor(8n, x2, x7), x7), Word.xor(8n, Word.xor(8n, x3, x7), x7), x4, x5, _, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x3, x7) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x7), x7), Word.xor(8n, Word.xor(8n, x1, x7), x7), Word.xor(8n, Word.xor(8n, x2, x7), x7), _, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x2, x7) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x7), x7), Word.xor(8n, Word.xor(8n, x1, x7), x7), _, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x1, x7) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x7), x7), _, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x0, x7) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{_, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e11(s: A.LcAriaSt) -> {s == A.aria.e11(A.aria.e11(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x15, x6) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x6), x6), x2, Word.xor(8n, Word.xor(8n, x3, x6), x6), x4, x5, x6, Word.xor(8n, Word.xor(8n, x7, x6), x6), Word.xor(8n, Word.xor(8n, x8, x6), x6), x9, x10, Word.xor(8n, Word.xor(8n, x11, x6), x6), x12, x13, Word.xor(8n, Word.xor(8n, x14, x6), x6), _} : A.LcAriaSt} %word_xx(8n, x14, x6) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x6), x6), x2, Word.xor(8n, Word.xor(8n, x3, x6), x6), x4, x5, x6, Word.xor(8n, Word.xor(8n, x7, x6), x6), Word.xor(8n, Word.xor(8n, x8, x6), x6), x9, x10, Word.xor(8n, Word.xor(8n, x11, x6), x6), x12, x13, _, x15} : A.LcAriaSt} %word_xx(8n, x11, x6) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x6), x6), x2, Word.xor(8n, Word.xor(8n, x3, x6), x6), x4, x5, x6, Word.xor(8n, Word.xor(8n, x7, x6), x6), Word.xor(8n, Word.xor(8n, x8, x6), x6), x9, x10, _, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x8, x6) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x6), x6), x2, Word.xor(8n, Word.xor(8n, x3, x6), x6), x4, x5, x6, Word.xor(8n, Word.xor(8n, x7, x6), x6), _, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x7, x6) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x6), x6), x2, Word.xor(8n, Word.xor(8n, x3, x6), x6), x4, x5, x6, _, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x3, x6) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x6), x6), x2, _, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x1, x6) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, _, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e12(s: A.LcAriaSt) -> {s == A.aria.e12(A.aria.e12(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x6, x7) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, x4, x5, _, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e13(s: A.LcAriaSt) -> {s == A.aria.e13(A.aria.e13(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x11, x5) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x5), x5), Word.xor(8n, Word.xor(8n, x1, x5), x5), Word.xor(8n, Word.xor(8n, x2, x5), x5), Word.xor(8n, Word.xor(8n, x3, x5), x5), Word.xor(8n, Word.xor(8n, x4, x5), x5), x5, x6, x7, Word.xor(8n, Word.xor(8n, x8, x5), x5), Word.xor(8n, Word.xor(8n, x9, x5), x5), Word.xor(8n, Word.xor(8n, x10, x5), x5), _, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x10, x5) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x5), x5), Word.xor(8n, Word.xor(8n, x1, x5), x5), Word.xor(8n, Word.xor(8n, x2, x5), x5), Word.xor(8n, Word.xor(8n, x3, x5), x5), Word.xor(8n, Word.xor(8n, x4, x5), x5), x5, x6, x7, Word.xor(8n, Word.xor(8n, x8, x5), x5), Word.xor(8n, Word.xor(8n, x9, x5), x5), _, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x9, x5) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x5), x5), Word.xor(8n, Word.xor(8n, x1, x5), x5), Word.xor(8n, Word.xor(8n, x2, x5), x5), Word.xor(8n, Word.xor(8n, x3, x5), x5), Word.xor(8n, Word.xor(8n, x4, x5), x5), x5, x6, x7, Word.xor(8n, Word.xor(8n, x8, x5), x5), _, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x8, x5) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x5), x5), Word.xor(8n, Word.xor(8n, x1, x5), x5), Word.xor(8n, Word.xor(8n, x2, x5), x5), Word.xor(8n, Word.xor(8n, x3, x5), x5), Word.xor(8n, Word.xor(8n, x4, x5), x5), x5, x6, x7, _, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x4, x5) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x5), x5), Word.xor(8n, Word.xor(8n, x1, x5), x5), Word.xor(8n, Word.xor(8n, x2, x5), x5), Word.xor(8n, Word.xor(8n, x3, x5), x5), _, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x3, x5) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x5), x5), Word.xor(8n, Word.xor(8n, x1, x5), x5), Word.xor(8n, Word.xor(8n, x2, x5), x5), _, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x2, x5) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x5), x5), Word.xor(8n, Word.xor(8n, x1, x5), x5), _, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x1, x5) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x5), x5), _, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x0, x5) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{_, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e14(s: A.LcAriaSt) -> {s == A.aria.e14(A.aria.e14(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x13, x4) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x4), x4), x2, Word.xor(8n, Word.xor(8n, x3, x4), x4), x4, Word.xor(8n, Word.xor(8n, x5, x4), x4), x6, x7, x8, Word.xor(8n, Word.xor(8n, x9, x4), x4), Word.xor(8n, Word.xor(8n, x10, x4), x4), x11, Word.xor(8n, Word.xor(8n, x12, x4), x4), _, x14, x15} : A.LcAriaSt} %word_xx(8n, x12, x4) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x4), x4), x2, Word.xor(8n, Word.xor(8n, x3, x4), x4), x4, Word.xor(8n, Word.xor(8n, x5, x4), x4), x6, x7, x8, Word.xor(8n, Word.xor(8n, x9, x4), x4), Word.xor(8n, Word.xor(8n, x10, x4), x4), x11, _, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x10, x4) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x4), x4), x2, Word.xor(8n, Word.xor(8n, x3, x4), x4), x4, Word.xor(8n, Word.xor(8n, x5, x4), x4), x6, x7, x8, Word.xor(8n, Word.xor(8n, x9, x4), x4), _, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x9, x4) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x4), x4), x2, Word.xor(8n, Word.xor(8n, x3, x4), x4), x4, Word.xor(8n, Word.xor(8n, x5, x4), x4), x6, x7, x8, _, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x5, x4) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x4), x4), x2, Word.xor(8n, Word.xor(8n, x3, x4), x4), x4, _, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x3, x4) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x4), x4), x2, _, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x1, x4) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, _, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e15(s: A.LcAriaSt) -> {s == A.aria.e15(A.aria.e15(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x4, x5) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, x3, _, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e16(s: A.LcAriaSt) -> {s == A.aria.e16(A.aria.e16(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x11, x3) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x3), x3), x1, x2, x3, Word.xor(8n, Word.xor(8n, x4, x3), x3), Word.xor(8n, Word.xor(8n, x5, x3), x3), Word.xor(8n, Word.xor(8n, x6, x3), x3), Word.xor(8n, Word.xor(8n, x7, x3), x3), Word.xor(8n, Word.xor(8n, x8, x3), x3), Word.xor(8n, Word.xor(8n, x9, x3), x3), Word.xor(8n, Word.xor(8n, x10, x3), x3), _, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x10, x3) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x3), x3), x1, x2, x3, Word.xor(8n, Word.xor(8n, x4, x3), x3), Word.xor(8n, Word.xor(8n, x5, x3), x3), Word.xor(8n, Word.xor(8n, x6, x3), x3), Word.xor(8n, Word.xor(8n, x7, x3), x3), Word.xor(8n, Word.xor(8n, x8, x3), x3), Word.xor(8n, Word.xor(8n, x9, x3), x3), _, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x9, x3) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x3), x3), x1, x2, x3, Word.xor(8n, Word.xor(8n, x4, x3), x3), Word.xor(8n, Word.xor(8n, x5, x3), x3), Word.xor(8n, Word.xor(8n, x6, x3), x3), Word.xor(8n, Word.xor(8n, x7, x3), x3), Word.xor(8n, Word.xor(8n, x8, x3), x3), _, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x8, x3) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x3), x3), x1, x2, x3, Word.xor(8n, Word.xor(8n, x4, x3), x3), Word.xor(8n, Word.xor(8n, x5, x3), x3), Word.xor(8n, Word.xor(8n, x6, x3), x3), Word.xor(8n, Word.xor(8n, x7, x3), x3), _, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x7, x3) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x3), x3), x1, x2, x3, Word.xor(8n, Word.xor(8n, x4, x3), x3), Word.xor(8n, Word.xor(8n, x5, x3), x3), Word.xor(8n, Word.xor(8n, x6, x3), x3), _, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x6, x3) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x3), x3), x1, x2, x3, Word.xor(8n, Word.xor(8n, x4, x3), x3), Word.xor(8n, Word.xor(8n, x5, x3), x3), _, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x5, x3) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x3), x3), x1, x2, x3, Word.xor(8n, Word.xor(8n, x4, x3), x3), _, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x4, x3) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{Word.xor(8n, Word.xor(8n, x0, x3), x3), x1, x2, x3, _, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x0, x3) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{_, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e17(s: A.LcAriaSt) -> {s == A.aria.e17(A.aria.e17(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x11, x2) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x2), x2), x2, x3, Word.xor(8n, Word.xor(8n, x4, x2), x2), Word.xor(8n, Word.xor(8n, x5, x2), x2), Word.xor(8n, Word.xor(8n, x6, x2), x2), Word.xor(8n, Word.xor(8n, x7, x2), x2), Word.xor(8n, Word.xor(8n, x8, x2), x2), Word.xor(8n, Word.xor(8n, x9, x2), x2), Word.xor(8n, Word.xor(8n, x10, x2), x2), _, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x10, x2) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x2), x2), x2, x3, Word.xor(8n, Word.xor(8n, x4, x2), x2), Word.xor(8n, Word.xor(8n, x5, x2), x2), Word.xor(8n, Word.xor(8n, x6, x2), x2), Word.xor(8n, Word.xor(8n, x7, x2), x2), Word.xor(8n, Word.xor(8n, x8, x2), x2), Word.xor(8n, Word.xor(8n, x9, x2), x2), _, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x9, x2) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x2), x2), x2, x3, Word.xor(8n, Word.xor(8n, x4, x2), x2), Word.xor(8n, Word.xor(8n, x5, x2), x2), Word.xor(8n, Word.xor(8n, x6, x2), x2), Word.xor(8n, Word.xor(8n, x7, x2), x2), Word.xor(8n, Word.xor(8n, x8, x2), x2), _, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x8, x2) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x2), x2), x2, x3, Word.xor(8n, Word.xor(8n, x4, x2), x2), Word.xor(8n, Word.xor(8n, x5, x2), x2), Word.xor(8n, Word.xor(8n, x6, x2), x2), Word.xor(8n, Word.xor(8n, x7, x2), x2), _, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x7, x2) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x2), x2), x2, x3, Word.xor(8n, Word.xor(8n, x4, x2), x2), Word.xor(8n, Word.xor(8n, x5, x2), x2), Word.xor(8n, Word.xor(8n, x6, x2), x2), _, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x6, x2) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x2), x2), x2, x3, Word.xor(8n, Word.xor(8n, x4, x2), x2), Word.xor(8n, Word.xor(8n, x5, x2), x2), _, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x5, x2) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x2), x2), x2, x3, Word.xor(8n, Word.xor(8n, x4, x2), x2), _, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x4, x2) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, Word.xor(8n, Word.xor(8n, x1, x2), x2), x2, x3, _, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x1, x2) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, _, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e18(s: A.LcAriaSt) -> {s == A.aria.e18(A.aria.e18(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x15, x1) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, Word.xor(8n, Word.xor(8n, x2, x1), x1), x3, x4, Word.xor(8n, Word.xor(8n, x5, x1), x1), x6, Word.xor(8n, Word.xor(8n, x7, x1), x1), Word.xor(8n, Word.xor(8n, x8, x1), x1), Word.xor(8n, Word.xor(8n, x9, x1), x1), x10, x11, Word.xor(8n, Word.xor(8n, x12, x1), x1), x13, x14, _} : A.LcAriaSt} %word_xx(8n, x12, x1) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, Word.xor(8n, Word.xor(8n, x2, x1), x1), x3, x4, Word.xor(8n, Word.xor(8n, x5, x1), x1), x6, Word.xor(8n, Word.xor(8n, x7, x1), x1), Word.xor(8n, Word.xor(8n, x8, x1), x1), Word.xor(8n, Word.xor(8n, x9, x1), x1), x10, x11, _, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x9, x1) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, Word.xor(8n, Word.xor(8n, x2, x1), x1), x3, x4, Word.xor(8n, Word.xor(8n, x5, x1), x1), x6, Word.xor(8n, Word.xor(8n, x7, x1), x1), Word.xor(8n, Word.xor(8n, x8, x1), x1), _, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x8, x1) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, Word.xor(8n, Word.xor(8n, x2, x1), x1), x3, x4, Word.xor(8n, Word.xor(8n, x5, x1), x1), x6, Word.xor(8n, Word.xor(8n, x7, x1), x1), _, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x7, x1) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, Word.xor(8n, Word.xor(8n, x2, x1), x1), x3, x4, Word.xor(8n, Word.xor(8n, x5, x1), x1), x6, _, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x5, x1) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, Word.xor(8n, Word.xor(8n, x2, x1), x1), x3, x4, _, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x2, x1) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, _, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e19(s: A.LcAriaSt) -> {s == A.aria.e19(A.aria.e19(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x1, x2) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, _, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e20(s: A.LcAriaSt) -> {s == A.aria.e20(A.aria.e20(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x14, x0) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, Word.xor(8n, Word.xor(8n, x3, x0), x0), Word.xor(8n, Word.xor(8n, x4, x0), x0), x5, Word.xor(8n, Word.xor(8n, x6, x0), x0), x7, Word.xor(8n, Word.xor(8n, x8, x0), x0), Word.xor(8n, Word.xor(8n, x9, x0), x0), x10, x11, x12, Word.xor(8n, Word.xor(8n, x13, x0), x0), _, x15} : A.LcAriaSt} %word_xx(8n, x13, x0) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, Word.xor(8n, Word.xor(8n, x3, x0), x0), Word.xor(8n, Word.xor(8n, x4, x0), x0), x5, Word.xor(8n, Word.xor(8n, x6, x0), x0), x7, Word.xor(8n, Word.xor(8n, x8, x0), x0), Word.xor(8n, Word.xor(8n, x9, x0), x0), x10, x11, x12, _, x14, x15} : A.LcAriaSt} %word_xx(8n, x9, x0) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, Word.xor(8n, Word.xor(8n, x3, x0), x0), Word.xor(8n, Word.xor(8n, x4, x0), x0), x5, Word.xor(8n, Word.xor(8n, x6, x0), x0), x7, Word.xor(8n, Word.xor(8n, x8, x0), x0), _, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x8, x0) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, Word.xor(8n, Word.xor(8n, x3, x0), x0), Word.xor(8n, Word.xor(8n, x4, x0), x0), x5, Word.xor(8n, Word.xor(8n, x6, x0), x0), x7, _, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x6, x0) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, Word.xor(8n, Word.xor(8n, x3, x0), x0), Word.xor(8n, Word.xor(8n, x4, x0), x0), x5, _, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x4, x0) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, Word.xor(8n, Word.xor(8n, x3, x0), x0), _, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} %word_xx(8n, x3, x0) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{x0, x1, x2, _, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} def aria_e21(s: A.LcAriaSt) -> {s == A.aria.e21(A.aria.e21(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{+x0, +x1, +x2, +x3, +x4, +x5, +x6, +x7, +x8, +x9, +x10, +x11, +x12, +x13, +x14, +x15}: %word_xx(8n, x0, x3) : {A.LcAriaSt{x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} == A.LcAriaSt{_, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15} : A.LcAriaSt} {==} # the first j steps undone, last first, and the reverse def aria_d0(s: A.LcAriaSt) -> {s == A.aria.u0(A.aria.d0(s)) : A.LcAriaSt}: {==} def aria_dd0(s: A.LcAriaSt) -> {s == A.aria.d0(A.aria.u0(s)) : A.LcAriaSt}: {==} def aria_d1(+s: A.LcAriaSt) -> {s == A.aria.u1(A.aria.d1(s)) : A.LcAriaSt}: %aria_e0(A.aria.d0(s)) : {s == A.aria.u0(_) : A.LcAriaSt} aria_d0(s) def aria_dd1(+s: A.LcAriaSt) -> {s == A.aria.d1(A.aria.u1(s)) : A.LcAriaSt}: %aria_dd0(A.aria.e0(s)) : {s == A.aria.e0(_) : A.LcAriaSt} aria_e0(s) def aria_d2(+s: A.LcAriaSt) -> {s == A.aria.u2(A.aria.d2(s)) : A.LcAriaSt}: %aria_e1(A.aria.d1(s)) : {s == A.aria.u1(_) : A.LcAriaSt} aria_d1(s) def aria_dd2(+s: A.LcAriaSt) -> {s == A.aria.d2(A.aria.u2(s)) : A.LcAriaSt}: %aria_dd1(A.aria.e1(s)) : {s == A.aria.e1(_) : A.LcAriaSt} aria_e1(s) def aria_d3(+s: A.LcAriaSt) -> {s == A.aria.u3(A.aria.d3(s)) : A.LcAriaSt}: %aria_e2(A.aria.d2(s)) : {s == A.aria.u2(_) : A.LcAriaSt} aria_d2(s) def aria_dd3(+s: A.LcAriaSt) -> {s == A.aria.d3(A.aria.u3(s)) : A.LcAriaSt}: %aria_dd2(A.aria.e2(s)) : {s == A.aria.e2(_) : A.LcAriaSt} aria_e2(s) def aria_d4(+s: A.LcAriaSt) -> {s == A.aria.u4(A.aria.d4(s)) : A.LcAriaSt}: %aria_e3(A.aria.d3(s)) : {s == A.aria.u3(_) : A.LcAriaSt} aria_d3(s) def aria_dd4(+s: A.LcAriaSt) -> {s == A.aria.d4(A.aria.u4(s)) : A.LcAriaSt}: %aria_dd3(A.aria.e3(s)) : {s == A.aria.e3(_) : A.LcAriaSt} aria_e3(s) def aria_d5(+s: A.LcAriaSt) -> {s == A.aria.u5(A.aria.d5(s)) : A.LcAriaSt}: %aria_e4(A.aria.d4(s)) : {s == A.aria.u4(_) : A.LcAriaSt} aria_d4(s) def aria_dd5(+s: A.LcAriaSt) -> {s == A.aria.d5(A.aria.u5(s)) : A.LcAriaSt}: %aria_dd4(A.aria.e4(s)) : {s == A.aria.e4(_) : A.LcAriaSt} aria_e4(s) def aria_d6(+s: A.LcAriaSt) -> {s == A.aria.u6(A.aria.d6(s)) : A.LcAriaSt}: %aria_e5(A.aria.d5(s)) : {s == A.aria.u5(_) : A.LcAriaSt} aria_d5(s) def aria_dd6(+s: A.LcAriaSt) -> {s == A.aria.d6(A.aria.u6(s)) : A.LcAriaSt}: %aria_dd5(A.aria.e5(s)) : {s == A.aria.e5(_) : A.LcAriaSt} aria_e5(s) def aria_d7(+s: A.LcAriaSt) -> {s == A.aria.u7(A.aria.d7(s)) : A.LcAriaSt}: %aria_e6(A.aria.d6(s)) : {s == A.aria.u6(_) : A.LcAriaSt} aria_d6(s) def aria_dd7(+s: A.LcAriaSt) -> {s == A.aria.d7(A.aria.u7(s)) : A.LcAriaSt}: %aria_dd6(A.aria.e6(s)) : {s == A.aria.e6(_) : A.LcAriaSt} aria_e6(s) def aria_d8(+s: A.LcAriaSt) -> {s == A.aria.u8(A.aria.d8(s)) : A.LcAriaSt}: %aria_e7(A.aria.d7(s)) : {s == A.aria.u7(_) : A.LcAriaSt} aria_d7(s) def aria_dd8(+s: A.LcAriaSt) -> {s == A.aria.d8(A.aria.u8(s)) : A.LcAriaSt}: %aria_dd7(A.aria.e7(s)) : {s == A.aria.e7(_) : A.LcAriaSt} aria_e7(s) def aria_d9(+s: A.LcAriaSt) -> {s == A.aria.u9(A.aria.d9(s)) : A.LcAriaSt}: %aria_e8(A.aria.d8(s)) : {s == A.aria.u8(_) : A.LcAriaSt} aria_d8(s) def aria_dd9(+s: A.LcAriaSt) -> {s == A.aria.d9(A.aria.u9(s)) : A.LcAriaSt}: %aria_dd8(A.aria.e8(s)) : {s == A.aria.e8(_) : A.LcAriaSt} aria_e8(s) def aria_d10(+s: A.LcAriaSt) -> {s == A.aria.u10(A.aria.d10(s)) : A.LcAriaSt}: %aria_e9(A.aria.d9(s)) : {s == A.aria.u9(_) : A.LcAriaSt} aria_d9(s) def aria_dd10(+s: A.LcAriaSt) -> {s == A.aria.d10(A.aria.u10(s)) : A.LcAriaSt}: %aria_dd9(A.aria.e9(s)) : {s == A.aria.e9(_) : A.LcAriaSt} aria_e9(s) def aria_d11(+s: A.LcAriaSt) -> {s == A.aria.u11(A.aria.d11(s)) : A.LcAriaSt}: %aria_e10(A.aria.d10(s)) : {s == A.aria.u10(_) : A.LcAriaSt} aria_d10(s) def aria_dd11(+s: A.LcAriaSt) -> {s == A.aria.d11(A.aria.u11(s)) : A.LcAriaSt}: %aria_dd10(A.aria.e10(s)) : {s == A.aria.e10(_) : A.LcAriaSt} aria_e10(s) def aria_d12(+s: A.LcAriaSt) -> {s == A.aria.u12(A.aria.d12(s)) : A.LcAriaSt}: %aria_e11(A.aria.d11(s)) : {s == A.aria.u11(_) : A.LcAriaSt} aria_d11(s) def aria_dd12(+s: A.LcAriaSt) -> {s == A.aria.d12(A.aria.u12(s)) : A.LcAriaSt}: %aria_dd11(A.aria.e11(s)) : {s == A.aria.e11(_) : A.LcAriaSt} aria_e11(s) def aria_d13(+s: A.LcAriaSt) -> {s == A.aria.u13(A.aria.d13(s)) : A.LcAriaSt}: %aria_e12(A.aria.d12(s)) : {s == A.aria.u12(_) : A.LcAriaSt} aria_d12(s) def aria_dd13(+s: A.LcAriaSt) -> {s == A.aria.d13(A.aria.u13(s)) : A.LcAriaSt}: %aria_dd12(A.aria.e12(s)) : {s == A.aria.e12(_) : A.LcAriaSt} aria_e12(s) def aria_d14(+s: A.LcAriaSt) -> {s == A.aria.u14(A.aria.d14(s)) : A.LcAriaSt}: %aria_e13(A.aria.d13(s)) : {s == A.aria.u13(_) : A.LcAriaSt} aria_d13(s) def aria_dd14(+s: A.LcAriaSt) -> {s == A.aria.d14(A.aria.u14(s)) : A.LcAriaSt}: %aria_dd13(A.aria.e13(s)) : {s == A.aria.e13(_) : A.LcAriaSt} aria_e13(s) def aria_d15(+s: A.LcAriaSt) -> {s == A.aria.u15(A.aria.d15(s)) : A.LcAriaSt}: %aria_e14(A.aria.d14(s)) : {s == A.aria.u14(_) : A.LcAriaSt} aria_d14(s) def aria_dd15(+s: A.LcAriaSt) -> {s == A.aria.d15(A.aria.u15(s)) : A.LcAriaSt}: %aria_dd14(A.aria.e14(s)) : {s == A.aria.e14(_) : A.LcAriaSt} aria_e14(s) def aria_d16(+s: A.LcAriaSt) -> {s == A.aria.u16(A.aria.d16(s)) : A.LcAriaSt}: %aria_e15(A.aria.d15(s)) : {s == A.aria.u15(_) : A.LcAriaSt} aria_d15(s) def aria_dd16(+s: A.LcAriaSt) -> {s == A.aria.d16(A.aria.u16(s)) : A.LcAriaSt}: %aria_dd15(A.aria.e15(s)) : {s == A.aria.e15(_) : A.LcAriaSt} aria_e15(s) def aria_d17(+s: A.LcAriaSt) -> {s == A.aria.u17(A.aria.d17(s)) : A.LcAriaSt}: %aria_e16(A.aria.d16(s)) : {s == A.aria.u16(_) : A.LcAriaSt} aria_d16(s) def aria_dd17(+s: A.LcAriaSt) -> {s == A.aria.d17(A.aria.u17(s)) : A.LcAriaSt}: %aria_dd16(A.aria.e16(s)) : {s == A.aria.e16(_) : A.LcAriaSt} aria_e16(s) def aria_d18(+s: A.LcAriaSt) -> {s == A.aria.u18(A.aria.d18(s)) : A.LcAriaSt}: %aria_e17(A.aria.d17(s)) : {s == A.aria.u17(_) : A.LcAriaSt} aria_d17(s) def aria_dd18(+s: A.LcAriaSt) -> {s == A.aria.d18(A.aria.u18(s)) : A.LcAriaSt}: %aria_dd17(A.aria.e17(s)) : {s == A.aria.e17(_) : A.LcAriaSt} aria_e17(s) def aria_d19(+s: A.LcAriaSt) -> {s == A.aria.u19(A.aria.d19(s)) : A.LcAriaSt}: %aria_e18(A.aria.d18(s)) : {s == A.aria.u18(_) : A.LcAriaSt} aria_d18(s) def aria_dd19(+s: A.LcAriaSt) -> {s == A.aria.d19(A.aria.u19(s)) : A.LcAriaSt}: %aria_dd18(A.aria.e18(s)) : {s == A.aria.e18(_) : A.LcAriaSt} aria_e18(s) def aria_d20(+s: A.LcAriaSt) -> {s == A.aria.u20(A.aria.d20(s)) : A.LcAriaSt}: %aria_e19(A.aria.d19(s)) : {s == A.aria.u19(_) : A.LcAriaSt} aria_d19(s) def aria_dd20(+s: A.LcAriaSt) -> {s == A.aria.d20(A.aria.u20(s)) : A.LcAriaSt}: %aria_dd19(A.aria.e19(s)) : {s == A.aria.e19(_) : A.LcAriaSt} aria_e19(s) def aria_d21(+s: A.LcAriaSt) -> {s == A.aria.u21(A.aria.d21(s)) : A.LcAriaSt}: %aria_e20(A.aria.d20(s)) : {s == A.aria.u20(_) : A.LcAriaSt} aria_d20(s) def aria_dd21(+s: A.LcAriaSt) -> {s == A.aria.d21(A.aria.u21(s)) : A.LcAriaSt}: %aria_dd20(A.aria.e20(s)) : {s == A.aria.e20(_) : A.LcAriaSt} aria_e20(s) def aria_d22(+s: A.LcAriaSt) -> {s == A.aria.u22(A.aria.d22(s)) : A.LcAriaSt}: %aria_e21(A.aria.d21(s)) : {s == A.aria.u21(_) : A.LcAriaSt} aria_d21(s) def aria_dd22(+s: A.LcAriaSt) -> {s == A.aria.d22(A.aria.u22(s)) : A.LcAriaSt}: %aria_dd21(A.aria.e21(s)) : {s == A.aria.e21(_) : A.LcAriaSt} aria_e21(s) def aria_diff(s: A.LcAriaSt) -> {s == A.aria.undiffuse(A.aria.diffuse(s)) : A.LcAriaSt}: aria_d22(s) def aria_diffd(s: A.LcAriaSt) -> {s == A.aria.diffuse(A.aria.undiffuse(s)) : A.LcAriaSt}: aria_dd22(s) # a block read back from its bytes, and the bytes from their block, on the bits def aria_blk(b: M.CmBlock) -> {b == A.aria.to_block(A.aria.of_block(b)) : M.CmBlock}: match b: case M.CmBlock{U32{WCon{a0_0, WCon{a0_1, WCon{a0_2, WCon{a0_3, WCon{a0_4, WCon{a0_5, WCon{a0_6, WCon{a0_7, WCon{a0_8, WCon{a0_9, WCon{a0_10, WCon{a0_11, WCon{a0_12, WCon{a0_13, WCon{a0_14, WCon{a0_15, WCon{a0_16, WCon{a0_17, WCon{a0_18, WCon{a0_19, WCon{a0_20, WCon{a0_21, WCon{a0_22, WCon{a0_23, WCon{a0_24, WCon{a0_25, WCon{a0_26, WCon{a0_27, WCon{a0_28, WCon{a0_29, WCon{a0_30, WCon{a0_31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}, U32{WCon{a1_0, WCon{a1_1, WCon{a1_2, WCon{a1_3, WCon{a1_4, WCon{a1_5, WCon{a1_6, WCon{a1_7, WCon{a1_8, WCon{a1_9, WCon{a1_10, WCon{a1_11, WCon{a1_12, WCon{a1_13, WCon{a1_14, WCon{a1_15, WCon{a1_16, WCon{a1_17, WCon{a1_18, WCon{a1_19, WCon{a1_20, WCon{a1_21, WCon{a1_22, WCon{a1_23, WCon{a1_24, WCon{a1_25, WCon{a1_26, WCon{a1_27, WCon{a1_28, WCon{a1_29, WCon{a1_30, WCon{a1_31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}, U32{WCon{a2_0, WCon{a2_1, WCon{a2_2, WCon{a2_3, WCon{a2_4, WCon{a2_5, WCon{a2_6, WCon{a2_7, WCon{a2_8, WCon{a2_9, WCon{a2_10, WCon{a2_11, WCon{a2_12, WCon{a2_13, WCon{a2_14, WCon{a2_15, WCon{a2_16, WCon{a2_17, WCon{a2_18, WCon{a2_19, WCon{a2_20, WCon{a2_21, WCon{a2_22, WCon{a2_23, WCon{a2_24, WCon{a2_25, WCon{a2_26, WCon{a2_27, WCon{a2_28, WCon{a2_29, WCon{a2_30, WCon{a2_31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}, U32{WCon{a3_0, WCon{a3_1, WCon{a3_2, WCon{a3_3, WCon{a3_4, WCon{a3_5, WCon{a3_6, WCon{a3_7, WCon{a3_8, WCon{a3_9, WCon{a3_10, WCon{a3_11, WCon{a3_12, WCon{a3_13, WCon{a3_14, WCon{a3_15, WCon{a3_16, WCon{a3_17, WCon{a3_18, WCon{a3_19, WCon{a3_20, WCon{a3_21, WCon{a3_22, WCon{a3_23, WCon{a3_24, WCon{a3_25, WCon{a3_26, WCon{a3_27, WCon{a3_28, WCon{a3_29, WCon{a3_30, WCon{a3_31, WNil{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}: {==} def aria_st(s: A.LcAriaSt) -> {s == A.aria.of_block(A.aria.to_block(s)) : A.LcAriaSt}: match s: case A.LcAriaSt{WCon{b0_0, WCon{b0_1, WCon{b0_2, WCon{b0_3, WCon{b0_4, WCon{b0_5, WCon{b0_6, WCon{b0_7, WNil{}}}}}}}}}, WCon{b1_0, WCon{b1_1, WCon{b1_2, WCon{b1_3, WCon{b1_4, WCon{b1_5, WCon{b1_6, WCon{b1_7, WNil{}}}}}}}}}, WCon{b2_0, WCon{b2_1, WCon{b2_2, WCon{b2_3, WCon{b2_4, WCon{b2_5, WCon{b2_6, WCon{b2_7, WNil{}}}}}}}}}, WCon{b3_0, WCon{b3_1, WCon{b3_2, WCon{b3_3, WCon{b3_4, WCon{b3_5, WCon{b3_6, WCon{b3_7, WNil{}}}}}}}}}, WCon{b4_0, WCon{b4_1, WCon{b4_2, WCon{b4_3, WCon{b4_4, WCon{b4_5, WCon{b4_6, WCon{b4_7, WNil{}}}}}}}}}, WCon{b5_0, WCon{b5_1, WCon{b5_2, WCon{b5_3, WCon{b5_4, WCon{b5_5, WCon{b5_6, WCon{b5_7, WNil{}}}}}}}}}, WCon{b6_0, WCon{b6_1, WCon{b6_2, WCon{b6_3, WCon{b6_4, WCon{b6_5, WCon{b6_6, WCon{b6_7, WNil{}}}}}}}}}, WCon{b7_0, WCon{b7_1, WCon{b7_2, WCon{b7_3, WCon{b7_4, WCon{b7_5, WCon{b7_6, WCon{b7_7, WNil{}}}}}}}}}, WCon{b8_0, WCon{b8_1, WCon{b8_2, WCon{b8_3, WCon{b8_4, WCon{b8_5, WCon{b8_6, WCon{b8_7, WNil{}}}}}}}}}, WCon{b9_0, WCon{b9_1, WCon{b9_2, WCon{b9_3, WCon{b9_4, WCon{b9_5, WCon{b9_6, WCon{b9_7, WNil{}}}}}}}}}, WCon{b10_0, WCon{b10_1, WCon{b10_2, WCon{b10_3, WCon{b10_4, WCon{b10_5, WCon{b10_6, WCon{b10_7, WNil{}}}}}}}}}, WCon{b11_0, WCon{b11_1, WCon{b11_2, WCon{b11_3, WCon{b11_4, WCon{b11_5, WCon{b11_6, WCon{b11_7, WNil{}}}}}}}}}, WCon{b12_0, WCon{b12_1, WCon{b12_2, WCon{b12_3, WCon{b12_4, WCon{b12_5, WCon{b12_6, WCon{b12_7, WNil{}}}}}}}}}, WCon{b13_0, WCon{b13_1, WCon{b13_2, WCon{b13_3, WCon{b13_4, WCon{b13_5, WCon{b13_6, WCon{b13_7, WNil{}}}}}}}}}, WCon{b14_0, WCon{b14_1, WCon{b14_2, WCon{b14_3, WCon{b14_4, WCon{b14_5, WCon{b14_6, WCon{b14_7, WNil{}}}}}}}}}, WCon{b15_0, WCon{b15_1, WCon{b15_2, WCon{b15_3, WCon{b15_4, WCon{b15_5, WCon{b15_6, WCon{b15_7, WNil{}}}}}}}}}}: {==} # END GENERATED: aria def aria_unop_op(o: A.LcAriaOp, +s: A.LcAriaSt) -> {s == A.aria.unop(o, A.aria.op(o, s)) : A.LcAriaSt}: match o: case A.LcAriaRk{+k}: aria_xor2(s, k) case A.LcAriaSl1{}: aria_sl21(s) case A.LcAriaSl2{}: aria_sl12(s) case A.LcAriaDiff{}: aria_diff(s) def aria_op_unop(o: A.LcAriaOp, +s: A.LcAriaSt) -> {s == A.aria.op(o, A.aria.unop(o, s)) : A.LcAriaSt}: match o: case A.LcAriaRk{+k}: aria_xor2(s, k) case A.LcAriaSl1{}: aria_sl12(s) case A.LcAriaSl2{}: aria_sl21(s) case A.LcAriaDiff{}: aria_diffd(s) def aria_unrun_run(os: List<&2, A.LcAriaOp>, +s: A.LcAriaSt) -> {s == A.aria.unrun(os, A.aria.run(os, s)) : A.LcAriaSt}: match os: case Nil{}: {==} case Con{+o, +t}: %aria_unrun_run(t, A.aria.op(o, s)) : {s == A.aria.unop(o, _) : A.LcAriaSt} aria_unop_op(o, s) def aria_run_unrun(os: List<&2, A.LcAriaOp>, +s: A.LcAriaSt) -> {s == A.aria.run(os, A.aria.unrun(os, s)) : A.LcAriaSt}: match os: case Nil{}: {==} case Con{+o, +t}: %aria_op_unop(o, A.aria.unrun(t, s)) : {s == A.aria.run(t, _) : A.LcAriaSt} aria_run_unrun(t, s) def Laws.aria_round_trip(k, b): match k: case A.LcAriaKey{+ops}: %aria_st(A.aria.run(ops, A.aria.of_block(b))) : {A.aria.to_block(A.aria.unrun(ops, _)) == b : M.CmBlock} %aria_unrun_run(ops, A.aria.of_block(b)) : {A.aria.to_block(_) == b : M.CmBlock} Equal.sym(M.CmBlock, b, A.aria.to_block(A.aria.of_block(b)), aria_blk(b)) def Laws.aria_round_trip_dual(k, b): match k: case A.LcAriaKey{+ops}: %aria_st(A.aria.unrun(ops, A.aria.of_block(b))) : {A.aria.to_block(A.aria.run(ops, _)) == b : M.CmBlock} %aria_run_unrun(ops, A.aria.of_block(b)) : {A.aria.to_block(_) == b : M.CmBlock} Equal.sym(M.CmBlock, b, A.aria.to_block(A.aria.of_block(b)), aria_blk(b)) # RC4: the tail-recursive loop is the structural form; XORing the keystream # twice gives each byte back; the structural form splits at an append # the loop, for every list and state, is the structural output reversed # onto what it had def rc4_go_ref(xs: List<&2, U32>, +st: R.LcRc4State, +acc: List<&2, U32>) -> {R.rc4.go(xs, st, acc) == R.LcRc4Run{R.rc4.after(xs, st), R.rc4.rev_onto(acc, R.rc4.xs(xs, st))} : R.LcRc4Run}: match xs: case Nil{}: {==} case Con{x, t}: rc4_go_ref(t, R.rc4.step.st(R.rc4.next(st)), Con{B.byte(U32.xor(x, R.rc4.step.k(R.rc4.next(st)))), acc}) def rc4_update_ref(+st: R.LcRc4State, +m: B.Octets) -> {R.LcRc4Out{R.rc4.after(B.Octets.to_list(m), st), B.Octets.of_list(R.rc4.xs(B.Octets.to_list(m), st))} == R.LcRc4.update(st, m) : R.LcRc4Out}: %Equal.sym(R.LcRc4Run, R.rc4.go(B.Octets.to_list(m), st, Nil{}), R.LcRc4Run{R.rc4.after(B.Octets.to_list(m), st), R.rc4.rev_onto(Nil{}, R.rc4.xs(B.Octets.to_list(m), st))}, rc4_go_ref(B.Octets.to_list(m), st, Nil{})) : {R.LcRc4Out{R.rc4.after(B.Octets.to_list(m), st), B.Octets.of_list(R.rc4.xs(B.Octets.to_list(m), st))} == R.rc4.out(_) : R.LcRc4Out} {==} def byte_xx(+h: U32, +k: U32) -> {B.byte(h) == B.byte(U32.xor(B.byte(U32.xor(h, k)), k)) : U32}: %byte_xor_byte(U32.xor(h, k), k) : {B.byte(h) == _ : U32} %u32_xx(h, k) : {B.byte(h) == B.byte(_) : U32} {==} def rc4_mask_xs(ys: List<&2, U32>, +st: R.LcRc4State) -> {R.rc4.xs(ys, st) == R.rc4.xs(B.mask(ys), st) : List<&2, U32>}: match ys: case Nil{}: {==} case Con{+h, +t}: %byte_xor_byte(h, R.rc4.step.k(R.rc4.next(st))) : {Con{B.byte(U32.xor(h, R.rc4.step.k(R.rc4.next(st)))), R.rc4.xs(t, R.rc4.step.st(R.rc4.next(st)))} == Con{_, R.rc4.xs(B.mask(t), R.rc4.step.st(R.rc4.next(st)))} : List<&2, U32>} %rc4_mask_xs(t, R.rc4.step.st(R.rc4.next(st))) : {Con{B.byte(U32.xor(h, R.rc4.step.k(R.rc4.next(st)))), R.rc4.xs(t, R.rc4.step.st(R.rc4.next(st)))} == Con{B.byte(U32.xor(h, R.rc4.step.k(R.rc4.next(st)))), _} : List<&2, U32>} {==} def rc4_xs_xs(ys: List<&2, U32>, +st: R.LcRc4State) -> {B.mask(ys) == R.rc4.xs(R.rc4.xs(ys, st), st) : List<&2, U32>}: match ys: case Nil{}: {==} case Con{+h, +t}: %byte_xx(h, R.rc4.step.k(R.rc4.next(st))) : {Con{B.byte(h), B.mask(t)} == Con{_, R.rc4.xs(R.rc4.xs(t, R.rc4.step.st(R.rc4.next(st))), R.rc4.step.st(R.rc4.next(st)))} : List<&2, U32>} %rc4_xs_xs(t, R.rc4.step.st(R.rc4.next(st))) : {Con{B.byte(h), B.mask(t)} == Con{B.byte(h), _} : List<&2, U32>} {==} def Laws.rc4_involution(st, m): %rc4_update_ref(st, m) : {R.LcRc4.out_data(R.LcRc4.update(st, R.LcRc4.out_data(_))) == m : B.Octets} %rc4_update_ref(st, B.Octets.of_list(R.rc4.xs(B.Octets.to_list(m), st))) : {R.LcRc4.out_data(_) == m : B.Octets} %Equal.sym(List<&2, U32>, B.Octets.to_list(B.Octets.of_list(R.rc4.xs(B.Octets.to_list(m), st))), B.mask(R.rc4.xs(B.Octets.to_list(m), st)), BL.octets_to_of(R.rc4.xs(B.Octets.to_list(m), st))) : {B.Octets.of_list(R.rc4.xs(_, st)) == m : B.Octets} %rc4_mask_xs(R.rc4.xs(B.Octets.to_list(m), st), st) : {B.Octets.of_list(_) == m : B.Octets} %rc4_xs_xs(B.Octets.to_list(m), st) : {B.Octets.of_list(_) == m : B.Octets} %BL.octets_to_of(B.Octets.to_list(m)) : {B.Octets.of_list(_) == m : B.Octets} %Equal.sym(B.Octets, B.Octets.of_list(B.Octets.to_list(B.Octets.of_list(B.Octets.to_list(m)))), B.Octets.of_list(B.Octets.to_list(m)), BL.octets_of_list_idempotent(B.Octets.to_list(m))) : {_ == m : B.Octets} BL.octets_of_to(m) def rc4_after_append(xs: List<&2, U32>, +ys: List<&2, U32>, +st: R.LcRc4State) -> {R.rc4.after(B.append(xs, ys), st) == R.rc4.after(ys, R.rc4.after(xs, st)) : R.LcRc4State}: match xs: case Nil{}: {==} case Con{x, t}: rc4_after_append(t, ys, R.rc4.step.st(R.rc4.next(st))) def rc4_xs_append(xs: List<&2, U32>, +ys: List<&2, U32>, +st: R.LcRc4State) -> {R.rc4.xs(B.append(xs, ys), st) == B.append(R.rc4.xs(xs, st), R.rc4.xs(ys, R.rc4.after(xs, st))) : List<&2, U32>}: match xs: case Nil{}: {==} case Con{+x, +t}: %rc4_xs_append(t, ys, R.rc4.step.st(R.rc4.next(st))) : {Con{B.byte(U32.xor(x, R.rc4.step.k(R.rc4.next(st)))), R.rc4.xs(B.append(t, ys), R.rc4.step.st(R.rc4.next(st)))} == Con{B.byte(U32.xor(x, R.rc4.step.k(R.rc4.next(st)))), _} : List<&2, U32>} {==} def mask_append(p: List<&2, U32>, +q: List<&2, U32>) -> {B.mask(B.append(p, q)) == B.append(B.mask(p), B.mask(q)) : List<&2, U32>}: match p: case Nil{}: {==} case Con{+h, +t}: %mask_append(t, q) : {Con{B.byte(h), B.mask(B.append(t, q))} == Con{B.byte(h), _} : List<&2, U32>} {==} # Octets.of_list of an append is the append of the Octets (from bytes' laws) def octets_of_append(+p: List<&2, U32>, +q: List<&2, U32>) -> {B.Octets.of_list(B.append(p, q)) == B.Octets.append(B.Octets.of_list(p), B.Octets.of_list(q)) : B.Octets}: %BL.octets_of_to(B.Octets.append(B.Octets.of_list(p), B.Octets.of_list(q))) : {B.Octets.of_list(B.append(p, q)) == _ : B.Octets} %Equal.sym(List<&2, U32>, B.Octets.to_list(B.Octets.append(B.Octets.of_list(p), B.Octets.of_list(q))), B.append(B.Octets.to_list(B.Octets.of_list(p)), B.Octets.to_list(B.Octets.of_list(q))), BL.octets_append_list(B.Octets.of_list(p), B.Octets.of_list(q))) : {B.Octets.of_list(B.append(p, q)) == B.Octets.of_list(_) : B.Octets} %Equal.sym(List<&2, U32>, B.Octets.to_list(B.Octets.of_list(p)), B.mask(p), BL.octets_to_of(p)) : {B.Octets.of_list(B.append(p, q)) == B.Octets.of_list(B.append(_, B.Octets.to_list(B.Octets.of_list(q)))) : B.Octets} %Equal.sym(List<&2, U32>, B.Octets.to_list(B.Octets.of_list(q)), B.mask(q), BL.octets_to_of(q)) : {B.Octets.of_list(B.append(p, q)) == B.Octets.of_list(B.append(B.mask(p), _)) : B.Octets} %mask_append(p, q) : {B.Octets.of_list(B.append(p, q)) == B.Octets.of_list(_) : B.Octets} %BL.octets_to_of(B.append(p, q)) : {B.Octets.of_list(B.append(p, q)) == B.Octets.of_list(_) : B.Octets} %Equal.sym(B.Octets, B.Octets.of_list(B.Octets.to_list(B.Octets.of_list(B.append(p, q)))), B.Octets.of_list(B.append(p, q)), BL.octets_of_list_idempotent(B.append(p, q))) : {B.Octets.of_list(B.append(p, q)) == _ : B.Octets} {==} def Laws.rc4_streaming_state(st, a, b): %rc4_update_ref(st, a) : {R.LcRc4.out_state(R.LcRc4.update(st, B.Octets.append(a, b))) == R.LcRc4.out_state(R.LcRc4.update(R.LcRc4.out_state(_), b)) : R.LcRc4State} %rc4_update_ref(R.rc4.after(B.Octets.to_list(a), st), b) : {R.LcRc4.out_state(R.LcRc4.update(st, B.Octets.append(a, b))) == R.LcRc4.out_state(_) : R.LcRc4State} %rc4_update_ref(st, B.Octets.append(a, b)) : {R.LcRc4.out_state(_) == R.rc4.after(B.Octets.to_list(b), R.rc4.after(B.Octets.to_list(a), st)) : R.LcRc4State} %Equal.sym(List<&2, U32>, B.Octets.to_list(B.Octets.append(a, b)), B.append(B.Octets.to_list(a), B.Octets.to_list(b)), BL.octets_append_list(a, b)) : {R.rc4.after(_, st) == R.rc4.after(B.Octets.to_list(b), R.rc4.after(B.Octets.to_list(a), st)) : R.LcRc4State} rc4_after_append(B.Octets.to_list(a), B.Octets.to_list(b), st) def Laws.rc4_streaming_data(st, a, b): %rc4_update_ref(st, a) : {R.LcRc4.out_data(R.LcRc4.update(st, B.Octets.append(a, b))) == B.Octets.append(R.LcRc4.out_data(_), R.LcRc4.out_data(R.LcRc4.update(R.LcRc4.out_state(_), b))) : B.Octets} %rc4_update_ref(R.rc4.after(B.Octets.to_list(a), st), b) : {R.LcRc4.out_data(R.LcRc4.update(st, B.Octets.append(a, b))) == B.Octets.append(B.Octets.of_list(R.rc4.xs(B.Octets.to_list(a), st)), R.LcRc4.out_data(_)) : B.Octets} %rc4_update_ref(st, B.Octets.append(a, b)) : {R.LcRc4.out_data(_) == B.Octets.append(B.Octets.of_list(R.rc4.xs(B.Octets.to_list(a), st)), B.Octets.of_list(R.rc4.xs(B.Octets.to_list(b), R.rc4.after(B.Octets.to_list(a), st)))) : B.Octets} %Equal.sym(List<&2, U32>, B.Octets.to_list(B.Octets.append(a, b)), B.append(B.Octets.to_list(a), B.Octets.to_list(b)), BL.octets_append_list(a, b)) : {B.Octets.of_list(R.rc4.xs(_, st)) == B.Octets.append(B.Octets.of_list(R.rc4.xs(B.Octets.to_list(a), st)), B.Octets.of_list(R.rc4.xs(B.Octets.to_list(b), R.rc4.after(B.Octets.to_list(a), st)))) : B.Octets} %Equal.sym(List<&2, U32>, R.rc4.xs(B.append(B.Octets.to_list(a), B.Octets.to_list(b)), st), B.append(R.rc4.xs(B.Octets.to_list(a), st), R.rc4.xs(B.Octets.to_list(b), R.rc4.after(B.Octets.to_list(a), st))), rc4_xs_append(B.Octets.to_list(a), B.Octets.to_list(b), st)) : {B.Octets.of_list(_) == B.Octets.append(B.Octets.of_list(R.rc4.xs(B.Octets.to_list(a), st)), B.Octets.of_list(R.rc4.xs(B.Octets.to_list(b), R.rc4.after(B.Octets.to_list(a), st)))) : B.Octets} octets_of_append(R.rc4.xs(B.Octets.to_list(a), st), R.rc4.xs(B.Octets.to_list(b), R.rc4.after(B.Octets.to_list(a), st))) # 64-bit blocks as bytes (blk_bytes and blk8 above) def Laws.block64_octets_round_trip(b): %Equal.sym(List<&2, U32>, B.Octets.to_list(B.Octets.of_list(L.lc.block_bytes(b, Nil{}))), B.mask(L.lc.block_bytes(b, Nil{})), BL.octets_to_of(L.lc.block_bytes(b, Nil{}))) : {L.lc.block_of(_) == Some{b} : Maybe<&2, L.LcBlock64>} blk_bytes(b) # the bytes of the blocks bs in front of ys, structurally def m64_joins(bs: List<&2, L.LcBlock64>, ys: List<&2, U32>) -> List<&2, U32>: match bs: case Nil{}: ys case Con{b, t}: L.lc.block_bytes(b, m64_joins(t, ys)) def m64_join_rev(bs: List<&2, L.LcBlock64>, +zs: List<&2, L.LcBlock64>, +ys: List<&2, U32>) -> {X.m64.join(zs, m64_joins(bs, ys)) == X.m64.join(X.m64.rev_onto(bs, zs), ys) : List<&2, U32>}: match bs: case Nil{}: {==} case Con{b, t}: m64_join_rev(t, Con{b, zs}, ys) def m64_split_joins(bs: List<&2, L.LcBlock64>, +acc: List<&2, L.LcBlock64>) -> {X.m64.split(B.mask(m64_joins(bs, Nil{})), acc) == Some{X.m64.rev_onto(acc, bs)} : Maybe<&2, List<&2, L.LcBlock64>>}: match bs: case Nil{}: {==} case Con{L.LcBlock64{+hi, +lo}, +t}: %blk8(hi, lo) : {X.m64.split(B.mask(m64_joins(t, Nil{})), Con{_, acc}) == Some{X.m64.rev_onto(acc, Con{L.LcBlock64{hi, lo}, t})} : Maybe<&2, List<&2, L.LcBlock64>>} m64_split_joins(t, Con{L.LcBlock64{hi, lo}, acc}) def Laws.blocks64_octets_round_trip(bs): %Equal.sym(List<&2, U32>, B.Octets.to_list(B.Octets.of_list(X.m64.join(X.m64.rev_onto(bs, Nil{}), Nil{}))), B.mask(X.m64.join(X.m64.rev_onto(bs, Nil{}), Nil{})), BL.octets_to_of(X.m64.join(X.m64.rev_onto(bs, Nil{}), Nil{}))) : {X.m64.blocks(B.Octets.len(X.Lc64.octets_of(bs)), X.m64.split(_, Nil{})) == Done{bs} : Result<&2, &2, L.LcError, List<&2, L.LcBlock64>>} %m64_join_rev(bs, Nil{}, Nil{}) : {X.m64.blocks(B.Octets.len(X.Lc64.octets_of(bs)), X.m64.split(B.mask(_), Nil{})) == Done{bs} : Result<&2, &2, L.LcError, List<&2, L.LcBlock64>>} %Equal.sym(Maybe<&2, List<&2, L.LcBlock64>>, X.m64.split(B.mask(m64_joins(bs, Nil{})), Nil{}), Some{X.m64.rev_onto(Nil{}, bs)}, m64_split_joins(bs, Nil{})) : {X.m64.blocks(B.Octets.len(X.Lc64.octets_of(bs)), _) == Done{bs} : Result<&2, &2, L.LcError, List<&2, L.LcBlock64>>} {==} # The modes: the tail-recursive loops are the structural forms; then XOR and # decryption undo each block, for any cipher whose decryption undoes its # encryption (for DES and 3DES, by their laws) def bool_xx2(a: Bool, b: Bool) -> {b == Bool.xor(a, Bool.xor(a, b)) : Bool}: match a b: case True{} True{}: {==} case True{} False{}: {==} case False{} True{}: {==} case False{} False{}: {==} def word_xx2(n: Nat, a: Word(n), b: Word(n)) -> {b == Word.xor(n, a, Word.xor(n, a, b)) : Word(n)}: match n: case 0n: match a b: case WNil{} WNil{}: {==} case 1n+p: match a b: case WCon{ah, at} WCon{bh, bt}: %bool_xx2(ah, bh) : {WCon{bh, bt} == WCon{_, Word.xor(p, at, Word.xor(p, at, bt))} : Word(1n+p)} %word_xx2(p, at, bt) : {WCon{bh, bt} == WCon{bh, _} : Word(1n+p)} {==} def u32_xx2(a: U32, b: U32) -> {b == U32.xor(a, U32.xor(a, b)) : U32}: match a b: case U32{x} U32{y}: %word_xx2(32n, x, y) : {U32{y} == U32{_} : U32} {==} def b64_xx2(a: L.LcBlock64, b: L.LcBlock64) -> {b == L.LcBlock64.xor(a, L.LcBlock64.xor(a, b)) : L.LcBlock64}: match a b: case L.LcBlock64{+a0, +a1} L.LcBlock64{+b0, +b1}: %u32_xx2(a0, b0) : {L.LcBlock64{b0, b1} == L.LcBlock64{_, U32.xor(a1, U32.xor(a1, b1))} : L.LcBlock64} %u32_xx2(a1, b1) : {L.LcBlock64{b0, b1} == L.LcBlock64{b0, _} : L.LcBlock64} {==} def ecb_ref(~K: Data, ~f: K -> L.LcBlock64 -> L.LcBlock64, +k: K, bs: List<&2, L.LcBlock64>, +acc: List<&2, L.LcBlock64>) -> {X.m64.ecb.go(~K, ~f, k, bs, acc) == X.m64.rev_onto(acc, X.m64.ecb(~K, ~f, k, bs)) : List<&2, L.LcBlock64>}: match bs: case Nil{}: {==} case Con{b, t}: ecb_ref(~K, ~f, k, t, Con{f(k, b), acc}) def cbc_enc_ref(~K: Data, ~enc: K -> L.LcBlock64 -> L.LcBlock64, +k: K, bs: List<&2, L.LcBlock64>, +iv: L.LcBlock64, +acc: List<&2, L.LcBlock64>) -> {X.m64.cbc.enc.go(~K, ~enc, k, bs, iv, acc) == X.m64.rev_onto(acc, X.m64.cbc.enc(~K, ~enc, k, bs, iv)) : List<&2, L.LcBlock64>}: match bs: case Nil{}: {==} case Con{+p, t}: cbc_enc_ref(~K, ~enc, k, t, enc(k, L.LcBlock64.xor(iv, p)), Con{enc(k, L.LcBlock64.xor(iv, p)), acc}) def cbc_dec_ref(~K: Data, ~dec: K -> L.LcBlock64 -> L.LcBlock64, +k: K, bs: List<&2, L.LcBlock64>, +iv: L.LcBlock64, +acc: List<&2, L.LcBlock64>) -> {X.m64.cbc.dec.go(~K, ~dec, k, bs, iv, acc) == X.m64.rev_onto(acc, X.m64.cbc.dec(~K, ~dec, k, bs, iv)) : List<&2, L.LcBlock64>}: match bs: case Nil{}: {==} case Con{+c, t}: cbc_dec_ref(~K, ~dec, k, t, c, Con{L.LcBlock64.xor(iv, dec(k, c)), acc}) def tdes_rt(k: T.LcTdesKey, +b: L.LcBlock64) -> {b == T.LcTdes.decrypt(k, T.LcTdes.encrypt(k, b)) : L.LcBlock64}: Equal.sym(L.LcBlock64, T.LcTdes.decrypt(k, T.LcTdes.encrypt(k, b)), b, Laws.tdes_round_trip(k, b)) def ecb_rt_des(+k: D.LcDesKey, bs: List<&2, L.LcBlock64>) -> {bs == X.m64.ecb(~D.LcDesKey, ~D.LcDes.decrypt, k, X.m64.ecb(~D.LcDesKey, ~D.LcDes.encrypt, k, bs)) : List<&2, L.LcBlock64>}: match bs: case Nil{}: {==} case Con{+b, +t}: %des_rt(k, b) : {Con{b, t} == Con{_, X.m64.ecb(~D.LcDesKey, ~D.LcDes.decrypt, k, X.m64.ecb(~D.LcDesKey, ~D.LcDes.encrypt, k, t))} : List<&2, L.LcBlock64>} %ecb_rt_des(k, t) : {Con{b, t} == Con{b, _} : List<&2, L.LcBlock64>} {==} def cbc_rt_des(+k: D.LcDesKey, bs: List<&2, L.LcBlock64>, +iv: L.LcBlock64) -> {bs == X.m64.cbc.dec(~D.LcDesKey, ~D.LcDes.decrypt, k, X.m64.cbc.enc(~D.LcDesKey, ~D.LcDes.encrypt, k, bs, iv), iv) : List<&2, L.LcBlock64>}: match bs: case Nil{}: {==} case Con{+p, +t}: %des_rt(k, L.LcBlock64.xor(iv, p)) : {Con{p, t} == Con{L.LcBlock64.xor(iv, _), X.m64.cbc.dec(~D.LcDesKey, ~D.LcDes.decrypt, k, X.m64.cbc.enc(~D.LcDesKey, ~D.LcDes.encrypt, k, t, D.LcDes.encrypt(k, L.LcBlock64.xor(iv, p))), D.LcDes.encrypt(k, L.LcBlock64.xor(iv, p)))} : List<&2, L.LcBlock64>} %b64_xx2(iv, p) : {Con{p, t} == Con{_, X.m64.cbc.dec(~D.LcDesKey, ~D.LcDes.decrypt, k, X.m64.cbc.enc(~D.LcDesKey, ~D.LcDes.encrypt, k, t, D.LcDes.encrypt(k, L.LcBlock64.xor(iv, p))), D.LcDes.encrypt(k, L.LcBlock64.xor(iv, p)))} : List<&2, L.LcBlock64>} %cbc_rt_des(k, t, D.LcDes.encrypt(k, L.LcBlock64.xor(iv, p))) : {Con{p, t} == Con{p, _} : List<&2, L.LcBlock64>} {==} # the public block layers, through the structural forms def ecb_blocks_rt_des(+k: D.LcDesKey, +bs: List<&2, L.LcBlock64>) -> {X.Lc64.ecb_decrypt_blocks(~D.LcDesKey, ~D.LcDes.decrypt, k, X.Lc64.ecb_encrypt_blocks(~D.LcDesKey, ~D.LcDes.encrypt, k, bs)) == bs : List<&2, L.LcBlock64>}: %Equal.sym(List<&2, L.LcBlock64>, X.m64.ecb.go(~D.LcDesKey, ~D.LcDes.encrypt, k, bs, Nil{}), X.m64.rev_onto(Nil{}, X.m64.ecb(~D.LcDesKey, ~D.LcDes.encrypt, k, bs)), ecb_ref(~D.LcDesKey, ~D.LcDes.encrypt, k, bs, Nil{})) : {X.m64.ecb.go(~D.LcDesKey, ~D.LcDes.decrypt, k, _, Nil{}) == bs : List<&2, L.LcBlock64>} %Equal.sym(List<&2, L.LcBlock64>, X.m64.ecb.go(~D.LcDesKey, ~D.LcDes.decrypt, k, X.m64.ecb(~D.LcDesKey, ~D.LcDes.encrypt, k, bs), Nil{}), X.m64.rev_onto(Nil{}, X.m64.ecb(~D.LcDesKey, ~D.LcDes.decrypt, k, X.m64.ecb(~D.LcDesKey, ~D.LcDes.encrypt, k, bs))), ecb_ref(~D.LcDesKey, ~D.LcDes.decrypt, k, X.m64.ecb(~D.LcDesKey, ~D.LcDes.encrypt, k, bs), Nil{})) : {_ == bs : List<&2, L.LcBlock64>} Equal.sym(List<&2, L.LcBlock64>, bs, X.m64.ecb(~D.LcDesKey, ~D.LcDes.decrypt, k, X.m64.ecb(~D.LcDesKey, ~D.LcDes.encrypt, k, bs)), ecb_rt_des(k, bs)) def cbc_blocks_rt_des(+k: D.LcDesKey, +iv: L.LcBlock64, +bs: List<&2, L.LcBlock64>) -> {X.Lc64.cbc_decrypt_blocks(~D.LcDesKey, ~D.LcDes.decrypt, k, iv, X.Lc64.cbc_encrypt_blocks(~D.LcDesKey, ~D.LcDes.encrypt, k, iv, bs)) == bs : List<&2, L.LcBlock64>}: %Equal.sym(List<&2, L.LcBlock64>, X.m64.cbc.enc.go(~D.LcDesKey, ~D.LcDes.encrypt, k, bs, iv, Nil{}), X.m64.rev_onto(Nil{}, X.m64.cbc.enc(~D.LcDesKey, ~D.LcDes.encrypt, k, bs, iv)), cbc_enc_ref(~D.LcDesKey, ~D.LcDes.encrypt, k, bs, iv, Nil{})) : {X.m64.cbc.dec.go(~D.LcDesKey, ~D.LcDes.decrypt, k, _, iv, Nil{}) == bs : List<&2, L.LcBlock64>} %Equal.sym(List<&2, L.LcBlock64>, X.m64.cbc.dec.go(~D.LcDesKey, ~D.LcDes.decrypt, k, X.m64.cbc.enc(~D.LcDesKey, ~D.LcDes.encrypt, k, bs, iv), iv, Nil{}), X.m64.rev_onto(Nil{}, X.m64.cbc.dec(~D.LcDesKey, ~D.LcDes.decrypt, k, X.m64.cbc.enc(~D.LcDesKey, ~D.LcDes.encrypt, k, bs, iv), iv)), cbc_dec_ref(~D.LcDesKey, ~D.LcDes.decrypt, k, X.m64.cbc.enc(~D.LcDesKey, ~D.LcDes.encrypt, k, bs, iv), iv, Nil{})) : {_ == bs : List<&2, L.LcBlock64>} Equal.sym(List<&2, L.LcBlock64>, bs, X.m64.cbc.dec(~D.LcDesKey, ~D.LcDes.decrypt, k, X.m64.cbc.enc(~D.LcDesKey, ~D.LcDes.encrypt, k, bs, iv), iv), cbc_rt_des(k, bs, iv)) def ecb_rt_tdes(+k: T.LcTdesKey, bs: List<&2, L.LcBlock64>) -> {bs == X.m64.ecb(~T.LcTdesKey, ~T.LcTdes.decrypt, k, X.m64.ecb(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs)) : List<&2, L.LcBlock64>}: match bs: case Nil{}: {==} case Con{+b, +t}: %tdes_rt(k, b) : {Con{b, t} == Con{_, X.m64.ecb(~T.LcTdesKey, ~T.LcTdes.decrypt, k, X.m64.ecb(~T.LcTdesKey, ~T.LcTdes.encrypt, k, t))} : List<&2, L.LcBlock64>} %ecb_rt_tdes(k, t) : {Con{b, t} == Con{b, _} : List<&2, L.LcBlock64>} {==} def cbc_rt_tdes(+k: T.LcTdesKey, bs: List<&2, L.LcBlock64>, +iv: L.LcBlock64) -> {bs == X.m64.cbc.dec(~T.LcTdesKey, ~T.LcTdes.decrypt, k, X.m64.cbc.enc(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs, iv), iv) : List<&2, L.LcBlock64>}: match bs: case Nil{}: {==} case Con{+p, +t}: %tdes_rt(k, L.LcBlock64.xor(iv, p)) : {Con{p, t} == Con{L.LcBlock64.xor(iv, _), X.m64.cbc.dec(~T.LcTdesKey, ~T.LcTdes.decrypt, k, X.m64.cbc.enc(~T.LcTdesKey, ~T.LcTdes.encrypt, k, t, T.LcTdes.encrypt(k, L.LcBlock64.xor(iv, p))), T.LcTdes.encrypt(k, L.LcBlock64.xor(iv, p)))} : List<&2, L.LcBlock64>} %b64_xx2(iv, p) : {Con{p, t} == Con{_, X.m64.cbc.dec(~T.LcTdesKey, ~T.LcTdes.decrypt, k, X.m64.cbc.enc(~T.LcTdesKey, ~T.LcTdes.encrypt, k, t, T.LcTdes.encrypt(k, L.LcBlock64.xor(iv, p))), T.LcTdes.encrypt(k, L.LcBlock64.xor(iv, p)))} : List<&2, L.LcBlock64>} %cbc_rt_tdes(k, t, T.LcTdes.encrypt(k, L.LcBlock64.xor(iv, p))) : {Con{p, t} == Con{p, _} : List<&2, L.LcBlock64>} {==} # the public block layers, through the structural forms def ecb_blocks_rt_tdes(+k: T.LcTdesKey, +bs: List<&2, L.LcBlock64>) -> {X.Lc64.ecb_decrypt_blocks(~T.LcTdesKey, ~T.LcTdes.decrypt, k, X.Lc64.ecb_encrypt_blocks(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs)) == bs : List<&2, L.LcBlock64>}: %Equal.sym(List<&2, L.LcBlock64>, X.m64.ecb.go(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs, Nil{}), X.m64.rev_onto(Nil{}, X.m64.ecb(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs)), ecb_ref(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs, Nil{})) : {X.m64.ecb.go(~T.LcTdesKey, ~T.LcTdes.decrypt, k, _, Nil{}) == bs : List<&2, L.LcBlock64>} %Equal.sym(List<&2, L.LcBlock64>, X.m64.ecb.go(~T.LcTdesKey, ~T.LcTdes.decrypt, k, X.m64.ecb(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs), Nil{}), X.m64.rev_onto(Nil{}, X.m64.ecb(~T.LcTdesKey, ~T.LcTdes.decrypt, k, X.m64.ecb(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs))), ecb_ref(~T.LcTdesKey, ~T.LcTdes.decrypt, k, X.m64.ecb(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs), Nil{})) : {_ == bs : List<&2, L.LcBlock64>} Equal.sym(List<&2, L.LcBlock64>, bs, X.m64.ecb(~T.LcTdesKey, ~T.LcTdes.decrypt, k, X.m64.ecb(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs)), ecb_rt_tdes(k, bs)) def cbc_blocks_rt_tdes(+k: T.LcTdesKey, +iv: L.LcBlock64, +bs: List<&2, L.LcBlock64>) -> {X.Lc64.cbc_decrypt_blocks(~T.LcTdesKey, ~T.LcTdes.decrypt, k, iv, X.Lc64.cbc_encrypt_blocks(~T.LcTdesKey, ~T.LcTdes.encrypt, k, iv, bs)) == bs : List<&2, L.LcBlock64>}: %Equal.sym(List<&2, L.LcBlock64>, X.m64.cbc.enc.go(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs, iv, Nil{}), X.m64.rev_onto(Nil{}, X.m64.cbc.enc(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs, iv)), cbc_enc_ref(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs, iv, Nil{})) : {X.m64.cbc.dec.go(~T.LcTdesKey, ~T.LcTdes.decrypt, k, _, iv, Nil{}) == bs : List<&2, L.LcBlock64>} %Equal.sym(List<&2, L.LcBlock64>, X.m64.cbc.dec.go(~T.LcTdesKey, ~T.LcTdes.decrypt, k, X.m64.cbc.enc(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs, iv), iv, Nil{}), X.m64.rev_onto(Nil{}, X.m64.cbc.dec(~T.LcTdesKey, ~T.LcTdes.decrypt, k, X.m64.cbc.enc(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs, iv), iv)), cbc_dec_ref(~T.LcTdesKey, ~T.LcTdes.decrypt, k, X.m64.cbc.enc(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs, iv), iv, Nil{})) : {_ == bs : List<&2, L.LcBlock64>} Equal.sym(List<&2, L.LcBlock64>, bs, X.m64.cbc.dec(~T.LcTdesKey, ~T.LcTdes.decrypt, k, X.m64.cbc.enc(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs, iv), iv), cbc_rt_tdes(k, bs, iv)) def Laws.des_ecb_round_trip(k, bs): ecb_blocks_rt_des(k, bs) def Laws.des_cbc_round_trip(k, iv, bs): cbc_blocks_rt_des(k, iv, bs) def Laws.tdes_ecb_round_trip(k, bs): ecb_blocks_rt_tdes(k, bs) def Laws.tdes_cbc_round_trip(k, iv, bs): cbc_blocks_rt_tdes(k, iv, bs) # The byte layers, on the bytes of whole blocks under the bytes of an IV def cbc_enc_ok(~K: Data, ~enc: K -> L.LcBlock64 -> L.LcBlock64, +k: K, +iv: L.LcBlock64, +bs: List<&2, L.LcBlock64>) -> {X.Lc64.cbc_encrypt(~K, ~enc, k, L.LcBlock64.to_octets(iv), X.Lc64.octets_of(bs)) == Done{X.Lc64.octets_of(X.Lc64.cbc_encrypt_blocks(~K, ~enc, k, iv, bs))} : Result<&2, &2, L.LcError, B.Octets>}: %Equal.sym(Maybe<&2, L.LcBlock64>, L.LcBlock64.of_octets(L.LcBlock64.to_octets(iv)), Some{iv}, Laws.block64_octets_round_trip(iv)) : {X.m64.cbc.e1(~K, ~enc, k, X.m64.iv(_, B.Octets.len(L.LcBlock64.to_octets(iv))), X.Lc64.octets_of(bs)) == Done{X.Lc64.octets_of(X.Lc64.cbc_encrypt_blocks(~K, ~enc, k, iv, bs))} : Result<&2, &2, L.LcError, B.Octets>} %Equal.sym(Result<&2, &2, L.LcError, List<&2, L.LcBlock64>>, X.Lc64.blocks_of(X.Lc64.octets_of(bs)), Done{bs}, Laws.blocks64_octets_round_trip(bs)) : {X.m64.cbc.e2(~K, ~enc, k, iv, _) == Done{X.Lc64.octets_of(X.Lc64.cbc_encrypt_blocks(~K, ~enc, k, iv, bs))} : Result<&2, &2, L.LcError, B.Octets>} {==} def cbc_dec_ok(~K: Data, ~dec: K -> L.LcBlock64 -> L.LcBlock64, +k: K, +iv: L.LcBlock64, +bs: List<&2, L.LcBlock64>) -> {X.Lc64.cbc_decrypt(~K, ~dec, k, L.LcBlock64.to_octets(iv), X.Lc64.octets_of(bs)) == Done{X.Lc64.octets_of(X.Lc64.cbc_decrypt_blocks(~K, ~dec, k, iv, bs))} : Result<&2, &2, L.LcError, B.Octets>}: %Equal.sym(Maybe<&2, L.LcBlock64>, L.LcBlock64.of_octets(L.LcBlock64.to_octets(iv)), Some{iv}, Laws.block64_octets_round_trip(iv)) : {X.m64.cbc.d1(~K, ~dec, k, X.m64.iv(_, B.Octets.len(L.LcBlock64.to_octets(iv))), X.Lc64.octets_of(bs)) == Done{X.Lc64.octets_of(X.Lc64.cbc_decrypt_blocks(~K, ~dec, k, iv, bs))} : Result<&2, &2, L.LcError, B.Octets>} %Equal.sym(Result<&2, &2, L.LcError, List<&2, L.LcBlock64>>, X.Lc64.blocks_of(X.Lc64.octets_of(bs)), Done{bs}, Laws.blocks64_octets_round_trip(bs)) : {X.m64.cbc.d2(~K, ~dec, k, iv, _) == Done{X.Lc64.octets_of(X.Lc64.cbc_decrypt_blocks(~K, ~dec, k, iv, bs))} : Result<&2, &2, L.LcError, B.Octets>} {==} def ecb_enc_ok(~K: Data, ~f: K -> L.LcBlock64 -> L.LcBlock64, +k: K, +bs: List<&2, L.LcBlock64>) -> {Result.map(&2, &2, L.LcError, List<&2, L.LcBlock64>, B.Octets, xs => X.Lc64.octets_of(X.Lc64.ecb_encrypt_blocks(~K, ~f, k, xs)), X.Lc64.blocks_of(X.Lc64.octets_of(bs))) == Done{X.Lc64.octets_of(X.Lc64.ecb_encrypt_blocks(~K, ~f, k, bs))} : Result<&2, &2, L.LcError, B.Octets>}: %Equal.sym(Result<&2, &2, L.LcError, List<&2, L.LcBlock64>>, X.Lc64.blocks_of(X.Lc64.octets_of(bs)), Done{bs}, Laws.blocks64_octets_round_trip(bs)) : {Result.map(&2, &2, L.LcError, List<&2, L.LcBlock64>, B.Octets, xs => X.Lc64.octets_of(X.Lc64.ecb_encrypt_blocks(~K, ~f, k, xs)), _) == Done{X.Lc64.octets_of(X.Lc64.ecb_encrypt_blocks(~K, ~f, k, bs))} : Result<&2, &2, L.LcError, B.Octets>} {==} def ecb_dec_ok(~K: Data, ~f: K -> L.LcBlock64 -> L.LcBlock64, +k: K, +bs: List<&2, L.LcBlock64>) -> {Result.map(&2, &2, L.LcError, List<&2, L.LcBlock64>, B.Octets, xs => X.Lc64.octets_of(X.Lc64.ecb_decrypt_blocks(~K, ~f, k, xs)), X.Lc64.blocks_of(X.Lc64.octets_of(bs))) == Done{X.Lc64.octets_of(X.Lc64.ecb_decrypt_blocks(~K, ~f, k, bs))} : Result<&2, &2, L.LcError, B.Octets>}: %Equal.sym(Result<&2, &2, L.LcError, List<&2, L.LcBlock64>>, X.Lc64.blocks_of(X.Lc64.octets_of(bs)), Done{bs}, Laws.blocks64_octets_round_trip(bs)) : {Result.map(&2, &2, L.LcError, List<&2, L.LcBlock64>, B.Octets, xs => X.Lc64.octets_of(X.Lc64.ecb_decrypt_blocks(~K, ~f, k, xs)), _) == Done{X.Lc64.octets_of(X.Lc64.ecb_decrypt_blocks(~K, ~f, k, bs))} : Result<&2, &2, L.LcError, B.Octets>} {==} def Laws.des_cbc_octets_round_trip(k, iv, bs): %Equal.sym(Result<&2, &2, L.LcError, B.Octets>, X.Lc64.cbc_encrypt(~D.LcDesKey, ~D.LcDes.encrypt, k, L.LcBlock64.to_octets(iv), X.Lc64.octets_of(bs)), Done{X.Lc64.octets_of(X.Lc64.cbc_encrypt_blocks(~D.LcDesKey, ~D.LcDes.encrypt, k, iv, bs))}, cbc_enc_ok(~D.LcDesKey, ~D.LcDes.encrypt, k, iv, bs)) : {Result.bind(&2, &2, L.LcError, B.Octets, B.Octets, _, c => X.Lc64.cbc_decrypt(~D.LcDesKey, ~D.LcDes.decrypt, k, L.LcBlock64.to_octets(iv), c)) == Done{X.Lc64.octets_of(bs)} : Result<&2, &2, L.LcError, B.Octets>} %Equal.sym(Result<&2, &2, L.LcError, B.Octets>, X.Lc64.cbc_decrypt(~D.LcDesKey, ~D.LcDes.decrypt, k, L.LcBlock64.to_octets(iv), X.Lc64.octets_of(X.Lc64.cbc_encrypt_blocks(~D.LcDesKey, ~D.LcDes.encrypt, k, iv, bs))), Done{X.Lc64.octets_of(X.Lc64.cbc_decrypt_blocks(~D.LcDesKey, ~D.LcDes.decrypt, k, iv, X.Lc64.cbc_encrypt_blocks(~D.LcDesKey, ~D.LcDes.encrypt, k, iv, bs)))}, cbc_dec_ok(~D.LcDesKey, ~D.LcDes.decrypt, k, iv, X.Lc64.cbc_encrypt_blocks(~D.LcDesKey, ~D.LcDes.encrypt, k, iv, bs))) : {_ == Done{X.Lc64.octets_of(bs)} : Result<&2, &2, L.LcError, B.Octets>} %Laws.des_cbc_round_trip(k, iv, bs) : {Done{X.Lc64.octets_of(X.Lc64.cbc_decrypt_blocks(~D.LcDesKey, ~D.LcDes.decrypt, k, iv, X.Lc64.cbc_encrypt_blocks(~D.LcDesKey, ~D.LcDes.encrypt, k, iv, bs)))} == Done{X.Lc64.octets_of(_)} : Result<&2, &2, L.LcError, B.Octets>} {==} def Laws.tdes_cbc_octets_round_trip(k, iv, bs): %Equal.sym(Result<&2, &2, L.LcError, B.Octets>, X.Lc64.cbc_encrypt(~T.LcTdesKey, ~T.LcTdes.encrypt, k, L.LcBlock64.to_octets(iv), X.Lc64.octets_of(bs)), Done{X.Lc64.octets_of(X.Lc64.cbc_encrypt_blocks(~T.LcTdesKey, ~T.LcTdes.encrypt, k, iv, bs))}, cbc_enc_ok(~T.LcTdesKey, ~T.LcTdes.encrypt, k, iv, bs)) : {Result.bind(&2, &2, L.LcError, B.Octets, B.Octets, _, c => X.Lc64.cbc_decrypt(~T.LcTdesKey, ~T.LcTdes.decrypt, k, L.LcBlock64.to_octets(iv), c)) == Done{X.Lc64.octets_of(bs)} : Result<&2, &2, L.LcError, B.Octets>} %Equal.sym(Result<&2, &2, L.LcError, B.Octets>, X.Lc64.cbc_decrypt(~T.LcTdesKey, ~T.LcTdes.decrypt, k, L.LcBlock64.to_octets(iv), X.Lc64.octets_of(X.Lc64.cbc_encrypt_blocks(~T.LcTdesKey, ~T.LcTdes.encrypt, k, iv, bs))), Done{X.Lc64.octets_of(X.Lc64.cbc_decrypt_blocks(~T.LcTdesKey, ~T.LcTdes.decrypt, k, iv, X.Lc64.cbc_encrypt_blocks(~T.LcTdesKey, ~T.LcTdes.encrypt, k, iv, bs)))}, cbc_dec_ok(~T.LcTdesKey, ~T.LcTdes.decrypt, k, iv, X.Lc64.cbc_encrypt_blocks(~T.LcTdesKey, ~T.LcTdes.encrypt, k, iv, bs))) : {_ == Done{X.Lc64.octets_of(bs)} : Result<&2, &2, L.LcError, B.Octets>} %Laws.tdes_cbc_round_trip(k, iv, bs) : {Done{X.Lc64.octets_of(X.Lc64.cbc_decrypt_blocks(~T.LcTdesKey, ~T.LcTdes.decrypt, k, iv, X.Lc64.cbc_encrypt_blocks(~T.LcTdesKey, ~T.LcTdes.encrypt, k, iv, bs)))} == Done{X.Lc64.octets_of(_)} : Result<&2, &2, L.LcError, B.Octets>} {==} def Laws.des_ecb_octets_round_trip(k, bs): %Equal.sym(Result<&2, &2, L.LcError, B.Octets>, Result.map(&2, &2, L.LcError, List<&2, L.LcBlock64>, B.Octets, xs => X.Lc64.octets_of(X.Lc64.ecb_encrypt_blocks(~D.LcDesKey, ~D.LcDes.encrypt, k, xs)), X.Lc64.blocks_of(X.Lc64.octets_of(bs))), Done{X.Lc64.octets_of(X.Lc64.ecb_encrypt_blocks(~D.LcDesKey, ~D.LcDes.encrypt, k, bs))}, ecb_enc_ok(~D.LcDesKey, ~D.LcDes.encrypt, k, bs)) : {Result.bind(&2, &2, L.LcError, B.Octets, B.Octets, _, c => X.Lc64.ecb_decrypt(~D.LcDesKey, ~D.LcDes.decrypt, k, c)) == Done{X.Lc64.octets_of(bs)} : Result<&2, &2, L.LcError, B.Octets>} %Equal.sym(Result<&2, &2, L.LcError, B.Octets>, Result.map(&2, &2, L.LcError, List<&2, L.LcBlock64>, B.Octets, xs => X.Lc64.octets_of(X.Lc64.ecb_decrypt_blocks(~D.LcDesKey, ~D.LcDes.decrypt, k, xs)), X.Lc64.blocks_of(X.Lc64.octets_of(X.Lc64.ecb_encrypt_blocks(~D.LcDesKey, ~D.LcDes.encrypt, k, bs)))), Done{X.Lc64.octets_of(X.Lc64.ecb_decrypt_blocks(~D.LcDesKey, ~D.LcDes.decrypt, k, X.Lc64.ecb_encrypt_blocks(~D.LcDesKey, ~D.LcDes.encrypt, k, bs)))}, ecb_dec_ok(~D.LcDesKey, ~D.LcDes.decrypt, k, X.Lc64.ecb_encrypt_blocks(~D.LcDesKey, ~D.LcDes.encrypt, k, bs))) : {_ == Done{X.Lc64.octets_of(bs)} : Result<&2, &2, L.LcError, B.Octets>} %Laws.des_ecb_round_trip(k, bs) : {Done{X.Lc64.octets_of(X.Lc64.ecb_decrypt_blocks(~D.LcDesKey, ~D.LcDes.decrypt, k, X.Lc64.ecb_encrypt_blocks(~D.LcDesKey, ~D.LcDes.encrypt, k, bs)))} == Done{X.Lc64.octets_of(_)} : Result<&2, &2, L.LcError, B.Octets>} {==} def Laws.tdes_ecb_octets_round_trip(k, bs): %Equal.sym(Result<&2, &2, L.LcError, B.Octets>, Result.map(&2, &2, L.LcError, List<&2, L.LcBlock64>, B.Octets, xs => X.Lc64.octets_of(X.Lc64.ecb_encrypt_blocks(~T.LcTdesKey, ~T.LcTdes.encrypt, k, xs)), X.Lc64.blocks_of(X.Lc64.octets_of(bs))), Done{X.Lc64.octets_of(X.Lc64.ecb_encrypt_blocks(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs))}, ecb_enc_ok(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs)) : {Result.bind(&2, &2, L.LcError, B.Octets, B.Octets, _, c => X.Lc64.ecb_decrypt(~T.LcTdesKey, ~T.LcTdes.decrypt, k, c)) == Done{X.Lc64.octets_of(bs)} : Result<&2, &2, L.LcError, B.Octets>} %Equal.sym(Result<&2, &2, L.LcError, B.Octets>, Result.map(&2, &2, L.LcError, List<&2, L.LcBlock64>, B.Octets, xs => X.Lc64.octets_of(X.Lc64.ecb_decrypt_blocks(~T.LcTdesKey, ~T.LcTdes.decrypt, k, xs)), X.Lc64.blocks_of(X.Lc64.octets_of(X.Lc64.ecb_encrypt_blocks(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs)))), Done{X.Lc64.octets_of(X.Lc64.ecb_decrypt_blocks(~T.LcTdesKey, ~T.LcTdes.decrypt, k, X.Lc64.ecb_encrypt_blocks(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs)))}, ecb_dec_ok(~T.LcTdesKey, ~T.LcTdes.decrypt, k, X.Lc64.ecb_encrypt_blocks(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs))) : {_ == Done{X.Lc64.octets_of(bs)} : Result<&2, &2, L.LcError, B.Octets>} %Laws.tdes_ecb_round_trip(k, bs) : {Done{X.Lc64.octets_of(X.Lc64.ecb_decrypt_blocks(~T.LcTdesKey, ~T.LcTdes.decrypt, k, X.Lc64.ecb_encrypt_blocks(~T.LcTdesKey, ~T.LcTdes.encrypt, k, bs)))} == Done{X.Lc64.octets_of(_)} : Result<&2, &2, L.LcError, B.Octets>} {==} # BEGIN GENERATED by gen/proof.py: vectors def Laws.sm4_gbt32907(): {==} def Laws.camellia_rfc3713(): {==} def Laws.serpent_nessie(): {==} def Laws.des_bad_key_length(): {==} def Laws.tdes_bad_key_length(): {==} def Laws.camellia_bad_key_length(): {==} def Laws.serpent_bad_key_length(): {==} def Laws.aria_rfc5794(): {==} def Laws.cast5_rfc2144(): {==} def Laws.fcrypt_spec(): {==} def Laws.aria_bad_key_length(): {==} def Laws.cast6_bad_key_length(): {==} def Laws.blowfish_bad_key_length(): {==} def Laws.cast5_bad_key_length(): {==} def Laws.tea_bad_key_length(): {==} def Laws.xtea_bad_key_length(): {==} def Laws.fcrypt_bad_key_length(): {==} def Laws.rc4_empty_key(): {==} def Laws.modes64_not_whole_blocks(): {==} # END GENERATED: vectors