Require Import List.
Import ListNotations.
Require Import String.

(* Borrow from CompCert *)
Require Import Coqlib.
Require Import Integers.

Require Import AST.
Require Import Semantics.
Require Import Utils.
Require Import Builtins.
Require Import BuiltinSem.
Require Import Values.

Require Import Tactics.

Import HaskellListNotations.
Open Scope string.

(* copy paste from cryptol, load HMAC.cry and use ":all" command *)
(* basically just leverage existing cryptol parser *)
Definition whole_prog :=
  [(NonRecursive (Decl (0,"demote") DPrim)),(NonRecursive (Decl (1,"+") DPrim)),(NonRecursive (Decl (2,"-") DPrim)),(NonRecursive (Decl (3,"*") DPrim)),(NonRecursive (Decl (4,"/") DPrim)),(NonRecursive (Decl (5,"%") DPrim)),(NonRecursive (Decl (6,"^^") DPrim)),(NonRecursive (Decl (7,"lg2") DPrim)),(NonRecursive (Decl (9,"True") DPrim)),(NonRecursive (Decl (10,"False") DPrim)),(NonRecursive (Decl (11,"negate") DPrim)),(NonRecursive (Decl (12,"complement") DPrim)),(NonRecursive (Decl (13,"<") DPrim)),(NonRecursive (Decl (14,">") DPrim)),(NonRecursive (Decl (15,"<=") DPrim)),(NonRecursive (Decl (16,">=") DPrim)),(NonRecursive (Decl (17,"==") DPrim)),(NonRecursive (Decl (18,"!=") DPrim)),(NonRecursive (Decl (19,"===") (DExpr (ETAbs (87,"a") (ETAbs (88,"b") (EAbs (89,"f") (EAbs (90,"g") (EAbs (91,"x") (EApp (EApp (ETApp (EVar (17,"==")) (TVar (TVBound 31 KType))) (EApp (EVar (89,"f")) (EVar (91,"x")))) (EApp (EVar (90,"g")) (EVar (91,"x")))))))))))),(NonRecursive (Decl (20,"!==") (DExpr (ETAbs (92,"a") (ETAbs (93,"b") (EAbs (94,"f") (EAbs (95,"g") (EAbs (96,"x") (EApp (EApp (ETApp (EVar (18,"!=")) (TVar (TVBound 41 KType))) (EApp (EVar (94,"f")) (EVar (96,"x")))) (EApp (EVar (95,"g")) (EVar (96,"x")))))))))))),(NonRecursive (Decl (21,"min") (DExpr (ETAbs (97,"a") (EAbs (98,"x") (EAbs (99,"y") (EIf (EApp (EApp (ETApp (EVar (13,"<")) (TVar (TVBound 50 KType))) (EVar (98,"x"))) (EVar (99,"y"))) (EVar (98,"x")) (EVar (99,"y"))))))))),(NonRecursive (Decl (22,"max") (DExpr (ETAbs (100,"a") (EAbs (101,"x") (EAbs (102,"y") (EIf (EApp (EApp (ETApp (EVar (14,">")) (TVar (TVBound 56 KType))) (EVar (101,"x"))) (EVar (102,"y"))) (EVar (101,"x")) (EVar (102,"y"))))))))),(NonRecursive (Decl (23,"/\\") (DExpr (EAbs (103,"x") (EAbs (104,"y") (EIf (EVar (103,"x")) (EVar (104,"y")) (EVar (10,"False")))))))),(NonRecursive (Decl (24,"\\/") (DExpr (EAbs (105,"x") (EAbs (106,"y") (EIf (EVar (105,"x")) (EVar (9,"True")) (EVar (106,"y")))))))),(NonRecursive (Decl (25,"==>") (DExpr (EAbs (107,"a") (EAbs (108,"b") (EIf (EVar (107,"a")) (EVar (108,"b")) (EVar (9,"True")))))))),(NonRecursive (Decl (26,"&&") DPrim)),(NonRecursive (Decl (27,"||") DPrim)),(NonRecursive (Decl (28,"^") DPrim)),(NonRecursive (Decl (29,"zero") DPrim)),(NonRecursive (Decl (30,"<<") DPrim)),(NonRecursive (Decl (31,">>") DPrim)),(NonRecursive (Decl (32,"<<<") DPrim)),(NonRecursive (Decl (33,">>>") DPrim)),(NonRecursive (Decl (34,"#") DPrim)),(NonRecursive (Decl (35,"splitAt") DPrim)),(NonRecursive (Decl (36,"join") DPrim)),(NonRecursive (Decl (37,"split") DPrim)),(NonRecursive (Decl (38,"reverse") DPrim)),(NonRecursive (Decl (39,"transpose") DPrim)),(NonRecursive (Decl (40,"@") DPrim)),(NonRecursive (Decl (41,"@@") DPrim)),(NonRecursive (Decl (42,"!") DPrim)),(NonRecursive (Decl (43,"!!") DPrim)),(NonRecursive (Decl (44,"update") DPrim)),(NonRecursive (Decl (45,"updateEnd") DPrim)),(NonRecursive (Decl (46,"updates") (DExpr (ETAbs (162,"a") (ETAbs (163,"b") (ETAbs (164,"c") (ETAbs (165,"d") (EAbs (166,"xs0") (EAbs (167,"idxs") (EAbs (168,"vals") (EWhere (EApp (EApp (ETApp (ETApp (ETApp (EVar (42,"!")) (TCon (TF TCAdd) [TCon (TC (TCNum 1)) [],TVar (TVBound 124 KNum)])) (TCon (TC TCSeq) [TVar (TVBound 121 KNum),TVar (TVBound 122 KType)])) (TCon (TC (TCNum 0)) [])) (EVar (169,"xss"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 0)) [])) (TCon (TC (TCNum 0)) []))) [(Recursive [(Decl (169,"xss") (DExpr (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TCon (TC (TCNum 1)) [])) (TVar (TVBound 124 KNum))) (TCon (TC TCSeq) [TVar (TVBound 121 KNum),TVar (TVBound 122 KType)])) (EList [(EVar (166,"xs0"))])) (EComp (EApp (EApp (EApp (ETApp (ETApp (ETApp (EVar (44,"update")) (TVar (TVBound 121 KNum))) (TVar (TVBound 122 KType))) (TVar (TVBound 123 KNum))) (EVar (170,"xs"))) (EVar (171,"i"))) (EVar (172,"b"))) [[(From (170,"xs") (EVar (169,"xss")))],[(From (171,"i") (EVar (167,"idxs")))],[(From (172,"b") (EVar (168,"vals")))]]))))])]))))))))))),(NonRecursive (Decl (47,"updatesEnd") (DExpr (ETAbs (173,"a") (ETAbs (174,"b") (ETAbs (175,"c") (ETAbs (176,"d") (EAbs (177,"xs0") (EAbs (178,"idxs") (EAbs (179,"vals") (EWhere (EApp (EApp (ETApp (ETApp (ETApp (EVar (42,"!")) (TCon (TF TCAdd) [TCon (TC (TCNum 1)) [],TVar (TVBound 159 KNum)])) (TCon (TC TCSeq) [TVar (TVBound 156 KNum),TVar (TVBound 157 KType)])) (TCon (TC (TCNum 0)) [])) (EVar (180,"xss"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 0)) [])) (TCon (TC (TCNum 0)) []))) [(Recursive [(Decl (180,"xss") (DExpr (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TCon (TC (TCNum 1)) [])) (TVar (TVBound 159 KNum))) (TCon (TC TCSeq) [TVar (TVBound 156 KNum),TVar (TVBound 157 KType)])) (EList [(EVar (177,"xs0"))])) (EComp (EApp (EApp (EApp (ETApp (ETApp (ETApp (EVar (45,"updateEnd")) (TVar (TVBound 156 KNum))) (TVar (TVBound 157 KType))) (TVar (TVBound 158 KNum))) (EVar (181,"xs"))) (EVar (182,"i"))) (EVar (183,"b"))) [[(From (181,"xs") (EVar (180,"xss")))],[(From (182,"i") (EVar (178,"idxs")))],[(From (183,"b") (EVar (179,"vals")))]]))))])]))))))))))),(NonRecursive (Decl (48,"fromThen") DPrim)),(NonRecursive (Decl (49,"fromTo") DPrim)),(NonRecursive (Decl (50,"fromThenTo") DPrim)),(NonRecursive (Decl (51,"infFrom") DPrim)),(NonRecursive (Decl (52,"infFromThen") DPrim)),(NonRecursive (Decl (53,"error") DPrim)),(NonRecursive (Decl (54,"pmult") DPrim)),(NonRecursive (Decl (55,"pdiv") DPrim)),(NonRecursive (Decl (56,"pmod") DPrim)),(NonRecursive (Decl (57,"random") DPrim)),(NonRecursive (Decl (61,"take") (DExpr (ETAbs (209,"front") (ETAbs (210,"back") (ETAbs (211,"elem") (EAbs (212,"__p1") (EWhere (EVar (214,"x")) [(NonRecursive (Decl (213,"__p2") (DExpr (EApp (ETApp (ETApp (ETApp (EVar (35,"splitAt")) (TVar (TVBound 214 KNum))) (TVar (TVBound 215 KNum))) (TVar (TVBound 216 KType))) (EVar (212,"__p1")))))),(NonRecursive (Decl (214,"x") (DExpr (ESel (EVar (213,"__p2")) (TupleSel 0))))),(NonRecursive (Decl (215,"__p0") (DExpr (ESel (EVar (213,"__p2")) (TupleSel 1)))))])))))))),(NonRecursive (Decl (62,"drop") (DExpr (ETAbs (216,"front") (ETAbs (217,"back") (ETAbs (218,"elem") (EAbs (219,"__p4") (EWhere (EVar (222,"y")) [(NonRecursive (Decl (220,"__p5") (DExpr (EApp (ETApp (ETApp (ETApp (EVar (35,"splitAt")) (TVar (TVBound 231 KNum))) (TVar (TVBound 232 KNum))) (TVar (TVBound 233 KType))) (EVar (219,"__p4")))))),(NonRecursive (Decl (221,"__p3") (DExpr (ESel (EVar (220,"__p5")) (TupleSel 0))))),(NonRecursive (Decl (222,"y") (DExpr (ESel (EVar (220,"__p5")) (TupleSel 1)))))])))))))),(NonRecursive (Decl (63,"tail") (DExpr (ETAbs (223,"a") (ETAbs (224,"b") (EAbs (225,"xs") (EApp (ETApp (ETApp (ETApp (EVar (62,"drop")) (TCon (TC (TCNum 1)) [])) (TVar (TVBound 249 KNum))) (TVar (TVBound 250 KType))) (EVar (225,"xs"))))))))),(NonRecursive (Decl (64,"width") (DExpr (ETAbs (226,"bits") (ETAbs (227,"len") (ETAbs (228,"elem") (EAbs (229,"__p6") (ETApp (ETApp (EVar (0,"demote")) (TVar (TVBound 256 KNum))) (TVar (TVBound 255 KNum)))))))))),(NonRecursive (Decl (65,"undefined") (DExpr (ETAbs (230,"a") (EApp (ETApp (ETApp (EVar (53,"error")) (TVar (TVBound 260 KType))) (TCon (TC (TCNum 9)) [])) (EList [(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 117)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 100)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 100)) [])) (TCon (TC (TCNum 8)) []))])))))),(NonRecursive (Decl (66,"groupBy") (DExpr (ETAbs (231,"each") (ETAbs (232,"parts") (ETAbs (233,"elem") (ETApp (ETApp (ETApp (EVar (37,"split")) (TVar (TVBound 266 KNum))) (TVar (TVBound 265 KNum))) (TVar (TVBound 267 KType))))))))),(NonRecursive (Decl (68,"trace") DPrim)),(NonRecursive (Decl (69,"traceVal") (DExpr (ETAbs (238,"n") (ETAbs (239,"a") (EAbs (240,"msg") (EAbs (241,"x") (EApp (EApp (EApp (ETApp (ETApp (ETApp (EVar (68,"trace")) (TVar (TVBound 273 KNum))) (TVar (TVBound 274 KType))) (TVar (TVBound 274 KType))) (EVar (240,"msg"))) (EVar (241,"x"))) (EVar (241,"x")))))))))),(NonRecursive (Decl (242,"Ch") (DExpr (EAbs (268,"x") (EAbs (269,"y") (EAbs (270,"z") (EApp (EApp (ETApp (EVar (28,"^")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (EVar (26,"&&")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EVar (268,"x"))) (EVar (269,"y")))) (EApp (EApp (ETApp (EVar (26,"&&")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (ETApp (EVar (12,"complement")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EVar (268,"x")))) (EVar (270,"z")))))))))),(NonRecursive (Decl (243,"Maj") (DExpr (EAbs (271,"x") (EAbs (272,"y") (EAbs (273,"z") (EApp (EApp (ETApp (EVar (28,"^")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (EVar (28,"^")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (EVar (26,"&&")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EVar (271,"x"))) (EVar (272,"y")))) (EApp (EApp (ETApp (EVar (26,"&&")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EVar (271,"x"))) (EVar (273,"z"))))) (EApp (EApp (ETApp (EVar (26,"&&")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EVar (272,"y"))) (EVar (273,"z")))))))))),(NonRecursive (Decl (244,"S0") (DExpr (EAbs (274,"x") (EApp (EApp (ETApp (EVar (28,"^")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (EVar (28,"^")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (33,">>>")) (TCon (TC (TCNum 32)) [])) (TCon (TC (TCNum 2)) [])) (TCon (TC TCBit) [])) (EVar (274,"x"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2)) [])) (TCon (TC (TCNum 2)) [])))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (33,">>>")) (TCon (TC (TCNum 32)) [])) (TCon (TC (TCNum 4)) [])) (TCon (TC TCBit) [])) (EVar (274,"x"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 13)) [])) (TCon (TC (TCNum 4)) []))))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (33,">>>")) (TCon (TC (TCNum 32)) [])) (TCon (TC (TCNum 5)) [])) (TCon (TC TCBit) [])) (EVar (274,"x"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 22)) [])) (TCon (TC (TCNum 5)) [])))))))),(NonRecursive (Decl (245,"S1") (DExpr (EAbs (275,"x") (EApp (EApp (ETApp (EVar (28,"^")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (EVar (28,"^")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (33,">>>")) (TCon (TC (TCNum 32)) [])) (TCon (TC (TCNum 3)) [])) (TCon (TC TCBit) [])) (EVar (275,"x"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 6)) [])) (TCon (TC (TCNum 3)) [])))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (33,">>>")) (TCon (TC (TCNum 32)) [])) (TCon (TC (TCNum 4)) [])) (TCon (TC TCBit) [])) (EVar (275,"x"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 11)) [])) (TCon (TC (TCNum 4)) []))))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (33,">>>")) (TCon (TC (TCNum 32)) [])) (TCon (TC (TCNum 5)) [])) (TCon (TC TCBit) [])) (EVar (275,"x"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 25)) [])) (TCon (TC (TCNum 5)) [])))))))),(NonRecursive (Decl (246,"s0") (DExpr (EAbs (276,"x") (EApp (EApp (ETApp (EVar (28,"^")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (EVar (28,"^")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (33,">>>")) (TCon (TC (TCNum 32)) [])) (TCon (TC (TCNum 3)) [])) (TCon (TC TCBit) [])) (EVar (276,"x"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 7)) [])) (TCon (TC (TCNum 3)) [])))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (33,">>>")) (TCon (TC (TCNum 32)) [])) (TCon (TC (TCNum 5)) [])) (TCon (TC TCBit) [])) (EVar (276,"x"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 18)) [])) (TCon (TC (TCNum 5)) []))))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (31,">>")) (TCon (TC (TCNum 32)) [])) (TCon (TC (TCNum 2)) [])) (TCon (TC TCBit) [])) (EVar (276,"x"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 3)) [])) (TCon (TC (TCNum 2)) [])))))))),(NonRecursive (Decl (247,"s1") (DExpr (EAbs (277,"x") (EApp (EApp (ETApp (EVar (28,"^")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (EVar (28,"^")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (33,">>>")) (TCon (TC (TCNum 32)) [])) (TCon (TC (TCNum 5)) [])) (TCon (TC TCBit) [])) (EVar (277,"x"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 17)) [])) (TCon (TC (TCNum 5)) [])))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (33,">>>")) (TCon (TC (TCNum 32)) [])) (TCon (TC (TCNum 5)) [])) (TCon (TC TCBit) [])) (EVar (277,"x"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 19)) [])) (TCon (TC (TCNum 5)) []))))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (31,">>")) (TCon (TC (TCNum 32)) [])) (TCon (TC (TCNum 4)) [])) (TCon (TC TCBit) [])) (EVar (277,"x"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 10)) [])) (TCon (TC (TCNum 4)) [])))))))),(NonRecursive (Decl (248,"K") (DExpr (EList [(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1116352408)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1899447441)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 3049323471)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 3921009573)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 961987163)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1508970993)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2453635748)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2870763221)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 3624381080)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 310598401)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 607225278)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1426881987)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1925078388)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2162078206)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2614888103)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 3248222580)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 3835390401)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 4022224774)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 264347078)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 604807628)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 770255983)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1249150122)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1555081692)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1996064986)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2554220882)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2821834349)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2952996808)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 3210313671)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 3336571891)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 3584528711)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 113926993)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 338241895)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 666307205)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 773529912)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1294757372)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1396182291)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1695183700)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1986661051)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2177026350)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2456956037)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2730485921)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2820302411)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 3259730800)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 3345764771)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 3516065817)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 3600352804)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 4094571909)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 275423344)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 430227734)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 506948616)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 659060556)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 883997877)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 958139571)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1322822218)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1537002063)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1747873779)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1955562222)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2024104815)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2227730452)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2361852424)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2428436474)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2756734187)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 3204031479)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 3329325298)) [])) (TCon (TC (TCNum 32)) []))])))),(NonRecursive (Decl (249,"preprocess") (DExpr (ETAbs (278,"msgLen") (ETAbs (279,"contentLen") (ETAbs (280,"chunks") (ETAbs (281,"padding") (EAbs (282,"msg") (EApp (ETApp (ETApp (ETApp (EVar (37,"split")) (TVar (TVBound 405 KNum))) (TCon (TC (TCNum 512)) [])) (TCon (TC TCBit) [])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TVar (TVBound 403 KNum))) (TCon (TF TCAdd) [TCon (TC (TCNum 65)) [],TVar (TVBound 406 KNum)])) (TCon (TC TCBit) [])) (EVar (282,"msg"))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TCon (TC (TCNum 1)) [])) (TCon (TF TCAdd) [TCon (TC (TCNum 64)) [],TVar (TVBound 406 KNum)])) (TCon (TC TCBit) [])) (EList [(EVar (9,"True"))])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TVar (TVBound 406 KNum))) (TCon (TC (TCNum 64)) [])) (TCon (TC TCBit) [])) (ETApp (EVar (29,"zero")) (TCon (TC TCSeq) [TVar (TVBound 406 KNum),TCon (TC TCBit) []]))) (ETApp (ETApp (EVar (0,"demote")) (TVar (TVBound 403 KNum))) (TCon (TC (TCNum 64)) [])))))))))))))),(NonRecursive (Decl (250,"H0") (DExpr (EList [(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1779033703)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 3144134277)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1013904242)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2773480762)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1359893119)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2600822924)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 528734635)) [])) (TCon (TC (TCNum 32)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1541459225)) [])) (TCon (TC (TCNum 32)) []))])))),(NonRecursive (Decl (251,"SHA256MessageSchedule") (DExpr (EAbs (283,"M") (EWhere (EVar (284,"W")) [(Recursive [(Decl (284,"W") (DExpr (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TCon (TC (TCNum 16)) [])) (TCon (TC (TCNum 48)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EVar (283,"M"))) (EComp (EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EVar (247,"s1")) (EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 64)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 8)) [])) (EVar (284,"W"))) (EApp (EApp (ETApp (EVar (2,"-")) (TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []])) (EVar (285,"j"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2)) [])) (TCon (TC (TCNum 8)) [])))))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 64)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 8)) [])) (EVar (284,"W"))) (EApp (EApp (ETApp (EVar (2,"-")) (TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []])) (EVar (285,"j"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 7)) [])) (TCon (TC (TCNum 8)) [])))))) (EApp (EVar (246,"s0")) (EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 64)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 8)) [])) (EVar (284,"W"))) (EApp (EApp (ETApp (EVar (2,"-")) (TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []])) (EVar (285,"j"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 15)) [])) (TCon (TC (TCNum 8)) []))))))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 64)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 8)) [])) (EVar (284,"W"))) (EApp (EApp (ETApp (EVar (2,"-")) (TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []])) (EVar (285,"j"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 16)) [])) (TCon (TC (TCNum 8)) []))))) [[(From (285,"j") (ETApp (ETApp (ETApp (EVar (49,"fromTo")) (TCon (TC (TCNum 16)) [])) (TCon (TC (TCNum 63)) [])) (TCon (TC (TCNum 8)) [])))]]))))])]))))),(NonRecursive (Decl (252,"SHA256Compress") (DExpr (EAbs (286,"H") (EAbs (287,"W") (EWhere (EList [(EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (42,"!")) (TCon (TC (TCNum 65)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 0)) [])) (EVar (297,"as"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 0)) [])) (TCon (TC (TCNum 0)) [])))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 8)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 0)) [])) (EVar (286,"H"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 0)) [])) (TCon (TC (TCNum 0)) [])))),(EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (42,"!")) (TCon (TC (TCNum 65)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 0)) [])) (EVar (296,"bs"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 0)) [])) (TCon (TC (TCNum 0)) [])))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 8)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 1)) [])) (EVar (286,"H"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1)) [])) (TCon (TC (TCNum 1)) [])))),(EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (42,"!")) (TCon (TC (TCNum 65)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 0)) [])) (EVar (295,"cs"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 0)) [])) (TCon (TC (TCNum 0)) [])))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 8)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 2)) [])) (EVar (286,"H"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2)) [])) (TCon (TC (TCNum 2)) [])))),(EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (42,"!")) (TCon (TC (TCNum 65)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 0)) [])) (EVar (294,"ds"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 0)) [])) (TCon (TC (TCNum 0)) [])))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 8)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 2)) [])) (EVar (286,"H"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 3)) [])) (TCon (TC (TCNum 2)) [])))),(EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (42,"!")) (TCon (TC (TCNum 65)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 0)) [])) (EVar (293,"es"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 0)) [])) (TCon (TC (TCNum 0)) [])))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 8)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 3)) [])) (EVar (286,"H"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 4)) [])) (TCon (TC (TCNum 3)) [])))),(EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (42,"!")) (TCon (TC (TCNum 65)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 0)) [])) (EVar (292,"fs"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 0)) [])) (TCon (TC (TCNum 0)) [])))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 8)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 3)) [])) (EVar (286,"H"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 5)) [])) (TCon (TC (TCNum 3)) [])))),(EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (42,"!")) (TCon (TC (TCNum 65)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 0)) [])) (EVar (291,"gs"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 0)) [])) (TCon (TC (TCNum 0)) [])))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 8)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 3)) [])) (EVar (286,"H"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 6)) [])) (TCon (TC (TCNum 3)) [])))),(EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (42,"!")) (TCon (TC (TCNum 65)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 0)) [])) (EVar (290,"hs"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 0)) [])) (TCon (TC (TCNum 0)) [])))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 8)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 3)) [])) (EVar (286,"H"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 7)) [])) (TCon (TC (TCNum 3)) []))))]) [(Recursive [(Decl (288,"T1") (DExpr (EComp (EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EVar (298,"h"))) (EApp (EVar (245,"S1")) (EVar (299,"e"))))) (EApp (EApp (EApp (EVar (242,"Ch")) (EVar (299,"e"))) (EVar (300,"f"))) (EVar (301,"g"))))) (EVar (302,"k")))) (EVar (303,"w"))) [[(From (298,"h") (EVar (290,"hs")))],[(From (299,"e") (EVar (293,"es")))],[(From (300,"f") (EVar (292,"fs")))],[(From (301,"g") (EVar (291,"gs")))],[(From (302,"k") (EVar (248,"K")))],[(From (303,"w") (EVar (287,"W")))]]))),(Decl (289,"T2") (DExpr (EComp (EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EVar (244,"S0")) (EVar (304,"a")))) (EApp (EApp (EApp (EVar (243,"Maj")) (EVar (304,"a"))) (EVar (305,"b"))) (EVar (306,"c")))) [[(From (304,"a") (EVar (297,"as")))],[(From (305,"b") (EVar (296,"bs")))],[(From (306,"c") (EVar (295,"cs")))]]))),(Decl (297,"as") (DExpr (EApp (ETApp (ETApp (ETApp (EVar (61,"take")) (TCon (TC (TCNum 65)) [])) (TCon (TC (TCNum 0)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TCon (TC (TCNum 1)) [])) (TCon (TC (TCNum 64)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EList [(EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 8)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 0)) [])) (EVar (286,"H"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 0)) [])) (TCon (TC (TCNum 0)) [])))])) (EComp (EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EVar (309,"t1"))) (EVar (310,"t2"))) [[(From (309,"t1") (EVar (288,"T1")))],[(From (310,"t2") (EVar (289,"T2")))]]))))),(Decl (296,"bs") (DExpr (EApp (ETApp (ETApp (ETApp (EVar (61,"take")) (TCon (TC (TCNum 65)) [])) (TCon (TC (TCNum 1)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TCon (TC (TCNum 1)) [])) (TCon (TC (TCNum 65)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EList [(EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 8)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 1)) [])) (EVar (286,"H"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1)) [])) (TCon (TC (TCNum 1)) [])))])) (EVar (297,"as")))))),(Decl (295,"cs") (DExpr (EApp (ETApp (ETApp (ETApp (EVar (61,"take")) (TCon (TC (TCNum 65)) [])) (TCon (TC (TCNum 1)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TCon (TC (TCNum 1)) [])) (TCon (TC (TCNum 65)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EList [(EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 8)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 2)) [])) (EVar (286,"H"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 2)) [])) (TCon (TC (TCNum 2)) [])))])) (EVar (296,"bs")))))),(Decl (294,"ds") (DExpr (EApp (ETApp (ETApp (ETApp (EVar (61,"take")) (TCon (TC (TCNum 65)) [])) (TCon (TC (TCNum 1)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TCon (TC (TCNum 1)) [])) (TCon (TC (TCNum 65)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EList [(EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 8)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 2)) [])) (EVar (286,"H"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 3)) [])) (TCon (TC (TCNum 2)) [])))])) (EVar (295,"cs")))))),(Decl (293,"es") (DExpr (EApp (ETApp (ETApp (ETApp (EVar (61,"take")) (TCon (TC (TCNum 65)) [])) (TCon (TC (TCNum 0)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TCon (TC (TCNum 1)) [])) (TCon (TC (TCNum 64)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EList [(EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 8)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 3)) [])) (EVar (286,"H"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 4)) [])) (TCon (TC (TCNum 3)) [])))])) (EComp (EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EVar (307,"d"))) (EVar (308,"t1"))) [[(From (307,"d") (EVar (294,"ds")))],[(From (308,"t1") (EVar (288,"T1")))]]))))),(Decl (292,"fs") (DExpr (EApp (ETApp (ETApp (ETApp (EVar (61,"take")) (TCon (TC (TCNum 65)) [])) (TCon (TC (TCNum 1)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TCon (TC (TCNum 1)) [])) (TCon (TC (TCNum 65)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EList [(EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 8)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 3)) [])) (EVar (286,"H"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 5)) [])) (TCon (TC (TCNum 3)) [])))])) (EVar (293,"es")))))),(Decl (291,"gs") (DExpr (EApp (ETApp (ETApp (ETApp (EVar (61,"take")) (TCon (TC (TCNum 65)) [])) (TCon (TC (TCNum 1)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TCon (TC (TCNum 1)) [])) (TCon (TC (TCNum 65)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EList [(EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 8)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 3)) [])) (EVar (286,"H"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 6)) [])) (TCon (TC (TCNum 3)) [])))])) (EVar (292,"fs")))))),(Decl (290,"hs") (DExpr (EApp (ETApp (ETApp (ETApp (EVar (61,"take")) (TCon (TC (TCNum 65)) [])) (TCon (TC (TCNum 1)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TCon (TC (TCNum 1)) [])) (TCon (TC (TCNum 65)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (EList [(EApp (EApp (ETApp (ETApp (ETApp (EVar (40,"@")) (TCon (TC (TCNum 8)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 3)) [])) (EVar (286,"H"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 7)) [])) (TCon (TC (TCNum 3)) [])))])) (EVar (291,"gs"))))))])])))))),(NonRecursive (Decl (253,"SHA256Block") (DExpr (EAbs (311,"H") (EAbs (312,"M") (EApp (EApp (EVar (252,"SHA256Compress")) (EVar (311,"H"))) (EApp (EVar (251,"SHA256MessageSchedule")) (EVar (312,"M"))))))))),(NonRecursive (Decl (254,"SHA256'") (DExpr (ETAbs (313,"a") (EAbs (314,"blocks") (EWhere (EApp (EApp (ETApp (ETApp (ETApp (EVar (42,"!")) (TCon (TF TCAdd) [TCon (TC (TCNum 1)) [],TVar (TVBound 799 KNum)])) (TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []]])) (TCon (TC (TCNum 0)) [])) (EVar (315,"hash"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 0)) [])) (TCon (TC (TCNum 0)) []))) [(Recursive [(Decl (315,"hash") (DExpr (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TCon (TC (TCNum 1)) [])) (TVar (TVBound 799 KNum))) (TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []]])) (EList [(EVar (250,"H0"))])) (EComp (EApp (EApp (EVar (253,"SHA256Block")) (EVar (316,"h"))) (EVar (317,"b"))) [[(From (316,"h") (EVar (315,"hash")))],[(From (317,"b") (EVar (314,"blocks")))]]))))])])))))),(NonRecursive (Decl (255,"SHA256") (DExpr (ETAbs (318,"a") (EAbs (319,"msg") (EApp (ETApp (ETApp (ETApp (EVar (36,"join")) (TCon (TC (TCNum 8)) [])) (TCon (TC (TCNum 32)) [])) (TCon (TC TCBit) [])) (EApp (ETApp (EVar (254,"SHA256'")) (TCon (TF TCDiv) [TCon (TF TCAdd) [TCon (TC (TCNum 576)) [],TCon (TF TCMul) [TCon (TC (TCNum 8)) [],TVar (TVBound 823 KNum)]],TCon (TC (TCNum 512)) []])) (EComp (EApp (ETApp (ETApp (ETApp (EVar (37,"split")) (TCon (TC (TCNum 16)) [])) (TCon (TC (TCNum 32)) [])) (TCon (TC TCBit) [])) (EVar (320,"x"))) [[(From (320,"x") (EApp (ETApp (ETApp (ETApp (ETApp (EVar (249,"preprocess")) (TCon (TF TCMul) [TCon (TC (TCNum 8)) [],TVar (TVBound 823 KNum)])) (TCon (TF TCAdd) [TCon (TC (TCNum 65)) [],TCon (TF TCMul) [TCon (TC (TCNum 8)) [],TVar (TVBound 823 KNum)]])) (TCon (TF TCDiv) [TCon (TF TCAdd) [TCon (TC (TCNum 576)) [],TCon (TF TCMul) [TCon (TC (TCNum 8)) [],TVar (TVBound 823 KNum)]],TCon (TC (TCNum 512)) []])) (TCon (TF TCMod) [TCon (TF TCSub) [TCon (TC (TCNum 512)) [],TCon (TF TCMod) [TCon (TF TCAdd) [TCon (TC (TCNum 65)) [],TCon (TF TCMul) [TCon (TC (TCNum 8)) [],TVar (TVBound 823 KNum)]],TCon (TC (TCNum 512)) []]],TCon (TC (TCNum 512)) []])) (EApp (ETApp (ETApp (ETApp (EVar (36,"join")) (TVar (TVBound 823 KNum))) (TCon (TC (TCNum 8)) [])) (TCon (TC TCBit) [])) (EVar (319,"msg")))))]])))))))),(NonRecursive (Decl (257,"kats") (DExpr (EList [(ETuple [(EApp (ETApp (EVar (255,"SHA256")) (TCon (TC (TCNum 56)) [])) (EList [(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 97)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 98)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 99)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 100)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 98)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 99)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 100)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 99)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 100)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 100)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 112)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 112)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 113)) [])) (TCon (TC (TCNum 8)) []))])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 16533122207477069341668099752125637525043274373652441057433006174010909329089)) [])) (TCon (TC (TCNum 256)) []))]),(ETuple [(EApp (ETApp (EVar (255,"SHA256")) (TCon (TC (TCNum 0)) [])) (EList [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102987336249554097029535212322581322789799900648198034993379397001115665086549)) [])) (TCon (TC (TCNum 256)) []))]),(ETuple [(EApp (ETApp (EVar (255,"SHA256")) (TCon (TC (TCNum 112)) [])) (EList [(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 97)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 98)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 99)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 100)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 98)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 99)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 100)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 99)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 100)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 100)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 112)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 112)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 113)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 112)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 113)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 114)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 112)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 113)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 114)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 115)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 112)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 113)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 114)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 115)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 116)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 112)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 113)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 114)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 115)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 116)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 117)) [])) (TCon (TC (TCNum 8)) []))])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 93789699093071375310876825772826470999347754471583810071657638912869466565073)) [])) (TCon (TC (TCNum 256)) []))])])))),(NonRecursive (Decl (256,"katsPass") (DExpr (EApp (EApp (ETApp (EVar (17,"==")) (TCon (TC TCSeq) [TCon (TC (TCNum 3)) [],TCon (TC TCBit) []])) (EApp (ETApp (EVar (12,"complement")) (TCon (TC TCSeq) [TCon (TC (TCNum 3)) [],TCon (TC TCBit) []])) (ETApp (EVar (29,"zero")) (TCon (TC TCSeq) [TCon (TC (TCNum 3)) [],TCon (TC TCBit) []])))) (EComp (EApp (EApp (ETApp (EVar (17,"==")) (TCon (TC TCSeq) [TCon (TC (TCNum 256)) [],TCon (TC TCBit) []])) (EVar (322,"test"))) (EVar (323,"kat"))) [[(From (321,"__p0") (EVar (257,"kats"))),(MLet (Decl (322,"test") (DExpr (ESel (EVar (321,"__p0")) (TupleSel 0))))),(MLet (Decl (323,"kat") (DExpr (ESel (EVar (321,"__p0")) (TupleSel 1)))))]]))))),(NonRecursive (Decl (259,"SHA256Init") (DExpr (ERec [("h",(EVar (250,"H0"))),("block",(ETApp (EVar (29,"zero")) (TCon (TC TCSeq) [TCon (TC (TCNum 64)) [],TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []]]))),("n",(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 0)) [])) (TCon (TC (TCNum 16)) []))),("sz",(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 0)) [])) (TCon (TC (TCNum 64)) [])))])))),(NonRecursive (Decl (262,"update") (DExpr (ETAbs (332,"a") (ETAbs (333,"b") (ETAbs (334,"c") (EAbs (335,"a") (EAbs (336,"i") (EAbs (337,"x") (EComp (EIf (EApp (EApp (ETApp (EVar (17,"==")) (TCon (TC TCSeq) [TVar (TVBound 897 KNum),TCon (TC TCBit) []])) (EVar (339,"j"))) (EVar (336,"i"))) (EVar (337,"x")) (EVar (338,"e"))) [[(From (338,"e") (EVar (335,"a")))],[(From (339,"j") (ETApp (ETApp (ETApp (EVar (49,"fromTo")) (TCon (TC (TCNum 0)) [])) (TCon (TF TCSub) [TCon (TF TCExp) [TCon (TC (TCNum 2)) [],TVar (TVBound 897 KNum)],TCon (TC (TCNum 1)) []])) (TVar (TVBound 897 KNum))))]])))))))))),(NonRecursive (Decl (260,"SHA256Update1") (DExpr (EAbs (324,"s") (EAbs (325,"b") (EIf (EApp (EApp (ETApp (EVar (17,"==")) (TCon (TC TCSeq) [TCon (TC (TCNum 16)) [],TCon (TC TCBit) []])) (ESel (EVar (324,"s")) (RecordSel "n"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 64)) [])) (TCon (TC (TCNum 16)) []))) (ERec [("h",(EApp (EApp (EVar (253,"SHA256Block")) (ESel (EVar (324,"s")) (RecordSel "h"))) (EApp (ETApp (ETApp (ETApp (EVar (37,"split")) (TCon (TC (TCNum 16)) [])) (TCon (TC (TCNum 32)) [])) (TCon (TC TCBit) [])) (EApp (ETApp (ETApp (ETApp (EVar (36,"join")) (TCon (TC (TCNum 64)) [])) (TCon (TC (TCNum 8)) [])) (TCon (TC TCBit) [])) (ESel (EVar (324,"s")) (RecordSel "block")))))),("block",(EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TCon (TC (TCNum 1)) [])) (TCon (TC (TCNum 63)) [])) (TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []])) (EList [(EVar (325,"b"))])) (ETApp (EVar (29,"zero")) (TCon (TC TCSeq) [TCon (TC (TCNum 63)) [],TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []]])))),("n",(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1)) [])) (TCon (TC (TCNum 16)) []))),("sz",(EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 64)) [],TCon (TC TCBit) []])) (ESel (EVar (324,"s")) (RecordSel "sz"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 8)) [])) (TCon (TC (TCNum 64)) []))))]) (ERec [("h",(ESel (EVar (324,"s")) (RecordSel "h"))),("block",(EApp (EApp (EApp (ETApp (ETApp (ETApp (EVar (262,"update")) (TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []])) (TCon (TC (TCNum 64)) [])) (TCon (TC (TCNum 16)) [])) (ESel (EVar (324,"s")) (RecordSel "block"))) (ESel (EVar (324,"s")) (RecordSel "n"))) (EVar (325,"b")))),("n",(EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 16)) [],TCon (TC TCBit) []])) (ESel (EVar (324,"s")) (RecordSel "n"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 1)) [])) (TCon (TC (TCNum 16)) [])))),("sz",(EApp (EApp (ETApp (EVar (1,"+")) (TCon (TC TCSeq) [TCon (TC (TCNum 64)) [],TCon (TC TCBit) []])) (ESel (EVar (324,"s")) (RecordSel "sz"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 8)) [])) (TCon (TC (TCNum 64)) []))))]))))))),(NonRecursive (Decl (261,"SHA256Update") (DExpr (ETAbs (326,"n") (EAbs (327,"sinit") (EAbs (328,"bs") (EWhere (EApp (EApp (ETApp (ETApp (ETApp (EVar (42,"!")) (TCon (TF TCAdd) [TCon (TC (TCNum 1)) [],TVar (TVBound 962 KNum)])) (TUser (258,"SHA256State") [] (TRec [("h",(TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []]])),("block",(TCon (TC TCSeq) [TCon (TC (TCNum 64)) [],TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []]])),("n",(TCon (TC TCSeq) [TCon (TC (TCNum 16)) [],TCon (TC TCBit) []])),("sz",(TCon (TC TCSeq) [TCon (TC (TCNum 64)) [],TCon (TC TCBit) []]))]))) (TCon (TC (TCNum 0)) [])) (EVar (329,"ss"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 0)) [])) (TCon (TC (TCNum 0)) []))) [(Recursive [(Decl (329,"ss") (DExpr (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TCon (TC (TCNum 1)) [])) (TVar (TVBound 962 KNum))) (TUser (258,"SHA256State") [] (TRec [("h",(TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCSeq) [TCon (TC (TCNum 32)) [],TCon (TC TCBit) []]])),("block",(TCon (TC TCSeq) [TCon (TC (TCNum 64)) [],TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []]])),("n",(TCon (TC TCSeq) [TCon (TC (TCNum 16)) [],TCon (TC TCBit) []])),("sz",(TCon (TC TCSeq) [TCon (TC (TCNum 64)) [],TCon (TC TCBit) []]))]))) (EList [(EVar (327,"sinit"))])) (EComp (EApp (EApp (EVar (260,"SHA256Update1")) (EVar (330,"s"))) (EVar (331,"b"))) [[(From (330,"s") (EVar (329,"ss")))],[(From (331,"b") (EVar (328,"bs")))]]))))])]))))))),(NonRecursive (Decl (263,"SHA256Final") (DExpr (EAbs (340,"s") (EWhere (EApp (ETApp (ETApp (ETApp (EVar (36,"join")) (TCon (TC (TCNum 8)) [])) (TCon (TC (TCNum 32)) [])) (TCon (TC TCBit) [])) (EApp (EApp (EVar (253,"SHA256Block")) (EVar (343,"h"))) (EVar (345,"b'")))) [(NonRecursive (Decl (341,"s'") (DExpr (EApp (EApp (EVar (260,"SHA256Update1")) (EVar (340,"s"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 128)) [])) (TCon (TC (TCNum 8)) [])))))),(NonRecursive (Decl (342,"__p1") (DExpr (EIf (EApp (EApp (ETApp (EVar (15,"<=")) (TCon (TC TCSeq) [TCon (TC (TCNum 16)) [],TCon (TC TCBit) []])) (ESel (EVar (341,"s'")) (RecordSel "n"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 56)) [])) (TCon (TC (TCNum 16)) []))) (ETuple [(ESel (EVar (341,"s'")) (RecordSel "h")),(ESel (EVar (341,"s'")) (RecordSel "block"))]) (ETuple [(EApp (EApp (EVar (253,"SHA256Block")) (ESel (EVar (341,"s'")) (RecordSel "h"))) (EApp (ETApp (ETApp (ETApp (EVar (37,"split")) (TCon (TC (TCNum 16)) [])) (TCon (TC (TCNum 32)) [])) (TCon (TC TCBit) [])) (EApp (ETApp (ETApp (ETApp (EVar (36,"join")) (TCon (TC (TCNum 64)) [])) (TCon (TC (TCNum 8)) [])) (TCon (TC TCBit) [])) (ESel (EVar (341,"s'")) (RecordSel "block"))))),(ETApp (EVar (29,"zero")) (TCon (TC TCSeq) [TCon (TC (TCNum 64)) [],TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []]]))]))))),(NonRecursive (Decl (343,"h") (DExpr (ESel (EVar (342,"__p1")) (TupleSel 0))))),(NonRecursive (Decl (344,"b") (DExpr (ESel (EVar (342,"__p1")) (TupleSel 1))))),(NonRecursive (Decl (345,"b'") (DExpr (EApp (ETApp (ETApp (ETApp (EVar (37,"split")) (TCon (TC (TCNum 16)) [])) (TCon (TC (TCNum 32)) [])) (TCon (TC TCBit) [])) (EApp (EApp (ETApp (EVar (27,"||")) (TCon (TC TCSeq) [TCon (TC (TCNum 512)) [],TCon (TC TCBit) []])) (EApp (ETApp (ETApp (ETApp (EVar (36,"join")) (TCon (TC (TCNum 64)) [])) (TCon (TC (TCNum 8)) [])) (TCon (TC TCBit) [])) (EVar (344,"b")))) (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TCon (TC (TCNum 448)) [])) (TCon (TC (TCNum 64)) [])) (TCon (TC TCBit) [])) (ETApp (EVar (29,"zero")) (TCon (TC TCSeq) [TCon (TC (TCNum 448)) [],TCon (TC TCBit) []]))) (ESel (EVar (340,"s")) (RecordSel "sz"))))))))]))))),(NonRecursive (Decl (264,"SHA256Imp") (DExpr (ETAbs (346,"a") (EAbs (347,"msg") (EApp (EVar (263,"SHA256Final")) (EApp (EApp (ETApp (EVar (261,"SHA256Update")) (TVar (TVBound 1047 KNum))) (EVar (259,"SHA256Init"))) (EVar (347,"msg"))))))))),(NonRecursive (Decl (266,"katsImp") (DExpr (EList [(ETuple [(EApp (ETApp (EVar (264,"SHA256Imp")) (TCon (TC (TCNum 56)) [])) (EList [(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 97)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 98)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 99)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 100)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 98)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 99)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 100)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 99)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 100)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 100)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 112)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 112)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 113)) [])) (TCon (TC (TCNum 8)) []))])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 16533122207477069341668099752125637525043274373652441057433006174010909329089)) [])) (TCon (TC (TCNum 256)) []))]),(ETuple [(EApp (ETApp (EVar (264,"SHA256Imp")) (TCon (TC (TCNum 0)) [])) (EList [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102987336249554097029535212322581322789799900648198034993379397001115665086549)) [])) (TCon (TC (TCNum 256)) []))]),(ETuple [(EApp (ETApp (EVar (264,"SHA256Imp")) (TCon (TC (TCNum 112)) [])) (EList [(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 97)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 98)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 99)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 100)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 98)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 99)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 100)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 99)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 100)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 100)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 101)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 102)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 103)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 104)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 105)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 112)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 106)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 112)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 113)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 107)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 112)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 113)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 114)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 108)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 112)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 113)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 114)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 115)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 109)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 112)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 113)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 114)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 115)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 116)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 110)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 111)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 112)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 113)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 114)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 115)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 116)) [])) (TCon (TC (TCNum 8)) [])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 117)) [])) (TCon (TC (TCNum 8)) []))])),(ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 93789699093071375310876825772826470999347754471583810071657638912869466565073)) [])) (TCon (TC (TCNum 256)) []))])])))),(NonRecursive (Decl (265,"katsPassImp") (DExpr (EApp (EApp (ETApp (EVar (17,"==")) (TCon (TC TCSeq) [TCon (TC (TCNum 3)) [],TCon (TC TCBit) []])) (EApp (ETApp (EVar (12,"complement")) (TCon (TC TCSeq) [TCon (TC (TCNum 3)) [],TCon (TC TCBit) []])) (ETApp (EVar (29,"zero")) (TCon (TC TCSeq) [TCon (TC (TCNum 3)) [],TCon (TC TCBit) []])))) (EComp (EApp (EApp (ETApp (EVar (17,"==")) (TCon (TC TCSeq) [TCon (TC (TCNum 256)) [],TCon (TC TCBit) []])) (EVar (349,"test"))) (EVar (350,"kat"))) [[(From (348,"__p2") (EVar (266,"katsImp"))),(MLet (Decl (349,"test") (DExpr (ESel (EVar (348,"__p2")) (TupleSel 0))))),(MLet (Decl (350,"kat") (DExpr (ESel (EVar (348,"__p2")) (TupleSel 1)))))]]))))),(NonRecursive (Decl (267,"imp_correct") (DExpr (ETAbs (0,"") (EAbs (351,"msg") (EApp (EApp (ETApp (EVar (17,"==")) (TCon (TC TCSeq) [TCon (TC (TCNum 256)) [],TCon (TC TCBit) []])) (EApp (ETApp (EVar (255,"SHA256")) (TVar (TVBound 1105 KNum))) (EVar (351,"msg")))) (EApp (ETApp (EVar (264,"SHA256Imp")) (TVar (TVBound 1105 KNum))) (EVar (351,"msg"))))))))),(NonRecursive (Decl (353,"kinit") (DExpr (ETAbs (357,"pwBytes") (ETAbs (358,"blockLength") (ETAbs (359,"digest") (EAbs (360,"hash") (EAbs (361,"key") (EIf (EApp (EApp (ETApp (EVar (14,">")) (TCon (TC TCSeq) [TCon (TF TCMax) [TCon (TF TCWidth) [TVar (TVBound 1108 KNum)],TCon (TF TCWidth) [TVar (TVBound 1109 KNum)]],TCon (TC TCBit) []])) (ETApp (ETApp (EVar (0,"demote")) (TVar (TVBound 1108 KNum))) (TCon (TF TCMax) [TCon (TF TCWidth) [TVar (TVBound 1108 KNum)],TCon (TF TCWidth) [TVar (TVBound 1109 KNum)]]))) (ETApp (ETApp (EVar (0,"demote")) (TVar (TVBound 1109 KNum))) (TCon (TF TCMax) [TCon (TF TCWidth) [TVar (TVBound 1108 KNum)],TCon (TF TCWidth) [TVar (TVBound 1109 KNum)]]))) (EApp (ETApp (ETApp (ETApp (EVar (61,"take")) (TVar (TVBound 1109 KNum))) (TVar (TVBound 1110 KNum))) (TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TVar (TVBound 1110 KNum))) (TVar (TVBound 1109 KNum))) (TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []])) (EApp (ETApp (ETApp (ETApp (EVar (37,"split")) (TVar (TVBound 1110 KNum))) (TCon (TC (TCNum 8)) [])) (TCon (TC TCBit) [])) (EApp (EVar (360,"hash")) (EVar (361,"key"))))) (ETApp (EVar (29,"zero")) (TCon (TC TCSeq) [TVar (TVBound 1109 KNum),TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []]])))) (EApp (ETApp (ETApp (ETApp (EVar (61,"take")) (TVar (TVBound 1109 KNum))) (TVar (TVBound 1108 KNum))) (TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []])) (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TVar (TVBound 1108 KNum))) (TVar (TVBound 1109 KNum))) (TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []])) (EVar (361,"key"))) (ETApp (EVar (29,"zero")) (TCon (TC TCSeq) [TVar (TVBound 1109 KNum),TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []]]))))))))))))),(NonRecursive (Decl (354,"hmac") (DExpr (ETAbs (362,"msgBytes") (ETAbs (363,"pwBytes") (ETAbs (364,"digest") (ETAbs (365,"blockLength") (EAbs (366,"hash") (EAbs (367,"hash2") (EAbs (368,"hash3") (EAbs (369,"key") (EAbs (370,"message") (EWhere (EApp (EVar (367,"hash2")) (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TVar (TVBound 1144 KNum))) (TVar (TVBound 1143 KNum))) (TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []])) (EVar (372,"okey"))) (EVar (374,"internal")))) [(NonRecursive (Decl (371,"ks") (DExpr (EApp (EApp (ETApp (ETApp (ETApp (EVar (353,"kinit")) (TVar (TVBound 1142 KNum))) (TVar (TVBound 1144 KNum))) (TVar (TVBound 1143 KNum))) (EVar (368,"hash3"))) (EVar (369,"key")))))),(NonRecursive (Decl (372,"okey") (DExpr (EComp (EApp (EApp (ETApp (EVar (28,"^")) (TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []])) (EVar (375,"k"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 92)) [])) (TCon (TC (TCNum 8)) []))) [[(From (375,"k") (EVar (371,"ks")))]])))),(NonRecursive (Decl (373,"ikey") (DExpr (EComp (EApp (EApp (ETApp (EVar (28,"^")) (TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []])) (EVar (376,"k"))) (ETApp (ETApp (EVar (0,"demote")) (TCon (TC (TCNum 54)) [])) (TCon (TC (TCNum 8)) []))) [[(From (376,"k") (EVar (371,"ks")))]])))),(NonRecursive (Decl (374,"internal") (DExpr (EApp (ETApp (ETApp (ETApp (EVar (37,"split")) (TVar (TVBound 1143 KNum))) (TCon (TC (TCNum 8)) [])) (TCon (TC TCBit) [])) (EApp (EVar (366,"hash")) (EApp (EApp (ETApp (ETApp (ETApp (EVar (34,"#")) (TVar (TVBound 1144 KNum))) (TVar (TVBound 1141 KNum))) (TCon (TC TCSeq) [TCon (TC (TCNum 8)) [],TCon (TC TCBit) []])) (EVar (373,"ikey"))) (EVar (370,"message"))))))))]))))))))))))),(NonRecursive (Decl (352,"hmacSHA256") (DExpr (ETAbs (355,"pwBytes") (ETAbs (356,"msgBytes") (EApp (EApp (EApp (ETApp (ETApp (ETApp (ETApp (EVar (354,"hmac")) (TVar (TVBound 1189 KNum))) (TVar (TVBound 1188 KNum))) (TCon (TC (TCNum 32)) [])) (TCon (TC (TCNum 64)) [])) (ETApp (EVar (255,"SHA256")) (TCon (TF TCAdd) [TCon (TC (TCNum 64)) [],TVar (TVBound 1189 KNum)]))) (ETApp (EVar (255,"SHA256")) (TCon (TC (TCNum 96)) []))) (ETApp (EVar (255,"SHA256")) (TVar (TVBound 1188 KNum)))))))))].

