def horner_lin_a
bend-osdev-gf@0.1.1.0 · PROOF.bend:435
import bend-osdev-gf@0.1.1.0/PROOF.bend as PROOF
import Base
import bend-osdev-gf@0.1.1.0/gf.bend as G
435def horner_lin_a(ps: List<&2, GfPb>, +A: G.Gf8Bits, +C: G.Gf8Bits, +b: G.Gf8Bits, +p: G.Gf8Bits) -> {G.Gf8Bits.horner(pl.x(ps), G.Gf8Bits.xor(A, C), b, p) == G.Gf8Bits.xor(G.Gf8Bits.horner(pl.l(ps), A, b, p), G.Gf8Bits.horner(pl.r(ps), C, b, p)) : G.Gf8Bits}:
436 match ps:
437 case Nil{}:
438 {==}
439 case Con{h, rest}:
440 match h:
441 case GfPb{+s, +t}:
442 %Equal.sym(G.Gf8Bits, G.Gf8Bits.step(Bool.xor(s, t), G.Gf8Bits.xor(A, C), b, p), G.Gf8Bits.xor(G.Gf8Bits.step(s, A, b, p), G.Gf8Bits.step(t, C, b, p)), step_lin_a(s, t, A, C, b, p)) : {G.Gf8Bits.horner(pl.x(rest), _, b, p) == G.Gf8Bits.xor(G.Gf8Bits.horner(pl.l(rest), G.Gf8Bits.step(s, A, b, p), b, p), G.Gf8Bits.horner(pl.r(rest), G.Gf8Bits.step(t, C, b, p), b, p)) : G.Gf8Bits}
443 horner_lin_a(rest, G.Gf8Bits.step(s, A, b, p), G.Gf8Bits.step(t, C, b, p), b, p)