proofs/math/typed/f64adds.bend
bend-collections-laws-math@1.0.0.0 · 113 lines · 9 definitions
1import Base
2import bend-collections-laws-math@1.0.0.0/spec/lib/common.bend as C
3import bend-collections-laws-math@1.0.0.0/spec/math/f64.bend as SF
4import bend-collections-laws-math@1.0.0.0/spec/math/w64.bend as SW
5import bend-collections-laws-math@1.0.0.0/src/math/f64.bend as F
6import bend-collections-laws-math@1.0.0.0/src/math/u64.bend as WU
7import bend-collections-laws-math@1.0.0.0/src/math/natural.bend as M
8import bend-collections-laws-math@1.0.0.0/proofs/lib/nat.bend as N
9import bend-collections-laws-math@1.0.0.0/proofs/lib/logic.bend as L
10import bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/proofs/nat_algebra.bend as NA
11import bend-collections-laws-math@1.0.0.0/proofs/lib/u32half.bend as UH
12import bend-collections-laws-math@1.0.0.0/proofs/math/typed/width.bend as WW
13import bend-collections-laws-math@1.0.0.0/proofs/math/typed/u32laws.bend as LW
14import bend-collections-laws-math@1.0.0.0/proofs/math/typed/w64sh.bend as SH
15import bend-collections-laws-math@1.0.0.0/proofs/math/typed/natcmp.bend as NC
16import bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64round.bend as FR
17import bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64rtools.bend as RT
18import bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64addp.bend as AP
19import bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64adda.bend as AA
20import bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64nrp.bend as NP
21
22
23
24
25
26def jam_le(+hh: Nat, +ll: Nat) -> {Nat.is_le(SW.jam(hh, ll), 1n+hh) == True{} : Bool}:
27 +tt = Nat.max(C.bit(hh), Nat.min(ll, 1n))
28 +h1 = WW.le_add_r(tt, 1n, Nat.double(C.half(hh)), FR.max_le1(C.bit(hh), ll, WW.bit_le1(hh)))
29 +h2 = N.le_add_left(Nat.double(C.half(hh)), hh, 1n, L.subst(Nat, z => {Nat.is_le(Nat.double(C.half(hh)), z) == True{} : Bool}, Nat.add(Nat.double(C.half(hh)), C.bit(hh)), hh, Equal.trans(Nat, Nat.add(Nat.double(C.half(hh)), C.bit(hh)), Nat.add(C.bit(hh), Nat.double(C.half(hh))), hh, NA.add_comm(Nat.double(C.half(hh)), C.bit(hh)), Equal.sym(Nat, hh, Nat.add(C.bit(hh), Nat.double(C.half(hh))), WW.hb(hh))), N.le_add_right(Nat.double(C.half(hh)), C.bit(hh))))
30 L.subst(Nat, z => {Nat.is_le(z, 1n+hh) == True{} : Bool}, Nat.add(tt, Nat.double(C.half(hh))), SW.jam(hh, ll), Equal.sym(Nat, SW.jam(hh, ll), Nat.add(tt, Nat.double(C.half(hh))), FR.jam_form(hh, ll)), N.le_trans(Nat.add(tt, Nat.double(C.half(hh))), Nat.add(1n, Nat.double(C.half(hh))), 1n+hh, h1, h2))
31
32def low_sh(+d: Nat, +k: Nat, +m: Nat, +hd: {Nat.is_le(d, k) == True{} : Bool}) -> {C.low(d, C.shift(k, m)) == 0n : Nat}:
33 +es = NC.sh_split(k, d, m, hd)
34 Equal.trans(Nat, C.low(d, C.shift(k, m)), C.low(d, Nat.add(0n, C.shift(d, C.shift(Nat.sub(k, d), m)))), 0n, Equal.cong(Nat, Nat, z => C.low(d, z), C.shift(k, m), C.shift(d, C.shift(Nat.sub(k, d), m)), es), WW.low_u(d, 0n, C.shift(Nat.sub(k, d), m), FR.fz(d)))
35
36def d11_c(+d: Nat, +S1: Nat, +c: Bool, +hc: {Nat.is_le(d, 10n) == c : Bool}, +hl: {Nat.is_eq(C.low(d, C.shift(10n, S1)), 0n) == False{} : Bool}) -> {Nat.is_le(11n, d) == True{} : Bool}:
37 match c:
38 case True{}:
39 Empty.absurd({Nat.is_le(11n, d) == True{} : Bool}, LW.true_ne_false(Equal.trans(Bool, True{}, Nat.is_eq(C.low(d, C.shift(10n, S1)), 0n), False{}, Equal.sym(Bool, Nat.is_eq(C.low(d, C.shift(10n, S1)), 0n), True{}, Equal.cong(Nat, Bool, z => Nat.is_eq(z, 0n), C.low(d, C.shift(10n, S1)), 0n, low_sh(d, 10n, S1, hc))), hl)))
40 case False{}:
41 Equal.trans(Bool, Nat.is_le(11n, d), Nat.is_lt(10n, d), True{}, FR.le_succ_lt(10n, d), N.not_le_lt(d, 10n, hc))
42
43def shmk(+a: Nat, +b: Nat, +x: Nat, +h: {Nat.is_le(a, b) == True{} : Bool}) -> {Nat.is_le(C.shift(a, x), C.shift(b, x)) == True{} : Bool}:
44 +h0 = WW.shift_mono(a, x, C.shift(Nat.sub(b, a), x), WW.shift_ge(Nat.sub(b, a), x))
45 L.subst(Nat, z => {Nat.is_le(C.shift(a, x), z) == True{} : Bool}, C.shift(a, C.shift(Nat.sub(b, a), x)), C.shift(b, x), Equal.sym(Nat, C.shift(b, x), C.shift(a, C.shift(Nat.sub(b, a), x)), NC.sh_split(b, a, x, h)), h0)
46
47
48def wbig(+one: Nat, +h1: {one == 1n : Nat}, +t: Nat, +S: Nat, +d: Nat, +hd: {Nat.is_le(2n, d) == True{} : Bool}, +hT: {C.fits(62n, Nat.double(t)) == False{} : Bool}, +hS: {C.fits(63n, S) == True{} : Bool}) -> {C.fits(Nat.add(d, 61n), Nat.sub(C.shift(d, Nat.double(t)), S)) == False{} : Bool}:
49 +A = C.shift(d, C.shift(61n, one))
50 +hTge = N.not_lt_le(Nat.double(t), C.shift(62n, one), Equal.trans(Bool, Nat.is_lt(Nat.double(t), C.shift(62n, one)), C.fits(62n, Nat.double(t)), False{}, FR.lt_fit(62n, one, h1, Nat.double(t)), hT))
51 +h2A = L.subst(Nat, z => {Nat.is_le(z, C.shift(d, Nat.double(t))) == True{} : Bool}, C.shift(d, Nat.double(C.shift(61n, one))), Nat.add(A, A), Equal.trans(Nat, C.shift(d, Nat.double(C.shift(61n, one))), Nat.double(A), Nat.add(A, A), WW.shift_dbl(d, C.shift(61n, one)), NA.double_self(A)), WW.shift_mono(d, Nat.double(C.shift(61n, one)), Nat.double(t), hTge))
52 +ed = N.sub_add(d, 2n, hd)
53 +hSA0 = N.lt_le_trans(S, C.shift(63n, one), C.shift(2n, C.shift(61n, one)), Equal.trans(Bool, Nat.is_lt(S, C.shift(63n, one)), C.fits(63n, S), True{}, FR.lt_fit(63n, one, h1, S), hS), L.subst(Nat, z => {Nat.is_le(C.shift(63n, one), z) == True{} : Bool}, C.shift(Nat.add(2n, 61n), one), C.shift(2n, C.shift(61n, one)), WW.shift_comp(2n, 61n, one), N.le_refl(C.shift(63n, one))))
54 +hSA = N.lt_le(S, A, N.lt_le_trans(S, C.shift(2n, C.shift(61n, one)), A, hSA0, shmk(2n, d, C.shift(61n, one), hd)))
55 +hWA = RT.le_sub(A, S, C.shift(d, Nat.double(t)), N.le_trans(Nat.add(A, S), Nat.add(A, A), C.shift(d, Nat.double(t)), N.le_add_left(S, A, A, hSA), h2A))
56 +nfA = Equal.trans(Bool, C.fits(Nat.add(d, 61n), A), C.fits(61n, C.shift(61n, one)), False{}, RT.fits_sh(d, 61n, C.shift(61n, one)), Equal.trans(Bool, C.fits(61n, C.shift(61n, one)), Nat.is_lt(C.shift(61n, one), C.shift(61n, one)), False{}, Equal.sym(Bool, Nat.is_lt(C.shift(61n, one), C.shift(61n, one)), C.fits(61n, C.shift(61n, one)), FR.lt_fit(61n, one, h1, C.shift(61n, one))), N.lt_irrefl(C.shift(61n, one))))
57 FR.nfit(Nat.add(d, 61n), A, Nat.sub(C.shift(d, Nat.double(t)), S), hWA, nfA)
58
59def posz(+n: Nat, +h: {Nat.is_le(1n, n) == True{} : Bool}) -> {Nat.is_eq(n, 0n) == False{} : Bool}:
60 match n:
61 case 0n:
62 NC.absurd_tf({Nat.is_eq(0n, 0n) == False{} : Bool}, h)
63 case 1n+ +np:
64 {==}
65
66def sub_odd(+t: Nat, +k: Nat, +hk: {Nat.is_lt(k, t) == True{} : Bool}) -> {Nat.is_eq(Nat.sub(Nat.double(t), 1n+Nat.double(k)), 0n) == False{} : Bool}:
67 match t k:
68 case 0n _:
69 Empty.absurd({Nat.is_eq(Nat.sub(0n, 1n+Nat.double(k)), 0n) == False{} : Bool}, N.lt_zero_absurd(k, hk))
70 case 1n+ +tp 0n:
71 {==}
72 case 1n+ +tp 1n+ +kp:
73 sub_odd(tp, kp, hk)
74
75def hlt(+one: Nat, +h1: {one == 1n : Nat}, +s: Bool, +e: Nat, +sig: WU.U64, +t: Nat, +S1: Nat, +d: Nat, +x0: Nat, +hsig: {SW.value(sig) == Nat.sub(Nat.double(t), SW.jam(C.high(d, C.shift(10n, S1)), C.low(d, C.shift(10n, S1)))) : Nat}, +he: {Nat.add(Nat.add(x0, d), 2180n) == e : Nat}, +hx63: {Nat.is_le(63n, Nat.add(x0, d)) == True{} : Bool}, +hd1: {Nat.is_le(1n, d) == True{} : Bool}, +hS: {C.fits(63n, C.shift(10n, S1)) == True{} : Bool}, +hT62: {C.fits(62n, Nat.double(t)) == False{} : Bool}, +hT63: {C.fits(63n, Nat.double(t)) == True{} : Bool}) -> {Nat.is_lt(C.high(d, C.shift(10n, S1)), Nat.double(t)) == True{} : Bool}:
76 +f62 = Equal.trans(Bool, C.fits(62n, C.high(d, C.shift(10n, S1))), C.fits(Nat.add(d, 62n), C.shift(10n, S1)), True{}, Equal.sym(Bool, C.fits(Nat.add(d, 62n), C.shift(10n, S1)), C.fits(62n, C.high(d, C.shift(10n, S1))), FR.fits_hc(d, 62n, C.shift(10n, S1))), SH.fits_mono(63n, Nat.add(d, 62n), C.shift(10n, S1), L.subst(Nat, z => {Nat.is_le(63n, z) == True{} : Bool}, Nat.add(62n, d), Nat.add(d, 62n), NA.add_comm(62n, d), N.le_add_left(1n, d, 62n, hd1)), hS))
77 +P62 = C.shift(62n, one)
78 N.lt_le_trans(C.high(d, C.shift(10n, S1)), P62, Nat.double(t), Equal.trans(Bool, Nat.is_lt(C.high(d, C.shift(10n, S1)), P62), C.fits(62n, C.high(d, C.shift(10n, S1))), True{}, FR.lt_fit(62n, one, h1, C.high(d, C.shift(10n, S1))), f62), N.not_lt_le(Nat.double(t), P62, Equal.trans(Bool, Nat.is_lt(Nat.double(t), P62), C.fits(62n, Nat.double(t)), False{}, FR.lt_fit(62n, one, h1, Nat.double(t)), hT62)))
79
80def smb_c(+one: Nat, +h1: {one == 1n : Nat}, +s: Bool, +e: Nat, +sig: WU.U64, +t: Nat, +S1: Nat, +d: Nat, +x0: Nat, +hsig: {SW.value(sig) == Nat.sub(Nat.double(t), SW.jam(C.high(d, C.shift(10n, S1)), C.low(d, C.shift(10n, S1)))) : Nat}, +he: {Nat.add(Nat.add(x0, d), 2180n) == e : Nat}, +hx63: {Nat.is_le(63n, Nat.add(x0, d)) == True{} : Bool}, +hd1: {Nat.is_le(1n, d) == True{} : Bool}, +hS: {C.fits(63n, C.shift(10n, S1)) == True{} : Bool}, +hT62: {C.fits(62n, Nat.double(t)) == False{} : Bool}, +hT63: {C.fits(63n, Nat.double(t)) == True{} : Bool}, +c: Bool, +hc: {Nat.is_eq(C.low(d, C.shift(10n, S1)), 0n) == c : Bool}) -> {F.norm_round_pack(s, e, sig) == SF.round(s, Nat.sub(C.shift(d, Nat.double(t)), C.shift(10n, S1)), x0) : F.F64}:
81 match c:
82 case True{}:
83 +el0 = N.eq_from_is_eq(C.low(d, C.shift(10n, S1)), 0n, hc)
84 +hh = hlt(one, h1, s, e, sig, t, S1, d, x0, hsig, he, hx63, hd1, hS, hT62, hT63)
85 +eS = Equal.trans(Nat, C.shift(10n, S1), Nat.add(C.low(d, C.shift(10n, S1)), C.shift(d, C.high(d, C.shift(10n, S1)))), C.shift(d, C.high(d, C.shift(10n, S1))), WW.low_high(d, C.shift(10n, S1)), Equal.cong(Nat, Nat, z => Nat.add(z, C.shift(d, C.high(d, C.shift(10n, S1)))), C.low(d, C.shift(10n, S1)), 0n, el0))
86 +ev = Equal.trans(Nat, SW.value(sig), Nat.sub(Nat.double(t), SW.jam(C.high(d, C.shift(10n, S1)), C.low(d, C.shift(10n, S1)))), Nat.sub(Nat.double(t), C.high(d, C.shift(10n, S1))), hsig, Equal.cong(Nat, Nat, z => Nat.sub(Nat.double(t), z), SW.jam(C.high(d, C.shift(10n, S1)), C.low(d, C.shift(10n, S1))), C.high(d, C.shift(10n, S1)), Equal.trans(Nat, SW.jam(C.high(d, C.shift(10n, S1)), C.low(d, C.shift(10n, S1))), SW.jam(C.high(d, C.shift(10n, S1)), 0n), C.high(d, C.shift(10n, S1)), Equal.cong(Nat, Nat, z => SW.jam(C.high(d, C.shift(10n, S1)), z), C.low(d, C.shift(10n, S1)), 0n, el0), AP.jam_z(C.high(d, C.shift(10n, S1))))))
87 +pos = FR.lt_sub_pos(C.high(d, C.shift(10n, S1)), Nat.double(t), hh)
88 +hz = L.subst(Nat, z => {Nat.is_eq(z, 0n) == False{} : Bool}, Nat.sub(Nat.double(t), C.high(d, C.shift(10n, S1))), SW.value(sig), Equal.sym(Nat, SW.value(sig), Nat.sub(Nat.double(t), C.high(d, C.shift(10n, S1))), ev), posz(Nat.sub(Nat.double(t), C.high(d, C.shift(10n, S1))), pos))
89 +h63 = L.subst(Nat, z => {C.fits(63n, z) == True{} : Bool}, Nat.sub(Nat.double(t), C.high(d, C.shift(10n, S1))), SW.value(sig), Equal.sym(Nat, SW.value(sig), Nat.sub(Nat.double(t), C.high(d, C.shift(10n, S1))), ev), SH.fits_lek(63n, Nat.sub(Nat.double(t), C.high(d, C.shift(10n, S1))), Nat.double(t), UH.sub_le(Nat.double(t), C.high(d, C.shift(10n, S1))), hT63))
90 +r1 = NP.nrp(one, h1, s, e, sig, Nat.add(x0, d), he, hz, h63, hx63)
91 +r2 = Equal.cong(Nat, F.F64, z => SF.round(s, z, Nat.add(x0, d)), SW.value(sig), Nat.sub(Nat.double(t), C.high(d, C.shift(10n, S1))), ev)
92 +r3 = Equal.sym(F.F64, SF.round(s, C.shift(d, Nat.sub(Nat.double(t), C.high(d, C.shift(10n, S1)))), x0), SF.round(s, Nat.sub(Nat.double(t), C.high(d, C.shift(10n, S1))), Nat.add(x0, d)), RT.round_shift(s, d, Nat.sub(Nat.double(t), C.high(d, C.shift(10n, S1))), x0))
93 +r4 = Equal.cong(Nat, F.F64, z => SF.round(s, z, x0), C.shift(d, Nat.sub(Nat.double(t), C.high(d, C.shift(10n, S1)))), Nat.sub(C.shift(d, Nat.double(t)), C.shift(10n, S1)), Equal.trans(Nat, C.shift(d, Nat.sub(Nat.double(t), C.high(d, C.shift(10n, S1)))), Nat.sub(C.shift(d, Nat.double(t)), C.shift(d, C.high(d, C.shift(10n, S1)))), Nat.sub(C.shift(d, Nat.double(t)), C.shift(10n, S1)), Equal.sym(Nat, Nat.sub(C.shift(d, Nat.double(t)), C.shift(d, C.high(d, C.shift(10n, S1)))), C.shift(d, Nat.sub(Nat.double(t), C.high(d, C.shift(10n, S1)))), AP.sub_shift(d, Nat.double(t), C.high(d, C.shift(10n, S1)), N.lt_le(C.high(d, C.shift(10n, S1)), Nat.double(t), hh))), Equal.cong(Nat, Nat, z => Nat.sub(C.shift(d, Nat.double(t)), z), C.shift(d, C.high(d, C.shift(10n, S1))), C.shift(10n, S1), Equal.sym(Nat, C.shift(10n, S1), C.shift(d, C.high(d, C.shift(10n, S1))), eS))))
94 Equal.trans(F.F64, F.norm_round_pack(s, e, sig), SF.round(s, SW.value(sig), Nat.add(x0, d)), SF.round(s, Nat.sub(C.shift(d, Nat.double(t)), C.shift(10n, S1)), x0), r1, Equal.trans(F.F64, SF.round(s, SW.value(sig), Nat.add(x0, d)), SF.round(s, Nat.sub(Nat.double(t), C.high(d, C.shift(10n, S1))), Nat.add(x0, d)), SF.round(s, Nat.sub(C.shift(d, Nat.double(t)), C.shift(10n, S1)), x0), r2, Equal.trans(F.F64, SF.round(s, Nat.sub(Nat.double(t), C.high(d, C.shift(10n, S1))), Nat.add(x0, d)), SF.round(s, C.shift(d, Nat.sub(Nat.double(t), C.high(d, C.shift(10n, S1)))), x0), SF.round(s, Nat.sub(C.shift(d, Nat.double(t)), C.shift(10n, S1)), x0), r3, r4)))
95 case False{}:
96 +hh = hlt(one, h1, s, e, sig, t, S1, d, x0, hsig, he, hx63, hd1, hS, hT62, hT63)
97 +W2 = Nat.sub(C.shift(d, Nat.double(t)), Nat.add(C.low(d, C.shift(10n, S1)), C.shift(d, C.high(d, C.shift(10n, S1)))))
98 +eW = Equal.cong(Nat, Nat, z => Nat.sub(C.shift(d, Nat.double(t)), z), Nat.add(C.low(d, C.shift(10n, S1)), C.shift(d, C.high(d, C.shift(10n, S1)))), C.shift(10n, S1), Equal.sym(Nat, C.shift(10n, S1), Nat.add(C.low(d, C.shift(10n, S1)), C.shift(d, C.high(d, C.shift(10n, S1)))), WW.low_high(d, C.shift(10n, S1))))
99 +ej = AP.jsub(t, d, C.high(d, C.shift(10n, S1)), C.low(d, C.shift(10n, S1)), hc, WW.low_fits(d, C.shift(10n, S1)), hh)
100 +ev = Equal.trans(Nat, SW.value(sig), Nat.sub(Nat.double(t), SW.jam(C.high(d, C.shift(10n, S1)), C.low(d, C.shift(10n, S1)))), SW.jam(C.high(d, Nat.sub(C.shift(d, Nat.double(t)), C.shift(10n, S1))), C.low(d, Nat.sub(C.shift(d, Nat.double(t)), C.shift(10n, S1)))), hsig, Equal.trans(Nat, Nat.sub(Nat.double(t), SW.jam(C.high(d, C.shift(10n, S1)), C.low(d, C.shift(10n, S1)))), SW.jam(C.high(d, W2), C.low(d, W2)), SW.jam(C.high(d, Nat.sub(C.shift(d, Nat.double(t)), C.shift(10n, S1))), C.low(d, Nat.sub(C.shift(d, Nat.double(t)), C.shift(10n, S1)))), ej, Equal.cong(Nat, Nat, z => SW.jam(C.high(d, z), C.low(d, z)), W2, Nat.sub(C.shift(d, Nat.double(t)), C.shift(10n, S1)), eW)))
101 +hd11 = d11_c(d, S1, Nat.is_le(d, 10n), {==}, hc)
102 +nW = wbig(one, h1, t, C.shift(10n, S1), d, N.le_trans(2n, 11n, d, {==}, hd11), hT62, hS)
103 +hb = N.le_trans(Nat.add(d, 55n), 1n+Nat.add(d, 61n), M.bit_length(Nat.sub(C.shift(d, Nat.double(t)), C.shift(10n, S1))), L.subst(Nat, z => {Nat.is_le(Nat.add(d, 55n), z) == True{} : Bool}, Nat.add(d, 62n), 1n+Nat.add(d, 61n), N.add_succ(d, 61n), N.le_add_left(55n, 62n, d, {==})), AA.nfit_bl(Nat.add(d, 61n), Nat.sub(C.shift(d, Nat.double(t)), C.shift(10n, S1)), nW))
104 +JW = SW.jam(C.high(d, Nat.sub(C.shift(d, Nat.double(t)), C.shift(10n, S1))), C.low(d, Nat.sub(C.shift(d, Nat.double(t)), C.shift(10n, S1))))
105 +kh = C.half(C.high(d, C.shift(10n, S1)))
106 +hk = AP.half_lt(kh, t, N.le_lt_trans(Nat.double(kh), C.high(d, C.shift(10n, S1)), Nat.double(t), L.subst(Nat, z => {Nat.is_le(Nat.double(kh), z) == True{} : Bool}, Nat.add(Nat.double(kh), C.bit(C.high(d, C.shift(10n, S1)))), C.high(d, C.shift(10n, S1)), Equal.trans(Nat, Nat.add(Nat.double(kh), C.bit(C.high(d, C.shift(10n, S1)))), Nat.add(C.bit(C.high(d, C.shift(10n, S1))), Nat.double(kh)), C.high(d, C.shift(10n, S1)), NA.add_comm(Nat.double(kh), C.bit(C.high(d, C.shift(10n, S1)))), Equal.sym(Nat, C.high(d, C.shift(10n, S1)), Nat.add(C.bit(C.high(d, C.shift(10n, S1))), Nat.double(kh)), WW.hb(C.high(d, C.shift(10n, S1))))), N.le_add_right(Nat.double(kh), C.bit(C.high(d, C.shift(10n, S1))))), hh))
107 +ev2 = Equal.trans(Nat, SW.value(sig), Nat.sub(Nat.double(t), SW.jam(C.high(d, C.shift(10n, S1)), C.low(d, C.shift(10n, S1)))), Nat.sub(Nat.double(t), 1n+Nat.double(kh)), hsig, Equal.cong(Nat, Nat, z => Nat.sub(Nat.double(t), z), SW.jam(C.high(d, C.shift(10n, S1)), C.low(d, C.shift(10n, S1))), 1n+Nat.double(kh), AP.jam_nz(C.high(d, C.shift(10n, S1)), C.low(d, C.shift(10n, S1)), hc)))
108 +hz = L.subst(Nat, z => {Nat.is_eq(z, 0n) == False{} : Bool}, Nat.sub(Nat.double(t), 1n+Nat.double(kh)), SW.value(sig), Equal.sym(Nat, SW.value(sig), Nat.sub(Nat.double(t), 1n+Nat.double(kh)), ev2), sub_odd(t, kh, hk))
109 +h63 = L.subst(Nat, z => {C.fits(63n, z) == True{} : Bool}, Nat.sub(Nat.double(t), SW.jam(C.high(d, C.shift(10n, S1)), C.low(d, C.shift(10n, S1)))), SW.value(sig), Equal.sym(Nat, SW.value(sig), Nat.sub(Nat.double(t), SW.jam(C.high(d, C.shift(10n, S1)), C.low(d, C.shift(10n, S1)))), hsig), SH.fits_lek(63n, Nat.sub(Nat.double(t), SW.jam(C.high(d, C.shift(10n, S1)), C.low(d, C.shift(10n, S1)))), Nat.double(t), UH.sub_le(Nat.double(t), SW.jam(C.high(d, C.shift(10n, S1)), C.low(d, C.shift(10n, S1)))), hT63))
110 +r1 = NP.nrp(one, h1, s, e, sig, Nat.add(x0, d), he, hz, h63, hx63)
111 +r2 = Equal.cong(Nat, F.F64, z => SF.round(s, z, Nat.add(x0, d)), SW.value(sig), JW, ev)
112 +r3 = Equal.sym(F.F64, SF.round(s, Nat.sub(C.shift(d, Nat.double(t)), C.shift(10n, S1)), x0), SF.round(s, JW, Nat.add(x0, d)), RT.round_jam(s, d, Nat.sub(C.shift(d, Nat.double(t)), C.shift(10n, S1)), x0, hb))
113 Equal.trans(F.F64, F.norm_round_pack(s, e, sig), SF.round(s, SW.value(sig), Nat.add(x0, d)), SF.round(s, Nat.sub(C.shift(d, Nat.double(t)), C.shift(10n, S1)), x0), r1, Equal.trans(F.F64, SF.round(s, SW.value(sig), Nat.add(x0, d)), SF.round(s, JW, Nat.add(x0, d)), SF.round(s, Nat.sub(C.shift(d, Nat.double(t)), C.shift(10n, S1)), x0), r2, r3))