AESEnvelopeProof.aes_fixed_bytes_identity: def of qasim-bend-kit@0.1.0.2 Import: import qasim-bend-kit@0.1.0.2/proof/AES_EnvelopeProof.bend as AESEnvelopeProof Lines 555-580 of qasim-bend-kit@0.1.0.2/proof/AES_EnvelopeProof.bend: https://jend.leeeet.dev/read.txt?path=qasim-bend-kit@0.1.0.2/proof/AES_EnvelopeProof.bend&start_line=555&end_line=580 import Base import qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend as AES def aes_fixed_bytes_identity(+n: Nat, +bytes: List<&2, U32>, size: {List.length(&2, U32, bytes) == n : Nat}) -> {AES.fixed_bytes(n, bytes) == bytes : List<&2, U32>}: match n bytes: case 0n Nil{}: {==} case 0n byte <> tail: contradiction = Equal.cong(Nat, Bool, x => Nat.is_eq(x, 0n), 1n+List.length(&2, U32, tail), 0n, size) Empty.absurd({AES.fixed_bytes(0n, byte <> tail) == byte <> tail : List<&2, U32>}, aes_false_true(contradiction)) case 1n+p Nil{}: contradiction = Equal.cong(Nat, Bool, x => Nat.is_eq(x, 0n), 0n, 1n+p, size) Empty.absurd({AES.fixed_bytes(1n+p, Nil{}) == Nil{} : List<&2, U32>}, aes_false_true(Equal.sym(Bool, True{}, False{}, contradiction))) case 1n+p byte <> tail: tail_size = Equal.cong(Nat, Nat, aes_nat_predecessor, 1n+List.length(&2, U32, tail), 1n+p, size) Equal.cong(List<&2, U32>, List<&2, U32>, xs => byte <> xs, AES.fixed_bytes(p, tail), tail, aes_fixed_bytes_identity(p, tail, tail_size)) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Empty.absurd https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.cong https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.length https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/libs/AES256GCM.bend&name=fixed_bytes https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/proof/AES_EnvelopeProof.bend&name=aes_false_true https://jend.leeeet.dev/definition.txt?path=qasim-bend-kit@0.1.0.2/proof/AES_EnvelopeProof.bend&name=aes_nat_predecessor