Definition ge := bind_decl_groups whole_prog gempty.

Definition hmacSHA256 : ident := (352,"hmacSHA256").
Definition hmac : ident := (354,"hmac").


(****************************************************************************)
(*                                                                          *)
(*                                                                          *)
(*              Solange Coupet-Grimal & Catherine Nouvet                    *)
(*                                                                          *)
(*                                                                          *)
(*       Laboratoire d'Informatique Fondamentale de Marseille               *)
(*               CMI-Technopole de Chateau-Gombert                          *)
(*                   39, Rue F. Joliot Curie                                *)
(*                   13453 MARSEILLE Cedex 13                               *)
(*           Contact :Solange.Coupet@cmi.univ-mrs.fr                        *)
(*                                                                          *)
(*                                                                          *)
(*                                Coq V7.0                                  *)
(*                             Septembre 2002                               *)
(*                                                                          *)
(****************************************************************************)
(*                               lemma_add.v                                *)
(****************************************************************************)

Section lemma_add.

Require Export gc.
Require Export reachable.

Notation Reachable := (reachable node) (only parsing).

Lemma add_notacc_white :
 forall (s t : state) (n : node),
 mk s n = white ->
 ~ accessible node (hp s) rt n -> add_edge s t -> mk t n = white.

intros s t n mksn notacc_n_s addedge; elim addedge; clear addedge.
intros n1 n2 acc_n1_s acc_n2_s ctls ctlt add H; elim H; clear H.
intro H; elim H; clear H.
intros mksn1 mark; rewrite mark; assumption.
intro H; elim H; clear H.
intro H; elim H; clear H.
intros mksn1 H; elim H; clear H.
intros mksn2 mark; rewrite mark; assumption.
intro H; elim H; clear H.
intros mksn1 H; elim H; clear H.
intros mksn2 H; elim H; clear H.
intros mark mktn2; elim (eq_dec_node n n2).
intro neqn2; rewrite neqn2 in notacc_n_s;
 absurd (accessible node (hp s) rt n2); assumption.
intro ndifn2; rewrite <- (mark n ndifn2); assumption.
Qed.

Lemma add_nogrey :
 forall s t : state,
 nogrey_accn_imp_blackn s ->
 (forall n : node, mk s n <> grey) ->
 add_edge s t -> forall n : node, mk t n <> grey.

unfold nogrey_accn_imp_blackn in |- *; intros s t H_inv H_col addedge n;
 elim addedge; clear addedge.
intros n1 n2 acces_n1_s acces_n2_s ctls ctlt add mark; elim mark; clear mark.
intro H; elim H; clear H.
intros mksn1 mark; rewrite mark; auto.
intro H; elim H; clear H.
intro H; elim H; clear H.
intros mksn1 H; elim H; clear H.
intros mksn2 mark; rewrite mark; auto.
intro H; elim H; clear H.
intros mksn1 H; elim H; clear H.
intros mksn2 upd_col; elim upd_col; clear upd_col.
intros mark mktn2; elim (eq_dec_node n n2).
intro neqn2; absurd (mk s n2 = white); auto.
rewrite H_inv; [ discriminate | auto | auto ].
intro ndifn2; rewrite <- (mark n ndifn2); auto.
Qed.

Lemma add_nowhite :
 forall s t : state,
 (forall n : node, mk s n <> white) ->
 add_edge s t -> forall n : node, mk t n <> white.

unfold nogrey_accn_imp_blackn in |- *; intros s t H_white addedge n;
 elim addedge; clear addedge.
intros n1 n2 acc_n1_s acc_n2_s ctls ctlt add H; elim H; clear H.
intro H; elim H; clear H.
intros mksn1 mark; rewrite mark; auto.
intro H; elim H; clear H.
intro H; elim H; clear H.
intros mksn1 H; elim H; clear H.
intros mksn2 mark; rewrite mark; auto.
intro H; elim H; clear H.
intros mksn1 H; elim H; clear H.
intros mksn2 H; absurd (mk s n2 = white); auto.
Qed.

Lemma add_accest_access :
 forall s t : state,
 add_edge s t ->
 forall n : node, accessible node (hp t) rt n -> accessible node (hp s) rt n.

unfold accessible in |- *; intros s t addedge n acces_t_n; elim addedge;
 clear addedge; unfold add in |- *.
unfold accessible in |- *;
 intros n0 m0 acces_s_n0 acces_s_m0 ctls ctlt add mark;
 elim add; clear add.
intros H_heap1 H_heap2; elim H_heap2; clear H_heap2.
intros H_heap2 htn0m0; elim acces_t_n.
constructor.
intros n1 m acces_t_n1 acces_s_n1 htn1m; elim (eq_dec_node n1 m0).
intro n1eqm0; rewrite n1eqm0; assumption.
intro n1difm0; apply reachable_edge with (m := m); auto.
elim (eq_dec_node m n0).
intro meqn0; rewrite meqn0; rewrite (H_heap2 n1 n1difm0); rewrite <- meqn0;
 assumption.
intro mdifn0; rewrite (H_heap1 m n1 mdifn0); assumption.
Qed.

Lemma add_notaccess_notaccest :
 forall (s t : state) (n : node),
 ~ accessible node (hp s) rt n ->
 add_edge s t -> ~ accessible node (hp t) rt n.

unfold accessible in |- *; intros s t n not_acces_n_s addedge; elim addedge;
 clear addedge.
unfold accessible in |- *;
 intros n1 n2 acces_n1_s acces_n2_s ctls ctlt add mark;
 elim add; clear add.
intros H_heap1 H_heap2; elim H_heap2; clear H_heap2.
intros H_heap2 htn1n2; intro acces_n_t; inversion acces_n_t.
rewrite <- H in not_acces_n_s; absurd (accessible node (hp s) rt rt); auto.
constructor.
elim (eq_dec_node m n1).
intro meqn1; elim (eq_dec_node n n2).
intro neqn2; rewrite neqn2 in not_acces_n_s;
 absurd (accessible node (hp s) rt n2); auto.
intro ndifn2; absurd (accessible node (hp s) rt n); auto.
unfold accessible in |- *; rewrite meqn1 in H0;
 apply reachable_edge with (m := n1); auto.
rewrite (H_heap2 n ndifn2); assumption.
intro mdifn1; absurd (accessible node (hp s) rt n); auto.
unfold accessible in |- *; apply reachable_edge with (m := m).
replace (reachable node (hp s) rt m) with (accessible node (hp s) rt m); auto.
apply (add_accest_access s t); auto.
apply (add_to_node s t n1 n2); auto.
unfold add in |- *; auto.
rewrite (H_heap1 m n mdifn1); assumption.
Qed.

Lemma add_ancestor :
 forall (s t : state) (n : node),
 ~ accessible node (hp s) rt n ->
 add_edge s t ->
 forall m : node, reachable node (hp t) m n -> reachable node (hp s) m n.

intros s t n notacc_n_s addedge m H_reach; elim addedge; clear addedge.
intros n1 n2 acc_n1_s acc_n2_s ctls ctlt add mark; elim add; clear add.
intros heap1 H; elim H; clear H.
intros heap2 htn1n2; generalize notacc_n_s.
elim H_reach; try constructor.
clear H_reach notacc_n_s n; intros n' m' H_reach H_ind htm'n' H_acc;
 elim (eq_dec_node m' n1).
intro m'eqn1; elim (eq_dec_node n' n2).
intro n'eqn2; absurd (accessible node (hp s) rt n2); auto.
rewrite n'eqn2 in H_acc; assumption.
intro n'difn2; apply reachable_edge with (m := m').
apply H_ind; intro H_acc'; apply H_acc.
unfold accessible in |- *; apply reachable_edge with (m := m'); auto.
rewrite m'eqn1 in htm'n'; rewrite m'eqn1; rewrite (heap2 n' n'difn2);
 assumption.
rewrite m'eqn1 in htm'n'; rewrite m'eqn1; rewrite (heap2 n' n'difn2);
 assumption.
intro m'difn1; apply reachable_edge with (m := m').
apply H_ind; intro H_acc'; apply H_acc.
unfold accessible in |- *; apply reachable_edge with (m := m'); auto.
rewrite (heap1 m' n' m'difn1); assumption.
rewrite (heap1 m' n' m'difn1); assumption.
Qed.

Lemma add_ancestor_col :
 forall (s t : state) (n : node),
 ~ accessible node (hp s) rt n ->
 (forall m : node,
  reachable node (hp s) m n -> mk s m = white \/ mk s m = free) ->
 add_edge s t ->
 forall m : node,
 reachable node (hp t) m n -> mk t m = white \/ mk t m = free.

intros s t n notacc_n_s H_anc addedge; elim addedge; clear addedge.
intros n1 n2 acc_n1_s acc_n2_s ctls ctlt add H; elim H; clear H.
intro H; elim H; clear H.
intros mksn1 mark m H_anc_m_t; rewrite mark; apply H_anc.
apply add_ancestor with (t := t); try assumption.
apply add_to_node with (n := n1) (n' := n2); try assumption.
constructor; auto.
intros H; elim H; clear H.
intro H; elim H; clear H.
intros mksn1 H; elim H; clear H.
intros mksn2 mark m H_anc_m_t; rewrite mark; apply H_anc.
apply add_ancestor with (t := t); try assumption.
apply add_to_node with (n := n1) (n' := n2); try assumption.
unfold marking_add in |- *; right; left; split; auto.
intro H; elim H; clear H.
intros mksn1 H; elim H; clear H.
intros mksn2 H m H_anc_m_t; elim H; clear H.
intros mark mktn2; elim (eq_dec_node m n2).
intro meqn2; absurd (accessible node (hp s) rt n2); auto.
rewrite <- meqn2; apply reach_notacc with (n := n); try assumption.
apply add_ancestor with (t := t); auto.
apply add_to_node with (n := n1) (n' := n2); try assumption.
unfold marking_add in |- *; right; right; split; auto.
split; auto.
unfold update_color in |- *; split; auto.
intro mdifn2; rewrite <- (mark m mdifn2); apply H_anc;
 apply add_ancestor with (t := t); auto.
apply add_to_node with (n := n1) (n' := n2); try assumption.
unfold marking_add in |- *; right; right; split; auto.
split; auto.
unfold update_color in |- *; split; auto.
Qed.

Lemma add_notgreyt_notgreys :
 forall s t : state,
 add_edge s t -> forall n : node, mk t n <> grey -> mk s n <> grey.

intros s t addedge n mktn; elim addedge; clear addedge;
 unfold marking_add in |- *.
intros n0 m acces_s_n0 acces_s_m ctls ctlt add mark; elim mark; clear mark.
intro case1; elim case1; clear case1.
intros mksn0 mark; rewrite <- mark; assumption.
intro case; elim case; clear case.
intro case2; elim case2; clear case2.
intros mksn0 mark; elim mark; clear mark.
intros mksm mark; rewrite <- mark; assumption.
intro case3; elim case3; clear case3.
intros mksn0 mark; elim mark; clear mark.
intros mksm mark; elim mark; clear mark.
intros mark mktm; rewrite (mark n); auto.
intro neqm; apply mktn; rewrite neqm; assumption.
Qed.

Lemma add_blacks_blackt :
 forall s t : state,
 add_edge s t -> forall n : node, mk s n = black -> mk t n = black.

intros s t addedge n mksn; elim addedge; clear addedge;
 unfold marking_add in |- *.
intros n0 m acces_s_n0 acces_s_m ctls ctlt add mark; elim mark; clear mark.
intro case1; elim case1; clear case1.
intros mksn0 mark; rewrite mark; assumption.
intro case; elim case; clear case.
intro case2; elim case2; clear case2.
intros mksn0 mark; elim mark; clear mark.
intros mksm mark; rewrite mark; assumption.
intro case3; elim case3; clear case3.
intros mksn0 mark; elim mark; clear mark.
intros mksm mark; elim mark; clear mark.
intros mark mktm; rewrite <- (mark n); auto.
apply (noteqmar_noteqnod (mk s) n m); rewrite mksn; rewrite mksm;
 discriminate.
Qed.

Lemma add_notfrees_notfreet :
 forall s t : state,
 add_edge s t -> forall n : node, mk s n <> free -> mk t n <> free.

intros s t addedge n mksn; elim addedge; clear addedge;
 unfold marking_add in |- *.
intros n0 m acces_s_n0 acces_s_m ctls ctlt add mark; elim mark; clear mark.
intro case1; elim case1; clear case1.
intros mksn0 mark; rewrite mark; assumption.
intro case; elim case; clear case.
intro case2; elim case2; clear case2.
intros mksn0 mark; elim mark; clear mark.
intros mksm mark; rewrite mark; assumption.
intro case3; elim case3; clear case3.
intros mksn0 mark; elim mark; clear mark.
intros mksm mark; elim mark; clear mark.
intros mark mktm; elim (eq_dec_node n m).
intro neqm; rewrite neqm; rewrite mktm; discriminate.
intro ndifm; rewrite <- (mark n); auto.
Qed.

Lemma add_white_nogrey :
 forall (s t : state) (n : node),
 mk s n = white ->
 ~ accessible node (hp s) rt n -> add_edge s t -> mk t n = white.

intros s t n mksn not_acces_n addedge; elim addedge; clear addedge.
intros n1 n2 acces_n1_s acces_n2_s ctls ctlt add mark; elim mark; clear mark.
intro H; elim H; clear H.
intros mksn1 mark; rewrite mark; assumption.
intro H; elim H; clear H.
intro H; elim H; clear H.
intros mksn1 H; elim H; clear H.
intros mksn2 mark; rewrite mark; assumption.
intro H; elim H; clear H.
intros mksn1 H; elim H; clear H.
intros mksn2 upd_col; elim upd_col; clear upd_col.
intros mark mktn2; elim (eq_dec_node n n2).
intro neqn2; rewrite neqn2 in not_acces_n;
 absurd (accessible node (hp s) rt n2); auto.
intro ndifn2; rewrite <- (mark n ndifn2); assumption.
Qed.

End lemma_add.

Hint Resolve add_notaccess_notaccest.
Hint Resolve add_nogrey.
Hint Resolve add_white_nogrey.
Hint Resolve add_blacks_blackt.
Hint Resolve add_nowhite.
Hint Resolve add_notacc_white.
Hint Resolve add_ancestor_col.