↑ Contents

Lean sources, part 34 of 50 (ym/G61Lv31.lean – ym/GenA3.lean)

ym/G61Lv31.lean

lean_all/ym/G61Lv31.lean

/-
  ym/G61Lv31 — T45, G61a at level n = 31 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv31

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a7) (p8 : O.le K.zero a8) (p9 : O.le K.zero a9) (p10 : O.le K  -- (+538 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+22514 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 35808256) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 31) a30)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 30) a29))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 29) a28)))  -- (+3388 chars; full line in the Zenodo source)
      (K.mul (cN K 35709520) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 32) a31)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 31) a30))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 30) a2  -- (+3391 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_29 := HeatV.sub_nn K O _ _ e0_29
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_29 := HeatV.sub_nn K O _ _ e1_29
  have d1_30 := HeatV.sub_nn K O _ _ e1_30
  have d1_31 := HeatV.sub_nn K O _ _ e1_31
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+85481 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 35808256) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 31) a30)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 30) a29))) (K.mul (K.mul (cN K 3) a2)   -- (+3416 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..32, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 32 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 35808256) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 31) (A 30))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 30) (A 29)))) (K.mul (K.mul (cN K 3) (A 2)) (K.mul (  -- (+3772 chars; full line in the Zenodo source)
      (K.mul (cN K 35709520) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 32) (A 31))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 31) (A 30)))) (K.mul (K.mul (cN K 3) (A 2)) (K.m  -- (+3772 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hnn 7) (hnn 8) (hnn 9) (hnn 10) (hnn 11) (hnn 12) (hnn 13) (hnn 14) (hnn 15) (hnn 16) (hnn 17) (hnn 18) (hn  -- (+122 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 32 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 32 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 32 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 32 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 32 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 32 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 32 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+26849 chars; full line in the Zenodo source)

end G61Lv31

#print axioms G61Lv31.add_nn
#print axioms G61Lv31.level
#print axioms G61Lv31.level_fun

ym/G61Lv32.lean

lean_all/ym/G61Lv32.lean

/-
  ym/G61Lv32 — T45, G61a at level n = 32 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv32

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a7) (p8 : O.le K.zero a8) (p9 : O.le K.zero a9) (p10 : O.  -- (+566 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+24021 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 42837025) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 32) a31)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 31) a30))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 30)  -- (+3508 chars; full line in the Zenodo source)
      (K.mul (cN K 42725760) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 33) a32)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 32) a31))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K  -- (+3511 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_32 := HeatV.sub_nn K O _ _ e0_32
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_31 := HeatV.sub_nn K O _ _ e1_31
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+89126 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 42837025) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 32) a31)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 31) a30))) (K.mul (K.mul (cN K   -- (+3536 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..33, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 33 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 42837025) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 32) (A 31))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 31) (A 30)))) (K.mul (K.mul (cN K 3) (A 2)) (  -- (+3904 chars; full line in the Zenodo source)
      (K.mul (cN K 42725760) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 33) (A 32))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 32) (A 31)))) (K.mul (K.mul (cN K 3) (A 2  -- (+3904 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hnn 7) (hnn 8) (hnn 9) (hnn 10) (hnn 11) (hnn 12) (hnn 13) (hnn 14) (hnn 15) (hnn 16) (hnn 17) (hnn   -- (+138 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 33 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 33 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 33 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 33 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 33 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 33 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 33 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+28621 chars; full line in the Zenodo source)

end G61Lv32

#print axioms G61Lv32.add_nn
#print axioms G61Lv32.level
#print axioms G61Lv32.level_fun

ym/G61Lv33.lean

lean_all/ym/G61Lv33.lean

/-
  ym/G61Lv33 — T45, G61a at level n = 33 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv33

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a7) (p8 : O.le K.zero a8) (p9 : O.le K.zero a9) (p10   -- (+594 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+25576 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 50979600) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 33) a32)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 32) a31))) (K.mul (K.mul (cN K 3) a2) (K.mul (c  -- (+3628 chars; full line in the Zenodo source)
      (K.mul (cN K 50854650) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 34) a33)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 33) a32))) (K.mul (K.mul (cN K 3) a2) (K.mu  -- (+3631 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_33 := HeatV.sub_nn K O _ _ e0_33
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_32 := HeatV.sub_nn K O _ _ e1_32
  have d1_33 := HeatV.sub_nn K O _ _ e1_33
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_33 := HeatV.sub_nn K O _ _ e2_33
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d5_33 := HeatV.sub_nn K O _ _ e5_33
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d6_33 := HeatV.sub_nn K O _ _ e6_33
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_32 := HeatV.sub_nn K O _ _ e8_32
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d14_32 := HeatV.sub_nn K O _ _ e14_32
  have d14_33 := HeatV.sub_nn K O _ _ e14_33
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+96274 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 50979600) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 33) a32)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 32) a31))) (K.mul (K.mul  -- (+3656 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..34, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 34 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 50979600) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 33) (A 32))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 32) (A 31)))) (K.mul (K.mul (cN K 3) (  -- (+4036 chars; full line in the Zenodo source)
      (K.mul (cN K 50854650) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 34) (A 33))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 33) (A 32)))) (K.mul (K.mul (cN K   -- (+4036 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hnn 7) (hnn 8) (hnn 9) (hnn 10) (hnn 11) (hnn 12) (hnn 13) (hnn 14) (hnn 15) (hnn 16) (hnn 17  -- (+154 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 34 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 34 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 34 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 34 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 34 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 34 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 34 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+30449 chars; full line in the Zenodo source)

end G61Lv33

#print axioms G61Lv33.add_nn
#print axioms G61Lv33.level
#print axioms G61Lv33.level_fun

ym/G61Lv34.lean

lean_all/ym/G61Lv34.lean

/-
  ym/G61Lv34 — T45, G61a at level n = 34 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv34

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a7) (p8 : O.le K.zero a8) (p9 : O.le K.zero a9) (  -- (+622 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+27179 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 60372900) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 34) a33)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 33) a32))) (K.mul (K.mul (cN K 3) a2) (K  -- (+3748 chars; full line in the Zenodo source)
      (K.mul (cN K 60233040) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 35) a34)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 34) a33))) (K.mul (K.mul (cN K 3) a2  -- (+3751 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_29 := HeatV.sub_nn K O _ _ e0_29
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_34 := HeatV.sub_nn K O _ _ e0_34
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_29 := HeatV.sub_nn K O _ _ e1_29
  have d1_30 := HeatV.sub_nn K O _ _ e1_30
  have d1_31 := HeatV.sub_nn K O _ _ e1_31
  have d1_32 := HeatV.sub_nn K O _ _ e1_32
  have d1_33 := HeatV.sub_nn K O _ _ e1_33
  have d1_34 := HeatV.sub_nn K O _ _ e1_34
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_33 := HeatV.sub_nn K O _ _ e2_33
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d4_34 := HeatV.sub_nn K O _ _ e4_34
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d5_33 := HeatV.sub_nn K O _ _ e5_33
  have d5_34 := HeatV.sub_nn K O _ _ e5_34
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d6_33 := HeatV.sub_nn K O _ _ e6_33
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d7_33 := HeatV.sub_nn K O _ _ e7_33
  have d7_34 := HeatV.sub_nn K O _ _ e7_34
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_32 := HeatV.sub_nn K O _ _ e8_32
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d11_33 := HeatV.sub_nn K O _ _ e11_33
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_33 := HeatV.sub_nn K O _ _ e13_33
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d14_32 := HeatV.sub_nn K O _ _ e14_32
  have d14_33 := HeatV.sub_nn K O _ _ e14_33
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_34 := HeatV.sub_nn K O _ _ e15_34
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_34 := HeatV.sub_nn K O _ _ e20_34
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+100691 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 60372900) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 34) a33)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 33) a32))) (K.mul  -- (+3776 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..35, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 35 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 60372900) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 34) (A 33))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 33) (A 32)))) (K.mul (K.mul (cN  -- (+4168 chars; full line in the Zenodo source)
      (K.mul (cN K 60233040) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 35) (A 34))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 34) (A 33)))) (K.mul (K.mul  -- (+4168 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hnn 7) (hnn 8) (hnn 9) (hnn 10) (hnn 11) (hnn 12) (hnn 13) (hnn 14) (hnn 15) (hnn 16)   -- (+170 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 35 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 35 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 35 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 35 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 35 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 35 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 35 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+32333 chars; full line in the Zenodo source)

end G61Lv34

#print axioms G61Lv34.add_nn
#print axioms G61Lv34.level
#print axioms G61Lv34.level_fun

ym/G61Lv35.lean

lean_all/ym/G61Lv35.lean

/-
  ym/G61Lv35 — T45, G61a at level n = 35 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv35

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a7) (p8 : O.le K.zero a8) (p9 : O.le K.zero a  -- (+650 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+28830 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 71166096) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 35) a34)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 34) a33))) (K.mul (K.mul (cN K 3)  -- (+3868 chars; full line in the Zenodo source)
      (K.mul (cN K 71010030) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 36) a35)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 35) a34))) (K.mul (K.mul (cN   -- (+3871 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_29 := HeatV.sub_nn K O _ _ e0_29
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_32 := HeatV.sub_nn K O _ _ e0_32
  have d0_33 := HeatV.sub_nn K O _ _ e0_33
  have d0_34 := HeatV.sub_nn K O _ _ e0_34
  have d0_35 := HeatV.sub_nn K O _ _ e0_35
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_29 := HeatV.sub_nn K O _ _ e1_29
  have d1_30 := HeatV.sub_nn K O _ _ e1_30
  have d1_31 := HeatV.sub_nn K O _ _ e1_31
  have d1_32 := HeatV.sub_nn K O _ _ e1_32
  have d1_33 := HeatV.sub_nn K O _ _ e1_33
  have d1_34 := HeatV.sub_nn K O _ _ e1_34
  have d1_35 := HeatV.sub_nn K O _ _ e1_35
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_33 := HeatV.sub_nn K O _ _ e2_33
  have d2_34 := HeatV.sub_nn K O _ _ e2_34
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d3_34 := HeatV.sub_nn K O _ _ e3_34
  have d3_35 := HeatV.sub_nn K O _ _ e3_35
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d4_34 := HeatV.sub_nn K O _ _ e4_34
  have d4_35 := HeatV.sub_nn K O _ _ e4_35
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d5_33 := HeatV.sub_nn K O _ _ e5_33
  have d5_34 := HeatV.sub_nn K O _ _ e5_34
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d6_33 := HeatV.sub_nn K O _ _ e6_33
  have d6_34 := HeatV.sub_nn K O _ _ e6_34
  have d6_35 := HeatV.sub_nn K O _ _ e6_35
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d7_33 := HeatV.sub_nn K O _ _ e7_33
  have d7_34 := HeatV.sub_nn K O _ _ e7_34
  have d7_35 := HeatV.sub_nn K O _ _ e7_35
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_32 := HeatV.sub_nn K O _ _ e8_32
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_34 := HeatV.sub_nn K O _ _ e8_34
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d9_34 := HeatV.sub_nn K O _ _ e9_34
  have d9_35 := HeatV.sub_nn K O _ _ e9_35
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_34 := HeatV.sub_nn K O _ _ e10_34
  have d10_35 := HeatV.sub_nn K O _ _ e10_35
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d11_33 := HeatV.sub_nn K O _ _ e11_33
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d12_34 := HeatV.sub_nn K O _ _ e12_34
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_33 := HeatV.sub_nn K O _ _ e13_33
  have d13_34 := HeatV.sub_nn K O _ _ e13_34
  have d13_35 := HeatV.sub_nn K O _ _ e13_35
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d14_32 := HeatV.sub_nn K O _ _ e14_32
  have d14_33 := HeatV.sub_nn K O _ _ e14_33
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_34 := HeatV.sub_nn K O _ _ e15_34
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_34 := HeatV.sub_nn K O _ _ e17_34
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d18_34 := HeatV.sub_nn K O _ _ e18_34
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d19_34 := HeatV.sub_nn K O _ _ e19_34
  have d19_35 := HeatV.sub_nn K O _ _ e19_35
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_34 := HeatV.sub_nn K O _ _ e20_34
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+108857 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 71166096) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 35) a34)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 34) a33)))  -- (+3896 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..36, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 36 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 71166096) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 35) (A 34))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 34) (A 33)))) (K.mul (K.  -- (+4300 chars; full line in the Zenodo source)
      (K.mul (cN K 71010030) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 36) (A 35))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 35) (A 34)))) (K.mul  -- (+4300 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hnn 7) (hnn 8) (hnn 9) (hnn 10) (hnn 11) (hnn 12) (hnn 13) (hnn 14) (hnn 15) (h  -- (+186 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 36 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 36 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 36 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 36 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 36 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 36 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 36 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+34273 chars; full line in the Zenodo source)

end G61Lv35

#print axioms G61Lv35.add_nn
#print axioms G61Lv35.level
#print axioms G61Lv35.level_fun

ym/G61Lv36.lean

lean_all/ym/G61Lv36.lean

/-
  ym/G61Lv36 — T45, G61a at level n = 36 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv36

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a7) (p8 : O.le K.zero a8) (p9 : O.le K.ze  -- (+678 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+30529 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 83521321) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 36) a35)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 35) a34))) (K.mul (K.mul (  -- (+3988 chars; full line in the Zenodo source)
      (K.mul (cN K 83347680) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 37) a36)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 36) a35))) (K.mul (K.m  -- (+3991 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_29 := HeatV.sub_nn K O _ _ e0_29
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_32 := HeatV.sub_nn K O _ _ e0_32
  have d0_33 := HeatV.sub_nn K O _ _ e0_33
  have d0_34 := HeatV.sub_nn K O _ _ e0_34
  have d0_35 := HeatV.sub_nn K O _ _ e0_35
  have d0_36 := HeatV.sub_nn K O _ _ e0_36
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_29 := HeatV.sub_nn K O _ _ e1_29
  have d1_30 := HeatV.sub_nn K O _ _ e1_30
  have d1_31 := HeatV.sub_nn K O _ _ e1_31
  have d1_32 := HeatV.sub_nn K O _ _ e1_32
  have d1_33 := HeatV.sub_nn K O _ _ e1_33
  have d1_34 := HeatV.sub_nn K O _ _ e1_34
  have d1_35 := HeatV.sub_nn K O _ _ e1_35
  have d1_36 := HeatV.sub_nn K O _ _ e1_36
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_33 := HeatV.sub_nn K O _ _ e2_33
  have d2_34 := HeatV.sub_nn K O _ _ e2_34
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d2_36 := HeatV.sub_nn K O _ _ e2_36
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d3_34 := HeatV.sub_nn K O _ _ e3_34
  have d3_35 := HeatV.sub_nn K O _ _ e3_35
  have d3_36 := HeatV.sub_nn K O _ _ e3_36
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d4_34 := HeatV.sub_nn K O _ _ e4_34
  have d4_35 := HeatV.sub_nn K O _ _ e4_35
  have d4_36 := HeatV.sub_nn K O _ _ e4_36
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d5_33 := HeatV.sub_nn K O _ _ e5_33
  have d5_34 := HeatV.sub_nn K O _ _ e5_34
  have d5_35 := HeatV.sub_nn K O _ _ e5_35
  have d5_36 := HeatV.sub_nn K O _ _ e5_36
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d6_33 := HeatV.sub_nn K O _ _ e6_33
  have d6_34 := HeatV.sub_nn K O _ _ e6_34
  have d6_35 := HeatV.sub_nn K O _ _ e6_35
  have d6_36 := HeatV.sub_nn K O _ _ e6_36
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d7_33 := HeatV.sub_nn K O _ _ e7_33
  have d7_34 := HeatV.sub_nn K O _ _ e7_34
  have d7_35 := HeatV.sub_nn K O _ _ e7_35
  have d7_36 := HeatV.sub_nn K O _ _ e7_36
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_32 := HeatV.sub_nn K O _ _ e8_32
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_34 := HeatV.sub_nn K O _ _ e8_34
  have d8_35 := HeatV.sub_nn K O _ _ e8_35
  have d8_36 := HeatV.sub_nn K O _ _ e8_36
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d9_34 := HeatV.sub_nn K O _ _ e9_34
  have d9_35 := HeatV.sub_nn K O _ _ e9_35
  have d9_36 := HeatV.sub_nn K O _ _ e9_36
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_34 := HeatV.sub_nn K O _ _ e10_34
  have d10_35 := HeatV.sub_nn K O _ _ e10_35
  have d10_36 := HeatV.sub_nn K O _ _ e10_36
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d11_33 := HeatV.sub_nn K O _ _ e11_33
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d11_35 := HeatV.sub_nn K O _ _ e11_35
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d12_34 := HeatV.sub_nn K O _ _ e12_34
  have d12_35 := HeatV.sub_nn K O _ _ e12_35
  have d12_36 := HeatV.sub_nn K O _ _ e12_36
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_33 := HeatV.sub_nn K O _ _ e13_33
  have d13_34 := HeatV.sub_nn K O _ _ e13_34
  have d13_35 := HeatV.sub_nn K O _ _ e13_35
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d14_32 := HeatV.sub_nn K O _ _ e14_32
  have d14_33 := HeatV.sub_nn K O _ _ e14_33
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d14_35 := HeatV.sub_nn K O _ _ e14_35
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_34 := HeatV.sub_nn K O _ _ e15_34
  have d15_35 := HeatV.sub_nn K O _ _ e15_35
  have d15_36 := HeatV.sub_nn K O _ _ e15_36
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_34 := HeatV.sub_nn K O _ _ e17_34
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d17_36 := HeatV.sub_nn K O _ _ e17_36
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d18_34 := HeatV.sub_nn K O _ _ e18_34
  have d18_35 := HeatV.sub_nn K O _ _ e18_35
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d19_34 := HeatV.sub_nn K O _ _ e19_34
  have d19_35 := HeatV.sub_nn K O _ _ e19_35
  have d19_36 := HeatV.sub_nn K O _ _ e19_36
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_34 := HeatV.sub_nn K O _ _ e20_34
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d21_35 := HeatV.sub_nn K O _ _ e21_35
  have d21_36 := HeatV.sub_nn K O _ _ e21_36
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d22_36 := HeatV.sub_nn K O _ _ e22_36
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d24_35 := HeatV.sub_nn K O _ _ e24_35
  have d24_36 := HeatV.sub_nn K O _ _ e24_36
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d25_35 := HeatV.sub_nn K O _ _ e25_35
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d27_35 := HeatV.sub_nn K O _ _ e27_35
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d28_35 := HeatV.sub_nn K O _ _ e28_35
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d30_35 := HeatV.sub_nn K O _ _ e30_35
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d31_35 := HeatV.sub_nn K O _ _ e31_35
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have d34_36 := HeatV.sub_nn K O _ _ e34_36
  have d35_36 := HeatV.sub_nn K O _ _ e35_36
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+113304 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 83521321) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 36) a35)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 35)  -- (+4016 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..37, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 37 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 83521321) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 36) (A 35))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 35) (A 34)))) (K.  -- (+4432 chars; full line in the Zenodo source)
      (K.mul (cN K 83347680) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 37) (A 36))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 36) (A 35))))  -- (+4432 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (A 37) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hnn 7) (hnn 8) (hnn 9) (hnn 10) (hnn 11) (hnn 12) (hnn 13) (hnn 14) (hnn  -- (+202 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 37 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 37 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 37 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 37 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 37 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 37 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 37 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+36269 chars; full line in the Zenodo source)

end G61Lv36

#print axioms G61Lv36.add_nn
#print axioms G61Lv36.level
#print axioms G61Lv36.level_fun

ym/G61Lv37.lean

lean_all/ym/G61Lv37.lean

/-
  ym/G61Lv37 — T45, G61a at level n = 37 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv37

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a7) (p8 : O.le K.zero a8) (p9 : O.le   -- (+706 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+32276 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 97614400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 37) a36)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 36) a35))) (K.mul (  -- (+4108 chars; full line in the Zenodo source)
      (K.mul (cN K 97421740) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 38) a37)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 37) a36))) (K.m  -- (+4111 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_32 := HeatV.sub_nn K O _ _ e0_32
  have d0_33 := HeatV.sub_nn K O _ _ e0_33
  have d0_34 := HeatV.sub_nn K O _ _ e0_34
  have d0_35 := HeatV.sub_nn K O _ _ e0_35
  have d0_36 := HeatV.sub_nn K O _ _ e0_36
  have d0_37 := HeatV.sub_nn K O _ _ e0_37
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_30 := HeatV.sub_nn K O _ _ e1_30
  have d1_32 := HeatV.sub_nn K O _ _ e1_32
  have d1_33 := HeatV.sub_nn K O _ _ e1_33
  have d1_34 := HeatV.sub_nn K O _ _ e1_34
  have d1_36 := HeatV.sub_nn K O _ _ e1_36
  have d1_37 := HeatV.sub_nn K O _ _ e1_37
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_33 := HeatV.sub_nn K O _ _ e2_33
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d2_36 := HeatV.sub_nn K O _ _ e2_36
  have d2_37 := HeatV.sub_nn K O _ _ e2_37
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d3_34 := HeatV.sub_nn K O _ _ e3_34
  have d3_35 := HeatV.sub_nn K O _ _ e3_35
  have d3_36 := HeatV.sub_nn K O _ _ e3_36
  have d3_37 := HeatV.sub_nn K O _ _ e3_37
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d4_34 := HeatV.sub_nn K O _ _ e4_34
  have d4_35 := HeatV.sub_nn K O _ _ e4_35
  have d4_36 := HeatV.sub_nn K O _ _ e4_36
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d5_33 := HeatV.sub_nn K O _ _ e5_33
  have d5_34 := HeatV.sub_nn K O _ _ e5_34
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d6_33 := HeatV.sub_nn K O _ _ e6_33
  have d6_35 := HeatV.sub_nn K O _ _ e6_35
  have d6_36 := HeatV.sub_nn K O _ _ e6_36
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d7_33 := HeatV.sub_nn K O _ _ e7_33
  have d7_34 := HeatV.sub_nn K O _ _ e7_34
  have d7_35 := HeatV.sub_nn K O _ _ e7_35
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_32 := HeatV.sub_nn K O _ _ e8_32
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_35 := HeatV.sub_nn K O _ _ e8_35
  have d8_36 := HeatV.sub_nn K O _ _ e8_36
  have d8_37 := HeatV.sub_nn K O _ _ e8_37
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d9_34 := HeatV.sub_nn K O _ _ e9_34
  have d9_35 := HeatV.sub_nn K O _ _ e9_35
  have d9_36 := HeatV.sub_nn K O _ _ e9_36
  have d9_37 := HeatV.sub_nn K O _ _ e9_37
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_35 := HeatV.sub_nn K O _ _ e10_35
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d11_33 := HeatV.sub_nn K O _ _ e11_33
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d11_35 := HeatV.sub_nn K O _ _ e11_35
  have d11_36 := HeatV.sub_nn K O _ _ e11_36
  have d11_37 := HeatV.sub_nn K O _ _ e11_37
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d12_34 := HeatV.sub_nn K O _ _ e12_34
  have d12_35 := HeatV.sub_nn K O _ _ e12_35
  have d12_36 := HeatV.sub_nn K O _ _ e12_36
  have d12_37 := HeatV.sub_nn K O _ _ e12_37
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_33 := HeatV.sub_nn K O _ _ e13_33
  have d13_34 := HeatV.sub_nn K O _ _ e13_34
  have d13_35 := HeatV.sub_nn K O _ _ e13_35
  have d13_37 := HeatV.sub_nn K O _ _ e13_37
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d14_32 := HeatV.sub_nn K O _ _ e14_32
  have d14_33 := HeatV.sub_nn K O _ _ e14_33
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d14_35 := HeatV.sub_nn K O _ _ e14_35
  have d14_36 := HeatV.sub_nn K O _ _ e14_36
  have d14_37 := HeatV.sub_nn K O _ _ e14_37
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_34 := HeatV.sub_nn K O _ _ e15_34
  have d15_35 := HeatV.sub_nn K O _ _ e15_35
  have d15_36 := HeatV.sub_nn K O _ _ e15_36
  have d15_37 := HeatV.sub_nn K O _ _ e15_37
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d16_36 := HeatV.sub_nn K O _ _ e16_36
  have d16_37 := HeatV.sub_nn K O _ _ e16_37
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d17_36 := HeatV.sub_nn K O _ _ e17_36
  have d17_37 := HeatV.sub_nn K O _ _ e17_37
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d18_34 := HeatV.sub_nn K O _ _ e18_34
  have d18_35 := HeatV.sub_nn K O _ _ e18_35
  have d18_36 := HeatV.sub_nn K O _ _ e18_36
  have d18_37 := HeatV.sub_nn K O _ _ e18_37
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d19_34 := HeatV.sub_nn K O _ _ e19_34
  have d19_35 := HeatV.sub_nn K O _ _ e19_35
  have d19_36 := HeatV.sub_nn K O _ _ e19_36
  have d19_37 := HeatV.sub_nn K O _ _ e19_37
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_34 := HeatV.sub_nn K O _ _ e20_34
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d20_36 := HeatV.sub_nn K O _ _ e20_36
  have d20_37 := HeatV.sub_nn K O _ _ e20_37
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d21_35 := HeatV.sub_nn K O _ _ e21_35
  have d21_36 := HeatV.sub_nn K O _ _ e21_36
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d22_36 := HeatV.sub_nn K O _ _ e22_36
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d23_36 := HeatV.sub_nn K O _ _ e23_36
  have d23_37 := HeatV.sub_nn K O _ _ e23_37
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d24_35 := HeatV.sub_nn K O _ _ e24_35
  have d24_36 := HeatV.sub_nn K O _ _ e24_36
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d25_35 := HeatV.sub_nn K O _ _ e25_35
  have d25_36 := HeatV.sub_nn K O _ _ e25_36
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d26_36 := HeatV.sub_nn K O _ _ e26_36
  have d26_37 := HeatV.sub_nn K O _ _ e26_37
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d27_35 := HeatV.sub_nn K O _ _ e27_35
  have d27_36 := HeatV.sub_nn K O _ _ e27_36
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d28_35 := HeatV.sub_nn K O _ _ e28_35
  have d28_36 := HeatV.sub_nn K O _ _ e28_36
  have d28_37 := HeatV.sub_nn K O _ _ e28_37
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d29_36 := HeatV.sub_nn K O _ _ e29_36
  have d29_37 := HeatV.sub_nn K O _ _ e29_37
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d30_35 := HeatV.sub_nn K O _ _ e30_35
  have d30_36 := HeatV.sub_nn K O _ _ e30_36
  have d30_37 := HeatV.sub_nn K O _ _ e30_37
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d31_35 := HeatV.sub_nn K O _ _ e31_35
  have d31_36 := HeatV.sub_nn K O _ _ e31_36
  have d31_37 := HeatV.sub_nn K O _ _ e31_37
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d32_36 := HeatV.sub_nn K O _ _ e32_36
  have d32_37 := HeatV.sub_nn K O _ _ e32_37
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d33_36 := HeatV.sub_nn K O _ _ e33_36
  have d33_37 := HeatV.sub_nn K O _ _ e33_37
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have d34_36 := HeatV.sub_nn K O _ _ e34_36
  have d34_37 := HeatV.sub_nn K O _ _ e34_37
  have d35_36 := HeatV.sub_nn K O _ _ e35_36
  have d35_37 := HeatV.sub_nn K O _ _ e35_37
  have d36_37 := HeatV.sub_nn K O _ _ e36_37
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+121161 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 97614400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 37) a36)) (K.mul (K.mul (cN K 2) a1) (K.mul (c  -- (+4136 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..38, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 38 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 97614400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 37) (A 36))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 36) (A 35)  -- (+4564 chars; full line in the Zenodo source)
      (K.mul (cN K 97421740) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 38) (A 37))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 37) (A  -- (+4564 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (A 37) (A 38) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hnn 7) (hnn 8) (hnn 9) (hnn 10) (hnn 11) (hnn 12) (hnn 13) (hnn 1  -- (+218 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 38 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 38 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 38 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 38 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 38 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 38 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 38 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+38321 chars; full line in the Zenodo source)

end G61Lv37

#print axioms G61Lv37.add_nn
#print axioms G61Lv37.level
#print axioms G61Lv37.level_fun

ym/G61Lv38.lean

lean_all/ym/G61Lv38.lean

/-
  ym/G61Lv38 — T45, G61a at level n = 38 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv38

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a7) (p8 : O.le K.zero a8) (p9 : O  -- (+734 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+34071 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 113635600) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 38) a37)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 37) a36)))   -- (+4229 chars; full line in the Zenodo source)
      (K.mul (cN K 113422400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 39) a38)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 38) a37  -- (+4232 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_29 := HeatV.sub_nn K O _ _ e0_29
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_33 := HeatV.sub_nn K O _ _ e0_33
  have d0_34 := HeatV.sub_nn K O _ _ e0_34
  have d0_38 := HeatV.sub_nn K O _ _ e0_38
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_29 := HeatV.sub_nn K O _ _ e1_29
  have d1_30 := HeatV.sub_nn K O _ _ e1_30
  have d1_35 := HeatV.sub_nn K O _ _ e1_35
  have d1_37 := HeatV.sub_nn K O _ _ e1_37
  have d1_38 := HeatV.sub_nn K O _ _ e1_38
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_33 := HeatV.sub_nn K O _ _ e2_33
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d2_36 := HeatV.sub_nn K O _ _ e2_36
  have d2_37 := HeatV.sub_nn K O _ _ e2_37
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d3_35 := HeatV.sub_nn K O _ _ e3_35
  have d3_37 := HeatV.sub_nn K O _ _ e3_37
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_34 := HeatV.sub_nn K O _ _ e4_34
  have d4_35 := HeatV.sub_nn K O _ _ e4_35
  have d4_37 := HeatV.sub_nn K O _ _ e4_37
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_33 := HeatV.sub_nn K O _ _ e5_33
  have d5_34 := HeatV.sub_nn K O _ _ e5_34
  have d5_35 := HeatV.sub_nn K O _ _ e5_35
  have d5_36 := HeatV.sub_nn K O _ _ e5_36
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d6_33 := HeatV.sub_nn K O _ _ e6_33
  have d6_34 := HeatV.sub_nn K O _ _ e6_34
  have d6_35 := HeatV.sub_nn K O _ _ e6_35
  have d6_36 := HeatV.sub_nn K O _ _ e6_36
  have d6_37 := HeatV.sub_nn K O _ _ e6_37
  have d6_38 := HeatV.sub_nn K O _ _ e6_38
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d7_33 := HeatV.sub_nn K O _ _ e7_33
  have d7_34 := HeatV.sub_nn K O _ _ e7_34
  have d7_35 := HeatV.sub_nn K O _ _ e7_35
  have d7_36 := HeatV.sub_nn K O _ _ e7_36
  have d7_37 := HeatV.sub_nn K O _ _ e7_37
  have d7_38 := HeatV.sub_nn K O _ _ e7_38
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_32 := HeatV.sub_nn K O _ _ e8_32
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_34 := HeatV.sub_nn K O _ _ e8_34
  have d8_35 := HeatV.sub_nn K O _ _ e8_35
  have d8_36 := HeatV.sub_nn K O _ _ e8_36
  have d8_37 := HeatV.sub_nn K O _ _ e8_37
  have d8_38 := HeatV.sub_nn K O _ _ e8_38
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d9_34 := HeatV.sub_nn K O _ _ e9_34
  have d9_35 := HeatV.sub_nn K O _ _ e9_35
  have d9_36 := HeatV.sub_nn K O _ _ e9_36
  have d9_37 := HeatV.sub_nn K O _ _ e9_37
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_34 := HeatV.sub_nn K O _ _ e10_34
  have d10_35 := HeatV.sub_nn K O _ _ e10_35
  have d10_36 := HeatV.sub_nn K O _ _ e10_36
  have d10_37 := HeatV.sub_nn K O _ _ e10_37
  have d10_38 := HeatV.sub_nn K O _ _ e10_38
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d11_33 := HeatV.sub_nn K O _ _ e11_33
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d11_35 := HeatV.sub_nn K O _ _ e11_35
  have d11_36 := HeatV.sub_nn K O _ _ e11_36
  have d11_37 := HeatV.sub_nn K O _ _ e11_37
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d12_34 := HeatV.sub_nn K O _ _ e12_34
  have d12_35 := HeatV.sub_nn K O _ _ e12_35
  have d12_36 := HeatV.sub_nn K O _ _ e12_36
  have d12_37 := HeatV.sub_nn K O _ _ e12_37
  have d12_38 := HeatV.sub_nn K O _ _ e12_38
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_33 := HeatV.sub_nn K O _ _ e13_33
  have d13_34 := HeatV.sub_nn K O _ _ e13_34
  have d13_35 := HeatV.sub_nn K O _ _ e13_35
  have d13_36 := HeatV.sub_nn K O _ _ e13_36
  have d13_37 := HeatV.sub_nn K O _ _ e13_37
  have d13_38 := HeatV.sub_nn K O _ _ e13_38
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d14_32 := HeatV.sub_nn K O _ _ e14_32
  have d14_33 := HeatV.sub_nn K O _ _ e14_33
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d14_35 := HeatV.sub_nn K O _ _ e14_35
  have d14_36 := HeatV.sub_nn K O _ _ e14_36
  have d14_37 := HeatV.sub_nn K O _ _ e14_37
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_34 := HeatV.sub_nn K O _ _ e15_34
  have d15_35 := HeatV.sub_nn K O _ _ e15_35
  have d15_36 := HeatV.sub_nn K O _ _ e15_36
  have d15_37 := HeatV.sub_nn K O _ _ e15_37
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d16_36 := HeatV.sub_nn K O _ _ e16_36
  have d16_37 := HeatV.sub_nn K O _ _ e16_37
  have d16_38 := HeatV.sub_nn K O _ _ e16_38
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_34 := HeatV.sub_nn K O _ _ e17_34
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d17_36 := HeatV.sub_nn K O _ _ e17_36
  have d17_37 := HeatV.sub_nn K O _ _ e17_37
  have d17_38 := HeatV.sub_nn K O _ _ e17_38
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d18_34 := HeatV.sub_nn K O _ _ e18_34
  have d18_35 := HeatV.sub_nn K O _ _ e18_35
  have d18_36 := HeatV.sub_nn K O _ _ e18_36
  have d18_37 := HeatV.sub_nn K O _ _ e18_37
  have d18_38 := HeatV.sub_nn K O _ _ e18_38
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d19_34 := HeatV.sub_nn K O _ _ e19_34
  have d19_35 := HeatV.sub_nn K O _ _ e19_35
  have d19_36 := HeatV.sub_nn K O _ _ e19_36
  have d19_37 := HeatV.sub_nn K O _ _ e19_37
  have d19_38 := HeatV.sub_nn K O _ _ e19_38
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_34 := HeatV.sub_nn K O _ _ e20_34
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d20_36 := HeatV.sub_nn K O _ _ e20_36
  have d20_37 := HeatV.sub_nn K O _ _ e20_37
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d21_35 := HeatV.sub_nn K O _ _ e21_35
  have d21_36 := HeatV.sub_nn K O _ _ e21_36
  have d21_37 := HeatV.sub_nn K O _ _ e21_37
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d22_36 := HeatV.sub_nn K O _ _ e22_36
  have d22_37 := HeatV.sub_nn K O _ _ e22_37
  have d22_38 := HeatV.sub_nn K O _ _ e22_38
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d23_36 := HeatV.sub_nn K O _ _ e23_36
  have d23_37 := HeatV.sub_nn K O _ _ e23_37
  have d23_38 := HeatV.sub_nn K O _ _ e23_38
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d24_35 := HeatV.sub_nn K O _ _ e24_35
  have d24_36 := HeatV.sub_nn K O _ _ e24_36
  have d24_37 := HeatV.sub_nn K O _ _ e24_37
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d25_35 := HeatV.sub_nn K O _ _ e25_35
  have d25_36 := HeatV.sub_nn K O _ _ e25_36
  have d25_37 := HeatV.sub_nn K O _ _ e25_37
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d26_36 := HeatV.sub_nn K O _ _ e26_36
  have d26_37 := HeatV.sub_nn K O _ _ e26_37
  have d26_38 := HeatV.sub_nn K O _ _ e26_38
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d27_35 := HeatV.sub_nn K O _ _ e27_35
  have d27_36 := HeatV.sub_nn K O _ _ e27_36
  have d27_37 := HeatV.sub_nn K O _ _ e27_37
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d28_35 := HeatV.sub_nn K O _ _ e28_35
  have d28_36 := HeatV.sub_nn K O _ _ e28_36
  have d28_37 := HeatV.sub_nn K O _ _ e28_37
  have d28_38 := HeatV.sub_nn K O _ _ e28_38
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d29_36 := HeatV.sub_nn K O _ _ e29_36
  have d29_37 := HeatV.sub_nn K O _ _ e29_37
  have d29_38 := HeatV.sub_nn K O _ _ e29_38
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d30_35 := HeatV.sub_nn K O _ _ e30_35
  have d30_36 := HeatV.sub_nn K O _ _ e30_36
  have d30_37 := HeatV.sub_nn K O _ _ e30_37
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d31_35 := HeatV.sub_nn K O _ _ e31_35
  have d31_36 := HeatV.sub_nn K O _ _ e31_36
  have d31_37 := HeatV.sub_nn K O _ _ e31_37
  have d31_38 := HeatV.sub_nn K O _ _ e31_38
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d32_36 := HeatV.sub_nn K O _ _ e32_36
  have d32_37 := HeatV.sub_nn K O _ _ e32_37
  have d32_38 := HeatV.sub_nn K O _ _ e32_38
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d33_36 := HeatV.sub_nn K O _ _ e33_36
  have d33_37 := HeatV.sub_nn K O _ _ e33_37
  have d33_38 := HeatV.sub_nn K O _ _ e33_38
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have d34_36 := HeatV.sub_nn K O _ _ e34_36
  have d34_37 := HeatV.sub_nn K O _ _ e34_37
  have d34_38 := HeatV.sub_nn K O _ _ e34_38
  have d35_36 := HeatV.sub_nn K O _ _ e35_36
  have d35_37 := HeatV.sub_nn K O _ _ e35_37
  have d35_38 := HeatV.sub_nn K O _ _ e35_38
  have d36_37 := HeatV.sub_nn K O _ _ e36_37
  have d36_38 := HeatV.sub_nn K O _ _ e36_38
  have d37_38 := HeatV.sub_nn K O _ _ e37_38
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+125859 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 113635600) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 38) a37)) (K.mul (K.mul (cN K 2) a1) (  -- (+4257 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..39, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 39 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 113635600) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 38) (A 37))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 37  -- (+4697 chars; full line in the Zenodo source)
      (K.mul (cN K 113422400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 39) (A 38))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN   -- (+4697 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (A 37) (A 38) (A 39) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hnn 7) (hnn 8) (hnn 9) (hnn 10) (hnn 11) (hnn 12) (hnn 13)  -- (+234 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 39 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 39 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 39 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 39 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 39 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 39 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 39 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+40429 chars; full line in the Zenodo source)

end G61Lv38

#print axioms G61Lv38.add_nn
#print axioms G61Lv38.level
#print axioms G61Lv38.level_fun

ym/G61Lv39.lean

lean_all/ym/G61Lv39.lean

/-
  ym/G61Lv39 — T45, G61a at level n = 39 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv39

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a7) (p8 : O.le K.zero a8) (p9  -- (+762 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+35914 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 131790400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 39) a38)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 38)   -- (+4349 chars; full line in the Zenodo source)
      (K.mul (cN K 131555060) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 40) a39)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K   -- (+4352 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_32 := HeatV.sub_nn K O _ _ e0_32
  have d0_33 := HeatV.sub_nn K O _ _ e0_33
  have d0_34 := HeatV.sub_nn K O _ _ e0_34
  have d0_35 := HeatV.sub_nn K O _ _ e0_35
  have d0_36 := HeatV.sub_nn K O _ _ e0_36
  have d0_39 := HeatV.sub_nn K O _ _ e0_39
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_30 := HeatV.sub_nn K O _ _ e1_30
  have d1_32 := HeatV.sub_nn K O _ _ e1_32
  have d1_35 := HeatV.sub_nn K O _ _ e1_35
  have d1_36 := HeatV.sub_nn K O _ _ e1_36
  have d1_37 := HeatV.sub_nn K O _ _ e1_37
  have d1_38 := HeatV.sub_nn K O _ _ e1_38
  have d1_39 := HeatV.sub_nn K O _ _ e1_39
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_33 := HeatV.sub_nn K O _ _ e2_33
  have d2_34 := HeatV.sub_nn K O _ _ e2_34
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d2_36 := HeatV.sub_nn K O _ _ e2_36
  have d2_37 := HeatV.sub_nn K O _ _ e2_37
  have d2_38 := HeatV.sub_nn K O _ _ e2_38
  have d2_39 := HeatV.sub_nn K O _ _ e2_39
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_34 := HeatV.sub_nn K O _ _ e3_34
  have d3_36 := HeatV.sub_nn K O _ _ e3_36
  have d3_37 := HeatV.sub_nn K O _ _ e3_37
  have d3_38 := HeatV.sub_nn K O _ _ e3_38
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_35 := HeatV.sub_nn K O _ _ e4_35
  have d4_36 := HeatV.sub_nn K O _ _ e4_36
  have d4_37 := HeatV.sub_nn K O _ _ e4_37
  have d4_38 := HeatV.sub_nn K O _ _ e4_38
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d5_34 := HeatV.sub_nn K O _ _ e5_34
  have d5_35 := HeatV.sub_nn K O _ _ e5_35
  have d5_36 := HeatV.sub_nn K O _ _ e5_36
  have d5_38 := HeatV.sub_nn K O _ _ e5_38
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_33 := HeatV.sub_nn K O _ _ e6_33
  have d6_34 := HeatV.sub_nn K O _ _ e6_34
  have d6_35 := HeatV.sub_nn K O _ _ e6_35
  have d6_36 := HeatV.sub_nn K O _ _ e6_36
  have d6_37 := HeatV.sub_nn K O _ _ e6_37
  have d6_38 := HeatV.sub_nn K O _ _ e6_38
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d7_33 := HeatV.sub_nn K O _ _ e7_33
  have d7_34 := HeatV.sub_nn K O _ _ e7_34
  have d7_35 := HeatV.sub_nn K O _ _ e7_35
  have d7_36 := HeatV.sub_nn K O _ _ e7_36
  have d7_38 := HeatV.sub_nn K O _ _ e7_38
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_32 := HeatV.sub_nn K O _ _ e8_32
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_34 := HeatV.sub_nn K O _ _ e8_34
  have d8_35 := HeatV.sub_nn K O _ _ e8_35
  have d8_36 := HeatV.sub_nn K O _ _ e8_36
  have d8_37 := HeatV.sub_nn K O _ _ e8_37
  have d8_38 := HeatV.sub_nn K O _ _ e8_38
  have d8_39 := HeatV.sub_nn K O _ _ e8_39
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d9_35 := HeatV.sub_nn K O _ _ e9_35
  have d9_36 := HeatV.sub_nn K O _ _ e9_36
  have d9_37 := HeatV.sub_nn K O _ _ e9_37
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_34 := HeatV.sub_nn K O _ _ e10_34
  have d10_35 := HeatV.sub_nn K O _ _ e10_35
  have d10_36 := HeatV.sub_nn K O _ _ e10_36
  have d10_37 := HeatV.sub_nn K O _ _ e10_37
  have d10_38 := HeatV.sub_nn K O _ _ e10_38
  have d10_39 := HeatV.sub_nn K O _ _ e10_39
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d11_33 := HeatV.sub_nn K O _ _ e11_33
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d11_35 := HeatV.sub_nn K O _ _ e11_35
  have d11_36 := HeatV.sub_nn K O _ _ e11_36
  have d11_37 := HeatV.sub_nn K O _ _ e11_37
  have d11_38 := HeatV.sub_nn K O _ _ e11_38
  have d11_39 := HeatV.sub_nn K O _ _ e11_39
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d12_34 := HeatV.sub_nn K O _ _ e12_34
  have d12_35 := HeatV.sub_nn K O _ _ e12_35
  have d12_36 := HeatV.sub_nn K O _ _ e12_36
  have d12_37 := HeatV.sub_nn K O _ _ e12_37
  have d12_38 := HeatV.sub_nn K O _ _ e12_38
  have d12_39 := HeatV.sub_nn K O _ _ e12_39
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_33 := HeatV.sub_nn K O _ _ e13_33
  have d13_34 := HeatV.sub_nn K O _ _ e13_34
  have d13_35 := HeatV.sub_nn K O _ _ e13_35
  have d13_36 := HeatV.sub_nn K O _ _ e13_36
  have d13_37 := HeatV.sub_nn K O _ _ e13_37
  have d13_38 := HeatV.sub_nn K O _ _ e13_38
  have d13_39 := HeatV.sub_nn K O _ _ e13_39
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d14_33 := HeatV.sub_nn K O _ _ e14_33
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d14_35 := HeatV.sub_nn K O _ _ e14_35
  have d14_36 := HeatV.sub_nn K O _ _ e14_36
  have d14_37 := HeatV.sub_nn K O _ _ e14_37
  have d14_38 := HeatV.sub_nn K O _ _ e14_38
  have d14_39 := HeatV.sub_nn K O _ _ e14_39
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_34 := HeatV.sub_nn K O _ _ e15_34
  have d15_35 := HeatV.sub_nn K O _ _ e15_35
  have d15_36 := HeatV.sub_nn K O _ _ e15_36
  have d15_37 := HeatV.sub_nn K O _ _ e15_37
  have d15_38 := HeatV.sub_nn K O _ _ e15_38
  have d15_39 := HeatV.sub_nn K O _ _ e15_39
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d16_36 := HeatV.sub_nn K O _ _ e16_36
  have d16_37 := HeatV.sub_nn K O _ _ e16_37
  have d16_38 := HeatV.sub_nn K O _ _ e16_38
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_34 := HeatV.sub_nn K O _ _ e17_34
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d17_36 := HeatV.sub_nn K O _ _ e17_36
  have d17_37 := HeatV.sub_nn K O _ _ e17_37
  have d17_38 := HeatV.sub_nn K O _ _ e17_38
  have d17_39 := HeatV.sub_nn K O _ _ e17_39
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d18_34 := HeatV.sub_nn K O _ _ e18_34
  have d18_35 := HeatV.sub_nn K O _ _ e18_35
  have d18_36 := HeatV.sub_nn K O _ _ e18_36
  have d18_37 := HeatV.sub_nn K O _ _ e18_37
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d19_34 := HeatV.sub_nn K O _ _ e19_34
  have d19_35 := HeatV.sub_nn K O _ _ e19_35
  have d19_36 := HeatV.sub_nn K O _ _ e19_36
  have d19_37 := HeatV.sub_nn K O _ _ e19_37
  have d19_38 := HeatV.sub_nn K O _ _ e19_38
  have d19_39 := HeatV.sub_nn K O _ _ e19_39
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_34 := HeatV.sub_nn K O _ _ e20_34
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d20_36 := HeatV.sub_nn K O _ _ e20_36
  have d20_37 := HeatV.sub_nn K O _ _ e20_37
  have d20_38 := HeatV.sub_nn K O _ _ e20_38
  have d20_39 := HeatV.sub_nn K O _ _ e20_39
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d21_35 := HeatV.sub_nn K O _ _ e21_35
  have d21_36 := HeatV.sub_nn K O _ _ e21_36
  have d21_37 := HeatV.sub_nn K O _ _ e21_37
  have d21_38 := HeatV.sub_nn K O _ _ e21_38
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d22_36 := HeatV.sub_nn K O _ _ e22_36
  have d22_37 := HeatV.sub_nn K O _ _ e22_37
  have d22_38 := HeatV.sub_nn K O _ _ e22_38
  have d22_39 := HeatV.sub_nn K O _ _ e22_39
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d23_36 := HeatV.sub_nn K O _ _ e23_36
  have d23_37 := HeatV.sub_nn K O _ _ e23_37
  have d23_38 := HeatV.sub_nn K O _ _ e23_38
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d24_35 := HeatV.sub_nn K O _ _ e24_35
  have d24_36 := HeatV.sub_nn K O _ _ e24_36
  have d24_37 := HeatV.sub_nn K O _ _ e24_37
  have d24_38 := HeatV.sub_nn K O _ _ e24_38
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d25_35 := HeatV.sub_nn K O _ _ e25_35
  have d25_36 := HeatV.sub_nn K O _ _ e25_36
  have d25_37 := HeatV.sub_nn K O _ _ e25_37
  have d25_38 := HeatV.sub_nn K O _ _ e25_38
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d26_36 := HeatV.sub_nn K O _ _ e26_36
  have d26_37 := HeatV.sub_nn K O _ _ e26_37
  have d26_38 := HeatV.sub_nn K O _ _ e26_38
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d27_35 := HeatV.sub_nn K O _ _ e27_35
  have d27_36 := HeatV.sub_nn K O _ _ e27_36
  have d27_37 := HeatV.sub_nn K O _ _ e27_37
  have d27_38 := HeatV.sub_nn K O _ _ e27_38
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d28_35 := HeatV.sub_nn K O _ _ e28_35
  have d28_36 := HeatV.sub_nn K O _ _ e28_36
  have d28_37 := HeatV.sub_nn K O _ _ e28_37
  have d28_38 := HeatV.sub_nn K O _ _ e28_38
  have d28_39 := HeatV.sub_nn K O _ _ e28_39
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d29_36 := HeatV.sub_nn K O _ _ e29_36
  have d29_37 := HeatV.sub_nn K O _ _ e29_37
  have d29_38 := HeatV.sub_nn K O _ _ e29_38
  have d29_39 := HeatV.sub_nn K O _ _ e29_39
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d30_35 := HeatV.sub_nn K O _ _ e30_35
  have d30_36 := HeatV.sub_nn K O _ _ e30_36
  have d30_37 := HeatV.sub_nn K O _ _ e30_37
  have d30_38 := HeatV.sub_nn K O _ _ e30_38
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d31_35 := HeatV.sub_nn K O _ _ e31_35
  have d31_36 := HeatV.sub_nn K O _ _ e31_36
  have d31_37 := HeatV.sub_nn K O _ _ e31_37
  have d31_38 := HeatV.sub_nn K O _ _ e31_38
  have d31_39 := HeatV.sub_nn K O _ _ e31_39
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d32_36 := HeatV.sub_nn K O _ _ e32_36
  have d32_37 := HeatV.sub_nn K O _ _ e32_37
  have d32_38 := HeatV.sub_nn K O _ _ e32_38
  have d32_39 := HeatV.sub_nn K O _ _ e32_39
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d33_36 := HeatV.sub_nn K O _ _ e33_36
  have d33_37 := HeatV.sub_nn K O _ _ e33_37
  have d33_38 := HeatV.sub_nn K O _ _ e33_38
  have d33_39 := HeatV.sub_nn K O _ _ e33_39
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have d34_36 := HeatV.sub_nn K O _ _ e34_36
  have d34_37 := HeatV.sub_nn K O _ _ e34_37
  have d34_38 := HeatV.sub_nn K O _ _ e34_38
  have d34_39 := HeatV.sub_nn K O _ _ e34_39
  have d35_36 := HeatV.sub_nn K O _ _ e35_36
  have d35_37 := HeatV.sub_nn K O _ _ e35_37
  have d35_38 := HeatV.sub_nn K O _ _ e35_38
  have d35_39 := HeatV.sub_nn K O _ _ e35_39
  have d36_37 := HeatV.sub_nn K O _ _ e36_37
  have d36_38 := HeatV.sub_nn K O _ _ e36_38
  have d36_39 := HeatV.sub_nn K O _ _ e36_39
  have d37_38 := HeatV.sub_nn K O _ _ e37_38
  have d37_39 := HeatV.sub_nn K O _ _ e37_39
  have d38_39 := HeatV.sub_nn K O _ _ e38_39
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+134601 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 131790400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 39) a38)) (K.mul (K.mul (cN K 2  -- (+4377 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..40, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 40 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 131790400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 39) (A 38))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (  -- (+4829 chars; full line in the Zenodo source)
      (K.mul (cN K 131555060) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 40) (A 39))) (K.mul (K.mul (cN K 2) (A 1)) (K.m  -- (+4829 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (A 37) (A 38) (A 39) (A 40) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hnn 7) (hnn 8) (hnn 9) (hnn 10) (hnn 11) (hnn 12) (  -- (+250 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 40 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 40 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 40 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 40 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 40 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 40 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 40 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+42593 chars; full line in the Zenodo source)

end G61Lv39

#print axioms G61Lv39.add_nn
#print axioms G61Lv39.level
#print axioms G61Lv39.level_fun

ym/G61Lv4.lean

lean_all/ym/G61Lv4.lean

/-
  ym/G61Lv4 — T45, G61a at level n = 4 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv4

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e1_2 : O.le (K.mul a1 a3) (K.mul a2 a2)) (e1_3 : O.le (K.mul a1 a4) (K.mul a2 a3)) (e1_4 : O.le (K.mul a1 a5) (K.mul a2 a4)) (e2_3 : O.le (K.mul a2 a4) (K.mul a3 a3)) (e2_4 : O.le (K.mul a2 a5) (K.mul a3 a4)) (e3_4 : O.le (K.mu  -- (+25 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 1225) (K.mul (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 4) a3)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 3) a2))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 2) a1))) (K.mul (K.mul (cN K 4) a3) (K.mul (cN K 1) a0))) (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 6) a5)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 5) a4))) (K.mul (K.mul (cN  -- (+180 chars; full line in the Zenodo source)
      (K.mul (cN K 1120) (K.mul (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 5) a4)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 4) a3))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 3) a2))) (K.mul (K.mul (cN K 4) a3) (K.mul (cN K 2) a1))) (K.mul (K.mul (cN K 5) a4) (K.mul (cN K 1) a0))) (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 5) a4)) (K.mul (K.mul (cN K   -- (+183 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (cN K 53200) (K.mul (K.mul a3 a3) (K.add (K.mul a1 a1) (K.neg (K.mul a0 a2))))) (K.mul (cN K 5600) (K.mul (K.mul a0 a3) (K.add (K.mul a1 a4) (K.neg (K.mul a0 a5)))))) (K.mul (cN K 90720) (K.mul (K.mul a2 a2) (K.add (K.mul a2 a2) (K.neg (K.mul a1 a3)))))) (K.mul (cN K 80080) (K.mul (K.mul a0 a2) (K.add (K.mul a2   -- (+1344 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 1225) (K.mul (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 4) a3)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 3) a2))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 2) a1))) (K.mul (K.mul (cN K 4) a3) (K.mul (cN K 1) a0))) (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 6) a5)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 5)   -- (+208 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..5, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 5 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 1225) (K.mul (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 4) (A 3))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 3) (A 2)))) (K.mul (K.mul (cN K 3) (A 2)) (K.mul (cN K 2) (A 1)))) (K.mul (K.mul (cN K 4) (A 3)) (K.mul (cN K 1) (A 0)))) (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 6) (A 5))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul  -- (+240 chars; full line in the Zenodo source)
      (K.mul (cN K 1120) (K.mul (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 5) (A 4))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 4) (A 3)))) (K.mul (K.mul (cN K 3) (A 2)) (K.mul (cN K 3) (A 2)))) (K.mul (K.mul (cN K 4) (A 3)) (K.mul (cN K 2) (A 1)))) (K.mul (K.mul (cN K 5) (A 4)) (K.mul (cN K 1) (A 0)))) (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (  -- (+240 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5)
    (G61Minor.minor K O A 5 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 5 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 5 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 5 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 5 hnn hne hlc 0 1 (by decide)) (G61Minor.minor K O A 5 hnn hne hlc 1 1 (by decide)) (G61Minor.minor K O A 5 hnn hne hlc 2 1 (by decide)) (G61Minor.minor K O A 5 h  -- (+133 chars; full line in the Zenodo source)

end G61Lv4

#print axioms G61Lv4.add_nn
#print axioms G61Lv4.level
#print axioms G61Lv4.level_fun

ym/G61Lv40.lean

lean_all/ym/G61Lv40.lean

/-
  ym/G61Lv40 — T45, G61a at level n = 40 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv40

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a7) (p8 : O.le K.zero a8)  -- (+790 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+37805 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 152300281) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 40) a39)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN  -- (+4469 chars; full line in the Zenodo source)
      (K.mul (cN K 152041120) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 41) a40)) (K.mul (K.mul (cN K 2) a1) (K.mul  -- (+4472 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_29 := HeatV.sub_nn K O _ _ e0_29
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_32 := HeatV.sub_nn K O _ _ e0_32
  have d0_33 := HeatV.sub_nn K O _ _ e0_33
  have d0_34 := HeatV.sub_nn K O _ _ e0_34
  have d0_36 := HeatV.sub_nn K O _ _ e0_36
  have d0_38 := HeatV.sub_nn K O _ _ e0_38
  have d0_39 := HeatV.sub_nn K O _ _ e0_39
  have d0_40 := HeatV.sub_nn K O _ _ e0_40
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_34 := HeatV.sub_nn K O _ _ e1_34
  have d1_37 := HeatV.sub_nn K O _ _ e1_37
  have d1_39 := HeatV.sub_nn K O _ _ e1_39
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_33 := HeatV.sub_nn K O _ _ e2_33
  have d2_34 := HeatV.sub_nn K O _ _ e2_34
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d2_36 := HeatV.sub_nn K O _ _ e2_36
  have d2_38 := HeatV.sub_nn K O _ _ e2_38
  have d2_39 := HeatV.sub_nn K O _ _ e2_39
  have d2_40 := HeatV.sub_nn K O _ _ e2_40
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d3_34 := HeatV.sub_nn K O _ _ e3_34
  have d3_37 := HeatV.sub_nn K O _ _ e3_37
  have d3_38 := HeatV.sub_nn K O _ _ e3_38
  have d3_39 := HeatV.sub_nn K O _ _ e3_39
  have d3_40 := HeatV.sub_nn K O _ _ e3_40
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d4_34 := HeatV.sub_nn K O _ _ e4_34
  have d4_36 := HeatV.sub_nn K O _ _ e4_36
  have d4_37 := HeatV.sub_nn K O _ _ e4_37
  have d4_38 := HeatV.sub_nn K O _ _ e4_38
  have d4_39 := HeatV.sub_nn K O _ _ e4_39
  have d4_40 := HeatV.sub_nn K O _ _ e4_40
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_33 := HeatV.sub_nn K O _ _ e5_33
  have d5_35 := HeatV.sub_nn K O _ _ e5_35
  have d5_36 := HeatV.sub_nn K O _ _ e5_36
  have d5_37 := HeatV.sub_nn K O _ _ e5_37
  have d5_38 := HeatV.sub_nn K O _ _ e5_38
  have d5_39 := HeatV.sub_nn K O _ _ e5_39
  have d5_40 := HeatV.sub_nn K O _ _ e5_40
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d6_34 := HeatV.sub_nn K O _ _ e6_34
  have d6_35 := HeatV.sub_nn K O _ _ e6_35
  have d6_36 := HeatV.sub_nn K O _ _ e6_36
  have d6_37 := HeatV.sub_nn K O _ _ e6_37
  have d6_39 := HeatV.sub_nn K O _ _ e6_39
  have d6_40 := HeatV.sub_nn K O _ _ e6_40
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d7_33 := HeatV.sub_nn K O _ _ e7_33
  have d7_35 := HeatV.sub_nn K O _ _ e7_35
  have d7_36 := HeatV.sub_nn K O _ _ e7_36
  have d7_37 := HeatV.sub_nn K O _ _ e7_37
  have d7_38 := HeatV.sub_nn K O _ _ e7_38
  have d7_39 := HeatV.sub_nn K O _ _ e7_39
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_32 := HeatV.sub_nn K O _ _ e8_32
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_34 := HeatV.sub_nn K O _ _ e8_34
  have d8_35 := HeatV.sub_nn K O _ _ e8_35
  have d8_36 := HeatV.sub_nn K O _ _ e8_36
  have d8_37 := HeatV.sub_nn K O _ _ e8_37
  have d8_39 := HeatV.sub_nn K O _ _ e8_39
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d9_34 := HeatV.sub_nn K O _ _ e9_34
  have d9_35 := HeatV.sub_nn K O _ _ e9_35
  have d9_36 := HeatV.sub_nn K O _ _ e9_36
  have d9_37 := HeatV.sub_nn K O _ _ e9_37
  have d9_39 := HeatV.sub_nn K O _ _ e9_39
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_34 := HeatV.sub_nn K O _ _ e10_34
  have d10_36 := HeatV.sub_nn K O _ _ e10_36
  have d10_37 := HeatV.sub_nn K O _ _ e10_37
  have d10_38 := HeatV.sub_nn K O _ _ e10_38
  have d10_39 := HeatV.sub_nn K O _ _ e10_39
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d11_33 := HeatV.sub_nn K O _ _ e11_33
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d11_35 := HeatV.sub_nn K O _ _ e11_35
  have d11_36 := HeatV.sub_nn K O _ _ e11_36
  have d11_37 := HeatV.sub_nn K O _ _ e11_37
  have d11_38 := HeatV.sub_nn K O _ _ e11_38
  have d11_39 := HeatV.sub_nn K O _ _ e11_39
  have d11_40 := HeatV.sub_nn K O _ _ e11_40
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d12_34 := HeatV.sub_nn K O _ _ e12_34
  have d12_36 := HeatV.sub_nn K O _ _ e12_36
  have d12_37 := HeatV.sub_nn K O _ _ e12_37
  have d12_39 := HeatV.sub_nn K O _ _ e12_39
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_33 := HeatV.sub_nn K O _ _ e13_33
  have d13_34 := HeatV.sub_nn K O _ _ e13_34
  have d13_35 := HeatV.sub_nn K O _ _ e13_35
  have d13_36 := HeatV.sub_nn K O _ _ e13_36
  have d13_37 := HeatV.sub_nn K O _ _ e13_37
  have d13_38 := HeatV.sub_nn K O _ _ e13_38
  have d13_39 := HeatV.sub_nn K O _ _ e13_39
  have d13_40 := HeatV.sub_nn K O _ _ e13_40
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d14_32 := HeatV.sub_nn K O _ _ e14_32
  have d14_33 := HeatV.sub_nn K O _ _ e14_33
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d14_35 := HeatV.sub_nn K O _ _ e14_35
  have d14_36 := HeatV.sub_nn K O _ _ e14_36
  have d14_37 := HeatV.sub_nn K O _ _ e14_37
  have d14_38 := HeatV.sub_nn K O _ _ e14_38
  have d14_39 := HeatV.sub_nn K O _ _ e14_39
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_34 := HeatV.sub_nn K O _ _ e15_34
  have d15_35 := HeatV.sub_nn K O _ _ e15_35
  have d15_36 := HeatV.sub_nn K O _ _ e15_36
  have d15_37 := HeatV.sub_nn K O _ _ e15_37
  have d15_38 := HeatV.sub_nn K O _ _ e15_38
  have d15_39 := HeatV.sub_nn K O _ _ e15_39
  have d15_40 := HeatV.sub_nn K O _ _ e15_40
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d16_36 := HeatV.sub_nn K O _ _ e16_36
  have d16_37 := HeatV.sub_nn K O _ _ e16_37
  have d16_38 := HeatV.sub_nn K O _ _ e16_38
  have d16_39 := HeatV.sub_nn K O _ _ e16_39
  have d16_40 := HeatV.sub_nn K O _ _ e16_40
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_34 := HeatV.sub_nn K O _ _ e17_34
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d17_36 := HeatV.sub_nn K O _ _ e17_36
  have d17_37 := HeatV.sub_nn K O _ _ e17_37
  have d17_38 := HeatV.sub_nn K O _ _ e17_38
  have d17_39 := HeatV.sub_nn K O _ _ e17_39
  have d17_40 := HeatV.sub_nn K O _ _ e17_40
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d18_34 := HeatV.sub_nn K O _ _ e18_34
  have d18_35 := HeatV.sub_nn K O _ _ e18_35
  have d18_36 := HeatV.sub_nn K O _ _ e18_36
  have d18_37 := HeatV.sub_nn K O _ _ e18_37
  have d18_38 := HeatV.sub_nn K O _ _ e18_38
  have d18_39 := HeatV.sub_nn K O _ _ e18_39
  have d18_40 := HeatV.sub_nn K O _ _ e18_40
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d19_34 := HeatV.sub_nn K O _ _ e19_34
  have d19_35 := HeatV.sub_nn K O _ _ e19_35
  have d19_36 := HeatV.sub_nn K O _ _ e19_36
  have d19_37 := HeatV.sub_nn K O _ _ e19_37
  have d19_38 := HeatV.sub_nn K O _ _ e19_38
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_34 := HeatV.sub_nn K O _ _ e20_34
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d20_36 := HeatV.sub_nn K O _ _ e20_36
  have d20_37 := HeatV.sub_nn K O _ _ e20_37
  have d20_38 := HeatV.sub_nn K O _ _ e20_38
  have d20_39 := HeatV.sub_nn K O _ _ e20_39
  have d20_40 := HeatV.sub_nn K O _ _ e20_40
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d21_35 := HeatV.sub_nn K O _ _ e21_35
  have d21_36 := HeatV.sub_nn K O _ _ e21_36
  have d21_37 := HeatV.sub_nn K O _ _ e21_37
  have d21_38 := HeatV.sub_nn K O _ _ e21_38
  have d21_39 := HeatV.sub_nn K O _ _ e21_39
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d22_36 := HeatV.sub_nn K O _ _ e22_36
  have d22_38 := HeatV.sub_nn K O _ _ e22_38
  have d22_39 := HeatV.sub_nn K O _ _ e22_39
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d23_36 := HeatV.sub_nn K O _ _ e23_36
  have d23_37 := HeatV.sub_nn K O _ _ e23_37
  have d23_38 := HeatV.sub_nn K O _ _ e23_38
  have d23_39 := HeatV.sub_nn K O _ _ e23_39
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d24_35 := HeatV.sub_nn K O _ _ e24_35
  have d24_36 := HeatV.sub_nn K O _ _ e24_36
  have d24_37 := HeatV.sub_nn K O _ _ e24_37
  have d24_38 := HeatV.sub_nn K O _ _ e24_38
  have d24_39 := HeatV.sub_nn K O _ _ e24_39
  have d24_40 := HeatV.sub_nn K O _ _ e24_40
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d25_35 := HeatV.sub_nn K O _ _ e25_35
  have d25_36 := HeatV.sub_nn K O _ _ e25_36
  have d25_37 := HeatV.sub_nn K O _ _ e25_37
  have d25_38 := HeatV.sub_nn K O _ _ e25_38
  have d25_39 := HeatV.sub_nn K O _ _ e25_39
  have d25_40 := HeatV.sub_nn K O _ _ e25_40
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d26_36 := HeatV.sub_nn K O _ _ e26_36
  have d26_37 := HeatV.sub_nn K O _ _ e26_37
  have d26_38 := HeatV.sub_nn K O _ _ e26_38
  have d26_39 := HeatV.sub_nn K O _ _ e26_39
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d27_35 := HeatV.sub_nn K O _ _ e27_35
  have d27_36 := HeatV.sub_nn K O _ _ e27_36
  have d27_37 := HeatV.sub_nn K O _ _ e27_37
  have d27_38 := HeatV.sub_nn K O _ _ e27_38
  have d27_39 := HeatV.sub_nn K O _ _ e27_39
  have d27_40 := HeatV.sub_nn K O _ _ e27_40
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d28_35 := HeatV.sub_nn K O _ _ e28_35
  have d28_36 := HeatV.sub_nn K O _ _ e28_36
  have d28_37 := HeatV.sub_nn K O _ _ e28_37
  have d28_38 := HeatV.sub_nn K O _ _ e28_38
  have d28_39 := HeatV.sub_nn K O _ _ e28_39
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d29_36 := HeatV.sub_nn K O _ _ e29_36
  have d29_37 := HeatV.sub_nn K O _ _ e29_37
  have d29_38 := HeatV.sub_nn K O _ _ e29_38
  have d29_39 := HeatV.sub_nn K O _ _ e29_39
  have d29_40 := HeatV.sub_nn K O _ _ e29_40
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d30_35 := HeatV.sub_nn K O _ _ e30_35
  have d30_36 := HeatV.sub_nn K O _ _ e30_36
  have d30_37 := HeatV.sub_nn K O _ _ e30_37
  have d30_38 := HeatV.sub_nn K O _ _ e30_38
  have d30_39 := HeatV.sub_nn K O _ _ e30_39
  have d30_40 := HeatV.sub_nn K O _ _ e30_40
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d31_35 := HeatV.sub_nn K O _ _ e31_35
  have d31_36 := HeatV.sub_nn K O _ _ e31_36
  have d31_37 := HeatV.sub_nn K O _ _ e31_37
  have d31_38 := HeatV.sub_nn K O _ _ e31_38
  have d31_39 := HeatV.sub_nn K O _ _ e31_39
  have d31_40 := HeatV.sub_nn K O _ _ e31_40
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d32_36 := HeatV.sub_nn K O _ _ e32_36
  have d32_37 := HeatV.sub_nn K O _ _ e32_37
  have d32_38 := HeatV.sub_nn K O _ _ e32_38
  have d32_39 := HeatV.sub_nn K O _ _ e32_39
  have d32_40 := HeatV.sub_nn K O _ _ e32_40
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d33_36 := HeatV.sub_nn K O _ _ e33_36
  have d33_37 := HeatV.sub_nn K O _ _ e33_37
  have d33_38 := HeatV.sub_nn K O _ _ e33_38
  have d33_39 := HeatV.sub_nn K O _ _ e33_39
  have d33_40 := HeatV.sub_nn K O _ _ e33_40
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have d34_36 := HeatV.sub_nn K O _ _ e34_36
  have d34_37 := HeatV.sub_nn K O _ _ e34_37
  have d34_38 := HeatV.sub_nn K O _ _ e34_38
  have d34_39 := HeatV.sub_nn K O _ _ e34_39
  have d34_40 := HeatV.sub_nn K O _ _ e34_40
  have d35_36 := HeatV.sub_nn K O _ _ e35_36
  have d35_37 := HeatV.sub_nn K O _ _ e35_37
  have d35_38 := HeatV.sub_nn K O _ _ e35_38
  have d35_39 := HeatV.sub_nn K O _ _ e35_39
  have d35_40 := HeatV.sub_nn K O _ _ e35_40
  have d36_37 := HeatV.sub_nn K O _ _ e36_37
  have d36_38 := HeatV.sub_nn K O _ _ e36_38
  have d36_39 := HeatV.sub_nn K O _ _ e36_39
  have d36_40 := HeatV.sub_nn K O _ _ e36_40
  have d37_38 := HeatV.sub_nn K O _ _ e37_38
  have d37_39 := HeatV.sub_nn K O _ _ e37_39
  have d37_40 := HeatV.sub_nn K O _ _ e37_40
  have d38_39 := HeatV.sub_nn K O _ _ e38_39
  have d38_40 := HeatV.sub_nn K O _ _ e38_40
  have d39_40 := HeatV.sub_nn K O _ _ e39_40
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+139258 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 152300281) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 40) a39)) (K.mul (K.mul   -- (+4497 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..41, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 41 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 152300281) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 40) (A 39))) (K.mul (K.mul (cN K 2) (A 1)) (  -- (+4961 chars; full line in the Zenodo source)
      (K.mul (cN K 152041120) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 41) (A 40))) (K.mul (K.mul (cN K 2) (A 1  -- (+4961 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (A 37) (A 38) (A 39) (A 40) (A 41) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hnn 7) (hnn 8) (hnn 9) (hnn 10) (hnn 11) (hn  -- (+266 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 41 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 41 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 41 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 41 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 41 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 41 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 41 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+44813 chars; full line in the Zenodo source)

end G61Lv40

#print axioms G61Lv40.add_nn
#print axioms G61Lv40.level
#print axioms G61Lv40.level_fun

ym/G61Lv41.lean

lean_all/ym/G61Lv41.lean

/-
  ym/G61Lv41 — T45, G61a at level n = 41 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv41

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 a42 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a7) (p8 : O.le K.zero  -- (+818 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+39744 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 175403536) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 41) a40)) (K.mul (K.mul (cN K 2) a1) (K.  -- (+4589 chars; full line in the Zenodo source)
      (K.mul (cN K 175118790) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 42) a41)) (K.mul (K.mul (cN K 2) a1)  -- (+4592 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_29 := HeatV.sub_nn K O _ _ e0_29
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_32 := HeatV.sub_nn K O _ _ e0_32
  have d0_33 := HeatV.sub_nn K O _ _ e0_33
  have d0_34 := HeatV.sub_nn K O _ _ e0_34
  have d0_35 := HeatV.sub_nn K O _ _ e0_35
  have d0_36 := HeatV.sub_nn K O _ _ e0_36
  have d0_37 := HeatV.sub_nn K O _ _ e0_37
  have d0_38 := HeatV.sub_nn K O _ _ e0_38
  have d0_39 := HeatV.sub_nn K O _ _ e0_39
  have d0_41 := HeatV.sub_nn K O _ _ e0_41
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_29 := HeatV.sub_nn K O _ _ e1_29
  have d1_30 := HeatV.sub_nn K O _ _ e1_30
  have d1_31 := HeatV.sub_nn K O _ _ e1_31
  have d1_32 := HeatV.sub_nn K O _ _ e1_32
  have d1_34 := HeatV.sub_nn K O _ _ e1_34
  have d1_35 := HeatV.sub_nn K O _ _ e1_35
  have d1_38 := HeatV.sub_nn K O _ _ e1_38
  have d1_39 := HeatV.sub_nn K O _ _ e1_39
  have d1_40 := HeatV.sub_nn K O _ _ e1_40
  have d1_41 := HeatV.sub_nn K O _ _ e1_41
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_34 := HeatV.sub_nn K O _ _ e2_34
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d2_36 := HeatV.sub_nn K O _ _ e2_36
  have d2_37 := HeatV.sub_nn K O _ _ e2_37
  have d2_39 := HeatV.sub_nn K O _ _ e2_39
  have d2_40 := HeatV.sub_nn K O _ _ e2_40
  have d2_41 := HeatV.sub_nn K O _ _ e2_41
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d3_34 := HeatV.sub_nn K O _ _ e3_34
  have d3_35 := HeatV.sub_nn K O _ _ e3_35
  have d3_36 := HeatV.sub_nn K O _ _ e3_36
  have d3_38 := HeatV.sub_nn K O _ _ e3_38
  have d3_39 := HeatV.sub_nn K O _ _ e3_39
  have d3_40 := HeatV.sub_nn K O _ _ e3_40
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d4_34 := HeatV.sub_nn K O _ _ e4_34
  have d4_35 := HeatV.sub_nn K O _ _ e4_35
  have d4_37 := HeatV.sub_nn K O _ _ e4_37
  have d4_38 := HeatV.sub_nn K O _ _ e4_38
  have d4_39 := HeatV.sub_nn K O _ _ e4_39
  have d4_40 := HeatV.sub_nn K O _ _ e4_40
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d5_33 := HeatV.sub_nn K O _ _ e5_33
  have d5_34 := HeatV.sub_nn K O _ _ e5_34
  have d5_36 := HeatV.sub_nn K O _ _ e5_36
  have d5_37 := HeatV.sub_nn K O _ _ e5_37
  have d5_38 := HeatV.sub_nn K O _ _ e5_38
  have d5_39 := HeatV.sub_nn K O _ _ e5_39
  have d5_40 := HeatV.sub_nn K O _ _ e5_40
  have d5_41 := HeatV.sub_nn K O _ _ e5_41
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d6_33 := HeatV.sub_nn K O _ _ e6_33
  have d6_35 := HeatV.sub_nn K O _ _ e6_35
  have d6_36 := HeatV.sub_nn K O _ _ e6_36
  have d6_37 := HeatV.sub_nn K O _ _ e6_37
  have d6_38 := HeatV.sub_nn K O _ _ e6_38
  have d6_39 := HeatV.sub_nn K O _ _ e6_39
  have d6_40 := HeatV.sub_nn K O _ _ e6_40
  have d6_41 := HeatV.sub_nn K O _ _ e6_41
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d7_34 := HeatV.sub_nn K O _ _ e7_34
  have d7_35 := HeatV.sub_nn K O _ _ e7_35
  have d7_36 := HeatV.sub_nn K O _ _ e7_36
  have d7_37 := HeatV.sub_nn K O _ _ e7_37
  have d7_40 := HeatV.sub_nn K O _ _ e7_40
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_34 := HeatV.sub_nn K O _ _ e8_34
  have d8_35 := HeatV.sub_nn K O _ _ e8_35
  have d8_36 := HeatV.sub_nn K O _ _ e8_36
  have d8_37 := HeatV.sub_nn K O _ _ e8_37
  have d8_38 := HeatV.sub_nn K O _ _ e8_38
  have d8_39 := HeatV.sub_nn K O _ _ e8_39
  have d8_40 := HeatV.sub_nn K O _ _ e8_40
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d9_34 := HeatV.sub_nn K O _ _ e9_34
  have d9_35 := HeatV.sub_nn K O _ _ e9_35
  have d9_36 := HeatV.sub_nn K O _ _ e9_36
  have d9_37 := HeatV.sub_nn K O _ _ e9_37
  have d9_38 := HeatV.sub_nn K O _ _ e9_38
  have d9_39 := HeatV.sub_nn K O _ _ e9_39
  have d9_40 := HeatV.sub_nn K O _ _ e9_40
  have d9_41 := HeatV.sub_nn K O _ _ e9_41
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_34 := HeatV.sub_nn K O _ _ e10_34
  have d10_35 := HeatV.sub_nn K O _ _ e10_35
  have d10_37 := HeatV.sub_nn K O _ _ e10_37
  have d10_38 := HeatV.sub_nn K O _ _ e10_38
  have d10_39 := HeatV.sub_nn K O _ _ e10_39
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d11_33 := HeatV.sub_nn K O _ _ e11_33
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d11_35 := HeatV.sub_nn K O _ _ e11_35
  have d11_36 := HeatV.sub_nn K O _ _ e11_36
  have d11_37 := HeatV.sub_nn K O _ _ e11_37
  have d11_38 := HeatV.sub_nn K O _ _ e11_38
  have d11_39 := HeatV.sub_nn K O _ _ e11_39
  have d11_40 := HeatV.sub_nn K O _ _ e11_40
  have d11_41 := HeatV.sub_nn K O _ _ e11_41
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d12_34 := HeatV.sub_nn K O _ _ e12_34
  have d12_35 := HeatV.sub_nn K O _ _ e12_35
  have d12_36 := HeatV.sub_nn K O _ _ e12_36
  have d12_37 := HeatV.sub_nn K O _ _ e12_37
  have d12_38 := HeatV.sub_nn K O _ _ e12_38
  have d12_39 := HeatV.sub_nn K O _ _ e12_39
  have d12_40 := HeatV.sub_nn K O _ _ e12_40
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_33 := HeatV.sub_nn K O _ _ e13_33
  have d13_34 := HeatV.sub_nn K O _ _ e13_34
  have d13_35 := HeatV.sub_nn K O _ _ e13_35
  have d13_36 := HeatV.sub_nn K O _ _ e13_36
  have d13_37 := HeatV.sub_nn K O _ _ e13_37
  have d13_39 := HeatV.sub_nn K O _ _ e13_39
  have d13_41 := HeatV.sub_nn K O _ _ e13_41
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d14_32 := HeatV.sub_nn K O _ _ e14_32
  have d14_33 := HeatV.sub_nn K O _ _ e14_33
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d14_35 := HeatV.sub_nn K O _ _ e14_35
  have d14_36 := HeatV.sub_nn K O _ _ e14_36
  have d14_37 := HeatV.sub_nn K O _ _ e14_37
  have d14_38 := HeatV.sub_nn K O _ _ e14_38
  have d14_39 := HeatV.sub_nn K O _ _ e14_39
  have d14_40 := HeatV.sub_nn K O _ _ e14_40
  have d14_41 := HeatV.sub_nn K O _ _ e14_41
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_34 := HeatV.sub_nn K O _ _ e15_34
  have d15_35 := HeatV.sub_nn K O _ _ e15_35
  have d15_36 := HeatV.sub_nn K O _ _ e15_36
  have d15_37 := HeatV.sub_nn K O _ _ e15_37
  have d15_38 := HeatV.sub_nn K O _ _ e15_38
  have d15_39 := HeatV.sub_nn K O _ _ e15_39
  have d15_40 := HeatV.sub_nn K O _ _ e15_40
  have d15_41 := HeatV.sub_nn K O _ _ e15_41
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d16_36 := HeatV.sub_nn K O _ _ e16_36
  have d16_37 := HeatV.sub_nn K O _ _ e16_37
  have d16_38 := HeatV.sub_nn K O _ _ e16_38
  have d16_39 := HeatV.sub_nn K O _ _ e16_39
  have d16_40 := HeatV.sub_nn K O _ _ e16_40
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_34 := HeatV.sub_nn K O _ _ e17_34
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d17_36 := HeatV.sub_nn K O _ _ e17_36
  have d17_37 := HeatV.sub_nn K O _ _ e17_37
  have d17_38 := HeatV.sub_nn K O _ _ e17_38
  have d17_39 := HeatV.sub_nn K O _ _ e17_39
  have d17_40 := HeatV.sub_nn K O _ _ e17_40
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d18_34 := HeatV.sub_nn K O _ _ e18_34
  have d18_35 := HeatV.sub_nn K O _ _ e18_35
  have d18_36 := HeatV.sub_nn K O _ _ e18_36
  have d18_37 := HeatV.sub_nn K O _ _ e18_37
  have d18_38 := HeatV.sub_nn K O _ _ e18_38
  have d18_39 := HeatV.sub_nn K O _ _ e18_39
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d19_34 := HeatV.sub_nn K O _ _ e19_34
  have d19_35 := HeatV.sub_nn K O _ _ e19_35
  have d19_36 := HeatV.sub_nn K O _ _ e19_36
  have d19_37 := HeatV.sub_nn K O _ _ e19_37
  have d19_38 := HeatV.sub_nn K O _ _ e19_38
  have d19_39 := HeatV.sub_nn K O _ _ e19_39
  have d19_40 := HeatV.sub_nn K O _ _ e19_40
  have d19_41 := HeatV.sub_nn K O _ _ e19_41
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_34 := HeatV.sub_nn K O _ _ e20_34
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d20_36 := HeatV.sub_nn K O _ _ e20_36
  have d20_37 := HeatV.sub_nn K O _ _ e20_37
  have d20_38 := HeatV.sub_nn K O _ _ e20_38
  have d20_39 := HeatV.sub_nn K O _ _ e20_39
  have d20_40 := HeatV.sub_nn K O _ _ e20_40
  have d20_41 := HeatV.sub_nn K O _ _ e20_41
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d21_35 := HeatV.sub_nn K O _ _ e21_35
  have d21_36 := HeatV.sub_nn K O _ _ e21_36
  have d21_37 := HeatV.sub_nn K O _ _ e21_37
  have d21_38 := HeatV.sub_nn K O _ _ e21_38
  have d21_39 := HeatV.sub_nn K O _ _ e21_39
  have d21_40 := HeatV.sub_nn K O _ _ e21_40
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d22_36 := HeatV.sub_nn K O _ _ e22_36
  have d22_37 := HeatV.sub_nn K O _ _ e22_37
  have d22_38 := HeatV.sub_nn K O _ _ e22_38
  have d22_39 := HeatV.sub_nn K O _ _ e22_39
  have d22_40 := HeatV.sub_nn K O _ _ e22_40
  have d22_41 := HeatV.sub_nn K O _ _ e22_41
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d23_36 := HeatV.sub_nn K O _ _ e23_36
  have d23_37 := HeatV.sub_nn K O _ _ e23_37
  have d23_38 := HeatV.sub_nn K O _ _ e23_38
  have d23_39 := HeatV.sub_nn K O _ _ e23_39
  have d23_40 := HeatV.sub_nn K O _ _ e23_40
  have d23_41 := HeatV.sub_nn K O _ _ e23_41
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d24_35 := HeatV.sub_nn K O _ _ e24_35
  have d24_36 := HeatV.sub_nn K O _ _ e24_36
  have d24_37 := HeatV.sub_nn K O _ _ e24_37
  have d24_38 := HeatV.sub_nn K O _ _ e24_38
  have d24_39 := HeatV.sub_nn K O _ _ e24_39
  have d24_40 := HeatV.sub_nn K O _ _ e24_40
  have d24_41 := HeatV.sub_nn K O _ _ e24_41
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d25_35 := HeatV.sub_nn K O _ _ e25_35
  have d25_36 := HeatV.sub_nn K O _ _ e25_36
  have d25_37 := HeatV.sub_nn K O _ _ e25_37
  have d25_38 := HeatV.sub_nn K O _ _ e25_38
  have d25_39 := HeatV.sub_nn K O _ _ e25_39
  have d25_40 := HeatV.sub_nn K O _ _ e25_40
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d26_36 := HeatV.sub_nn K O _ _ e26_36
  have d26_37 := HeatV.sub_nn K O _ _ e26_37
  have d26_38 := HeatV.sub_nn K O _ _ e26_38
  have d26_39 := HeatV.sub_nn K O _ _ e26_39
  have d26_40 := HeatV.sub_nn K O _ _ e26_40
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d27_35 := HeatV.sub_nn K O _ _ e27_35
  have d27_36 := HeatV.sub_nn K O _ _ e27_36
  have d27_37 := HeatV.sub_nn K O _ _ e27_37
  have d27_38 := HeatV.sub_nn K O _ _ e27_38
  have d27_39 := HeatV.sub_nn K O _ _ e27_39
  have d27_40 := HeatV.sub_nn K O _ _ e27_40
  have d27_41 := HeatV.sub_nn K O _ _ e27_41
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d28_35 := HeatV.sub_nn K O _ _ e28_35
  have d28_36 := HeatV.sub_nn K O _ _ e28_36
  have d28_37 := HeatV.sub_nn K O _ _ e28_37
  have d28_38 := HeatV.sub_nn K O _ _ e28_38
  have d28_39 := HeatV.sub_nn K O _ _ e28_39
  have d28_40 := HeatV.sub_nn K O _ _ e28_40
  have d28_41 := HeatV.sub_nn K O _ _ e28_41
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d29_36 := HeatV.sub_nn K O _ _ e29_36
  have d29_37 := HeatV.sub_nn K O _ _ e29_37
  have d29_38 := HeatV.sub_nn K O _ _ e29_38
  have d29_39 := HeatV.sub_nn K O _ _ e29_39
  have d29_40 := HeatV.sub_nn K O _ _ e29_40
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d30_35 := HeatV.sub_nn K O _ _ e30_35
  have d30_36 := HeatV.sub_nn K O _ _ e30_36
  have d30_37 := HeatV.sub_nn K O _ _ e30_37
  have d30_38 := HeatV.sub_nn K O _ _ e30_38
  have d30_39 := HeatV.sub_nn K O _ _ e30_39
  have d30_40 := HeatV.sub_nn K O _ _ e30_40
  have d30_41 := HeatV.sub_nn K O _ _ e30_41
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d31_35 := HeatV.sub_nn K O _ _ e31_35
  have d31_36 := HeatV.sub_nn K O _ _ e31_36
  have d31_37 := HeatV.sub_nn K O _ _ e31_37
  have d31_38 := HeatV.sub_nn K O _ _ e31_38
  have d31_39 := HeatV.sub_nn K O _ _ e31_39
  have d31_40 := HeatV.sub_nn K O _ _ e31_40
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d32_36 := HeatV.sub_nn K O _ _ e32_36
  have d32_37 := HeatV.sub_nn K O _ _ e32_37
  have d32_38 := HeatV.sub_nn K O _ _ e32_38
  have d32_39 := HeatV.sub_nn K O _ _ e32_39
  have d32_40 := HeatV.sub_nn K O _ _ e32_40
  have d32_41 := HeatV.sub_nn K O _ _ e32_41
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d33_36 := HeatV.sub_nn K O _ _ e33_36
  have d33_37 := HeatV.sub_nn K O _ _ e33_37
  have d33_38 := HeatV.sub_nn K O _ _ e33_38
  have d33_39 := HeatV.sub_nn K O _ _ e33_39
  have d33_40 := HeatV.sub_nn K O _ _ e33_40
  have d33_41 := HeatV.sub_nn K O _ _ e33_41
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have d34_36 := HeatV.sub_nn K O _ _ e34_36
  have d34_37 := HeatV.sub_nn K O _ _ e34_37
  have d34_38 := HeatV.sub_nn K O _ _ e34_38
  have d34_39 := HeatV.sub_nn K O _ _ e34_39
  have d34_40 := HeatV.sub_nn K O _ _ e34_40
  have d34_41 := HeatV.sub_nn K O _ _ e34_41
  have d35_36 := HeatV.sub_nn K O _ _ e35_36
  have d35_37 := HeatV.sub_nn K O _ _ e35_37
  have d35_38 := HeatV.sub_nn K O _ _ e35_38
  have d35_39 := HeatV.sub_nn K O _ _ e35_39
  have d35_40 := HeatV.sub_nn K O _ _ e35_40
  have d35_41 := HeatV.sub_nn K O _ _ e35_41
  have d36_37 := HeatV.sub_nn K O _ _ e36_37
  have d36_38 := HeatV.sub_nn K O _ _ e36_38
  have d36_39 := HeatV.sub_nn K O _ _ e36_39
  have d36_40 := HeatV.sub_nn K O _ _ e36_40
  have d36_41 := HeatV.sub_nn K O _ _ e36_41
  have d37_38 := HeatV.sub_nn K O _ _ e37_38
  have d37_39 := HeatV.sub_nn K O _ _ e37_39
  have d37_40 := HeatV.sub_nn K O _ _ e37_40
  have d37_41 := HeatV.sub_nn K O _ _ e37_41
  have d38_39 := HeatV.sub_nn K O _ _ e38_39
  have d38_40 := HeatV.sub_nn K O _ _ e38_40
  have d38_41 := HeatV.sub_nn K O _ _ e38_41
  have d39_40 := HeatV.sub_nn K O _ _ e39_40
  have d39_41 := HeatV.sub_nn K O _ _ e39_41
  have d40_41 := HeatV.sub_nn K O _ _ e40_41
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+148608 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 175403536) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 41) a40)) (K.mul   -- (+4617 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..42, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 42 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 175403536) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 41) (A 40))) (K.mul (K.mul (cN K 2) (  -- (+5093 chars; full line in the Zenodo source)
      (K.mul (cN K 175118790) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 42) (A 41))) (K.mul (K.mul (cN K   -- (+5093 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (A 37) (A 38) (A 39) (A 40) (A 41) (A 42) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hnn 7) (hnn 8) (hnn 9) (hnn 10) (hnn   -- (+282 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 42 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 42 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 42 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 42 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 42 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 42 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 42 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+47089 chars; full line in the Zenodo source)

end G61Lv41

#print axioms G61Lv41.add_nn
#print axioms G61Lv41.level
#print axioms G61Lv41.level_fun

ym/G61Lv42.lean

lean_all/ym/G61Lv42.lean

/-
  ym/G61Lv42 — T45, G61a at level n = 42 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv42

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 a42 a43 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a7) (p8 : O.le K.  -- (+846 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+41731 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 201356100) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 42) a41)) (K.mul (K.mul (cN K 2)   -- (+4709 chars; full line in the Zenodo source)
      (K.mul (cN K 201043920) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 43) a42)) (K.mul (K.mul (cN K  -- (+4712 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_29 := HeatV.sub_nn K O _ _ e0_29
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_32 := HeatV.sub_nn K O _ _ e0_32
  have d0_33 := HeatV.sub_nn K O _ _ e0_33
  have d0_34 := HeatV.sub_nn K O _ _ e0_34
  have d0_35 := HeatV.sub_nn K O _ _ e0_35
  have d0_38 := HeatV.sub_nn K O _ _ e0_38
  have d0_40 := HeatV.sub_nn K O _ _ e0_40
  have d0_41 := HeatV.sub_nn K O _ _ e0_41
  have d0_42 := HeatV.sub_nn K O _ _ e0_42
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_29 := HeatV.sub_nn K O _ _ e1_29
  have d1_30 := HeatV.sub_nn K O _ _ e1_30
  have d1_31 := HeatV.sub_nn K O _ _ e1_31
  have d1_32 := HeatV.sub_nn K O _ _ e1_32
  have d1_33 := HeatV.sub_nn K O _ _ e1_33
  have d1_37 := HeatV.sub_nn K O _ _ e1_37
  have d1_38 := HeatV.sub_nn K O _ _ e1_38
  have d1_41 := HeatV.sub_nn K O _ _ e1_41
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_33 := HeatV.sub_nn K O _ _ e2_33
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d2_36 := HeatV.sub_nn K O _ _ e2_36
  have d2_37 := HeatV.sub_nn K O _ _ e2_37
  have d2_38 := HeatV.sub_nn K O _ _ e2_38
  have d2_39 := HeatV.sub_nn K O _ _ e2_39
  have d2_40 := HeatV.sub_nn K O _ _ e2_40
  have d2_41 := HeatV.sub_nn K O _ _ e2_41
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d3_34 := HeatV.sub_nn K O _ _ e3_34
  have d3_35 := HeatV.sub_nn K O _ _ e3_35
  have d3_36 := HeatV.sub_nn K O _ _ e3_36
  have d3_37 := HeatV.sub_nn K O _ _ e3_37
  have d3_38 := HeatV.sub_nn K O _ _ e3_38
  have d3_39 := HeatV.sub_nn K O _ _ e3_39
  have d3_40 := HeatV.sub_nn K O _ _ e3_40
  have d3_41 := HeatV.sub_nn K O _ _ e3_41
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d4_35 := HeatV.sub_nn K O _ _ e4_35
  have d4_36 := HeatV.sub_nn K O _ _ e4_36
  have d4_37 := HeatV.sub_nn K O _ _ e4_37
  have d4_38 := HeatV.sub_nn K O _ _ e4_38
  have d4_39 := HeatV.sub_nn K O _ _ e4_39
  have d4_40 := HeatV.sub_nn K O _ _ e4_40
  have d4_41 := HeatV.sub_nn K O _ _ e4_41
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_33 := HeatV.sub_nn K O _ _ e5_33
  have d5_34 := HeatV.sub_nn K O _ _ e5_34
  have d5_37 := HeatV.sub_nn K O _ _ e5_37
  have d5_38 := HeatV.sub_nn K O _ _ e5_38
  have d5_39 := HeatV.sub_nn K O _ _ e5_39
  have d5_40 := HeatV.sub_nn K O _ _ e5_40
  have d5_42 := HeatV.sub_nn K O _ _ e5_42
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d6_33 := HeatV.sub_nn K O _ _ e6_33
  have d6_34 := HeatV.sub_nn K O _ _ e6_34
  have d6_35 := HeatV.sub_nn K O _ _ e6_35
  have d6_36 := HeatV.sub_nn K O _ _ e6_36
  have d6_37 := HeatV.sub_nn K O _ _ e6_37
  have d6_38 := HeatV.sub_nn K O _ _ e6_38
  have d6_39 := HeatV.sub_nn K O _ _ e6_39
  have d6_41 := HeatV.sub_nn K O _ _ e6_41
  have d6_42 := HeatV.sub_nn K O _ _ e6_42
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d7_33 := HeatV.sub_nn K O _ _ e7_33
  have d7_35 := HeatV.sub_nn K O _ _ e7_35
  have d7_36 := HeatV.sub_nn K O _ _ e7_36
  have d7_37 := HeatV.sub_nn K O _ _ e7_37
  have d7_38 := HeatV.sub_nn K O _ _ e7_38
  have d7_41 := HeatV.sub_nn K O _ _ e7_41
  have d7_42 := HeatV.sub_nn K O _ _ e7_42
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_32 := HeatV.sub_nn K O _ _ e8_32
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_34 := HeatV.sub_nn K O _ _ e8_34
  have d8_35 := HeatV.sub_nn K O _ _ e8_35
  have d8_36 := HeatV.sub_nn K O _ _ e8_36
  have d8_37 := HeatV.sub_nn K O _ _ e8_37
  have d8_38 := HeatV.sub_nn K O _ _ e8_38
  have d8_39 := HeatV.sub_nn K O _ _ e8_39
  have d8_40 := HeatV.sub_nn K O _ _ e8_40
  have d8_41 := HeatV.sub_nn K O _ _ e8_41
  have d8_42 := HeatV.sub_nn K O _ _ e8_42
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d9_34 := HeatV.sub_nn K O _ _ e9_34
  have d9_35 := HeatV.sub_nn K O _ _ e9_35
  have d9_36 := HeatV.sub_nn K O _ _ e9_36
  have d9_38 := HeatV.sub_nn K O _ _ e9_38
  have d9_39 := HeatV.sub_nn K O _ _ e9_39
  have d9_40 := HeatV.sub_nn K O _ _ e9_40
  have d9_41 := HeatV.sub_nn K O _ _ e9_41
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_34 := HeatV.sub_nn K O _ _ e10_34
  have d10_35 := HeatV.sub_nn K O _ _ e10_35
  have d10_36 := HeatV.sub_nn K O _ _ e10_36
  have d10_37 := HeatV.sub_nn K O _ _ e10_37
  have d10_38 := HeatV.sub_nn K O _ _ e10_38
  have d10_39 := HeatV.sub_nn K O _ _ e10_39
  have d10_40 := HeatV.sub_nn K O _ _ e10_40
  have d10_41 := HeatV.sub_nn K O _ _ e10_41
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d11_33 := HeatV.sub_nn K O _ _ e11_33
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d11_35 := HeatV.sub_nn K O _ _ e11_35
  have d11_36 := HeatV.sub_nn K O _ _ e11_36
  have d11_37 := HeatV.sub_nn K O _ _ e11_37
  have d11_38 := HeatV.sub_nn K O _ _ e11_38
  have d11_39 := HeatV.sub_nn K O _ _ e11_39
  have d11_40 := HeatV.sub_nn K O _ _ e11_40
  have d11_41 := HeatV.sub_nn K O _ _ e11_41
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d12_34 := HeatV.sub_nn K O _ _ e12_34
  have d12_35 := HeatV.sub_nn K O _ _ e12_35
  have d12_36 := HeatV.sub_nn K O _ _ e12_36
  have d12_37 := HeatV.sub_nn K O _ _ e12_37
  have d12_38 := HeatV.sub_nn K O _ _ e12_38
  have d12_39 := HeatV.sub_nn K O _ _ e12_39
  have d12_40 := HeatV.sub_nn K O _ _ e12_40
  have d12_41 := HeatV.sub_nn K O _ _ e12_41
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_33 := HeatV.sub_nn K O _ _ e13_33
  have d13_34 := HeatV.sub_nn K O _ _ e13_34
  have d13_35 := HeatV.sub_nn K O _ _ e13_35
  have d13_36 := HeatV.sub_nn K O _ _ e13_36
  have d13_37 := HeatV.sub_nn K O _ _ e13_37
  have d13_38 := HeatV.sub_nn K O _ _ e13_38
  have d13_39 := HeatV.sub_nn K O _ _ e13_39
  have d13_40 := HeatV.sub_nn K O _ _ e13_40
  have d13_41 := HeatV.sub_nn K O _ _ e13_41
  have d13_42 := HeatV.sub_nn K O _ _ e13_42
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d14_32 := HeatV.sub_nn K O _ _ e14_32
  have d14_33 := HeatV.sub_nn K O _ _ e14_33
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d14_35 := HeatV.sub_nn K O _ _ e14_35
  have d14_36 := HeatV.sub_nn K O _ _ e14_36
  have d14_37 := HeatV.sub_nn K O _ _ e14_37
  have d14_38 := HeatV.sub_nn K O _ _ e14_38
  have d14_39 := HeatV.sub_nn K O _ _ e14_39
  have d14_40 := HeatV.sub_nn K O _ _ e14_40
  have d14_41 := HeatV.sub_nn K O _ _ e14_41
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_34 := HeatV.sub_nn K O _ _ e15_34
  have d15_35 := HeatV.sub_nn K O _ _ e15_35
  have d15_36 := HeatV.sub_nn K O _ _ e15_36
  have d15_37 := HeatV.sub_nn K O _ _ e15_37
  have d15_38 := HeatV.sub_nn K O _ _ e15_38
  have d15_39 := HeatV.sub_nn K O _ _ e15_39
  have d15_40 := HeatV.sub_nn K O _ _ e15_40
  have d15_41 := HeatV.sub_nn K O _ _ e15_41
  have d15_42 := HeatV.sub_nn K O _ _ e15_42
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d16_36 := HeatV.sub_nn K O _ _ e16_36
  have d16_37 := HeatV.sub_nn K O _ _ e16_37
  have d16_38 := HeatV.sub_nn K O _ _ e16_38
  have d16_39 := HeatV.sub_nn K O _ _ e16_39
  have d16_40 := HeatV.sub_nn K O _ _ e16_40
  have d16_41 := HeatV.sub_nn K O _ _ e16_41
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_34 := HeatV.sub_nn K O _ _ e17_34
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d17_36 := HeatV.sub_nn K O _ _ e17_36
  have d17_37 := HeatV.sub_nn K O _ _ e17_37
  have d17_38 := HeatV.sub_nn K O _ _ e17_38
  have d17_39 := HeatV.sub_nn K O _ _ e17_39
  have d17_40 := HeatV.sub_nn K O _ _ e17_40
  have d17_41 := HeatV.sub_nn K O _ _ e17_41
  have d17_42 := HeatV.sub_nn K O _ _ e17_42
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d18_34 := HeatV.sub_nn K O _ _ e18_34
  have d18_35 := HeatV.sub_nn K O _ _ e18_35
  have d18_36 := HeatV.sub_nn K O _ _ e18_36
  have d18_37 := HeatV.sub_nn K O _ _ e18_37
  have d18_38 := HeatV.sub_nn K O _ _ e18_38
  have d18_39 := HeatV.sub_nn K O _ _ e18_39
  have d18_40 := HeatV.sub_nn K O _ _ e18_40
  have d18_41 := HeatV.sub_nn K O _ _ e18_41
  have d18_42 := HeatV.sub_nn K O _ _ e18_42
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d19_34 := HeatV.sub_nn K O _ _ e19_34
  have d19_35 := HeatV.sub_nn K O _ _ e19_35
  have d19_36 := HeatV.sub_nn K O _ _ e19_36
  have d19_37 := HeatV.sub_nn K O _ _ e19_37
  have d19_38 := HeatV.sub_nn K O _ _ e19_38
  have d19_39 := HeatV.sub_nn K O _ _ e19_39
  have d19_40 := HeatV.sub_nn K O _ _ e19_40
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_34 := HeatV.sub_nn K O _ _ e20_34
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d20_36 := HeatV.sub_nn K O _ _ e20_36
  have d20_37 := HeatV.sub_nn K O _ _ e20_37
  have d20_38 := HeatV.sub_nn K O _ _ e20_38
  have d20_39 := HeatV.sub_nn K O _ _ e20_39
  have d20_40 := HeatV.sub_nn K O _ _ e20_40
  have d20_41 := HeatV.sub_nn K O _ _ e20_41
  have d20_42 := HeatV.sub_nn K O _ _ e20_42
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d21_35 := HeatV.sub_nn K O _ _ e21_35
  have d21_36 := HeatV.sub_nn K O _ _ e21_36
  have d21_37 := HeatV.sub_nn K O _ _ e21_37
  have d21_38 := HeatV.sub_nn K O _ _ e21_38
  have d21_39 := HeatV.sub_nn K O _ _ e21_39
  have d21_40 := HeatV.sub_nn K O _ _ e21_40
  have d21_41 := HeatV.sub_nn K O _ _ e21_41
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d22_36 := HeatV.sub_nn K O _ _ e22_36
  have d22_37 := HeatV.sub_nn K O _ _ e22_37
  have d22_38 := HeatV.sub_nn K O _ _ e22_38
  have d22_39 := HeatV.sub_nn K O _ _ e22_39
  have d22_40 := HeatV.sub_nn K O _ _ e22_40
  have d22_41 := HeatV.sub_nn K O _ _ e22_41
  have d22_42 := HeatV.sub_nn K O _ _ e22_42
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d23_36 := HeatV.sub_nn K O _ _ e23_36
  have d23_37 := HeatV.sub_nn K O _ _ e23_37
  have d23_38 := HeatV.sub_nn K O _ _ e23_38
  have d23_39 := HeatV.sub_nn K O _ _ e23_39
  have d23_40 := HeatV.sub_nn K O _ _ e23_40
  have d23_41 := HeatV.sub_nn K O _ _ e23_41
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d24_35 := HeatV.sub_nn K O _ _ e24_35
  have d24_36 := HeatV.sub_nn K O _ _ e24_36
  have d24_37 := HeatV.sub_nn K O _ _ e24_37
  have d24_38 := HeatV.sub_nn K O _ _ e24_38
  have d24_39 := HeatV.sub_nn K O _ _ e24_39
  have d24_40 := HeatV.sub_nn K O _ _ e24_40
  have d24_41 := HeatV.sub_nn K O _ _ e24_41
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d25_35 := HeatV.sub_nn K O _ _ e25_35
  have d25_36 := HeatV.sub_nn K O _ _ e25_36
  have d25_37 := HeatV.sub_nn K O _ _ e25_37
  have d25_38 := HeatV.sub_nn K O _ _ e25_38
  have d25_39 := HeatV.sub_nn K O _ _ e25_39
  have d25_40 := HeatV.sub_nn K O _ _ e25_40
  have d25_41 := HeatV.sub_nn K O _ _ e25_41
  have d25_42 := HeatV.sub_nn K O _ _ e25_42
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d26_36 := HeatV.sub_nn K O _ _ e26_36
  have d26_37 := HeatV.sub_nn K O _ _ e26_37
  have d26_38 := HeatV.sub_nn K O _ _ e26_38
  have d26_39 := HeatV.sub_nn K O _ _ e26_39
  have d26_40 := HeatV.sub_nn K O _ _ e26_40
  have d26_41 := HeatV.sub_nn K O _ _ e26_41
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d27_35 := HeatV.sub_nn K O _ _ e27_35
  have d27_36 := HeatV.sub_nn K O _ _ e27_36
  have d27_37 := HeatV.sub_nn K O _ _ e27_37
  have d27_38 := HeatV.sub_nn K O _ _ e27_38
  have d27_39 := HeatV.sub_nn K O _ _ e27_39
  have d27_40 := HeatV.sub_nn K O _ _ e27_40
  have d27_41 := HeatV.sub_nn K O _ _ e27_41
  have d27_42 := HeatV.sub_nn K O _ _ e27_42
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d28_35 := HeatV.sub_nn K O _ _ e28_35
  have d28_36 := HeatV.sub_nn K O _ _ e28_36
  have d28_37 := HeatV.sub_nn K O _ _ e28_37
  have d28_38 := HeatV.sub_nn K O _ _ e28_38
  have d28_39 := HeatV.sub_nn K O _ _ e28_39
  have d28_40 := HeatV.sub_nn K O _ _ e28_40
  have d28_41 := HeatV.sub_nn K O _ _ e28_41
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d29_36 := HeatV.sub_nn K O _ _ e29_36
  have d29_37 := HeatV.sub_nn K O _ _ e29_37
  have d29_38 := HeatV.sub_nn K O _ _ e29_38
  have d29_39 := HeatV.sub_nn K O _ _ e29_39
  have d29_40 := HeatV.sub_nn K O _ _ e29_40
  have d29_41 := HeatV.sub_nn K O _ _ e29_41
  have d29_42 := HeatV.sub_nn K O _ _ e29_42
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d30_35 := HeatV.sub_nn K O _ _ e30_35
  have d30_36 := HeatV.sub_nn K O _ _ e30_36
  have d30_37 := HeatV.sub_nn K O _ _ e30_37
  have d30_38 := HeatV.sub_nn K O _ _ e30_38
  have d30_39 := HeatV.sub_nn K O _ _ e30_39
  have d30_40 := HeatV.sub_nn K O _ _ e30_40
  have d30_41 := HeatV.sub_nn K O _ _ e30_41
  have d30_42 := HeatV.sub_nn K O _ _ e30_42
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d31_35 := HeatV.sub_nn K O _ _ e31_35
  have d31_36 := HeatV.sub_nn K O _ _ e31_36
  have d31_37 := HeatV.sub_nn K O _ _ e31_37
  have d31_38 := HeatV.sub_nn K O _ _ e31_38
  have d31_39 := HeatV.sub_nn K O _ _ e31_39
  have d31_40 := HeatV.sub_nn K O _ _ e31_40
  have d31_41 := HeatV.sub_nn K O _ _ e31_41
  have d31_42 := HeatV.sub_nn K O _ _ e31_42
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d32_36 := HeatV.sub_nn K O _ _ e32_36
  have d32_37 := HeatV.sub_nn K O _ _ e32_37
  have d32_38 := HeatV.sub_nn K O _ _ e32_38
  have d32_39 := HeatV.sub_nn K O _ _ e32_39
  have d32_40 := HeatV.sub_nn K O _ _ e32_40
  have d32_41 := HeatV.sub_nn K O _ _ e32_41
  have d32_42 := HeatV.sub_nn K O _ _ e32_42
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d33_36 := HeatV.sub_nn K O _ _ e33_36
  have d33_37 := HeatV.sub_nn K O _ _ e33_37
  have d33_38 := HeatV.sub_nn K O _ _ e33_38
  have d33_39 := HeatV.sub_nn K O _ _ e33_39
  have d33_40 := HeatV.sub_nn K O _ _ e33_40
  have d33_41 := HeatV.sub_nn K O _ _ e33_41
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have d34_36 := HeatV.sub_nn K O _ _ e34_36
  have d34_37 := HeatV.sub_nn K O _ _ e34_37
  have d34_38 := HeatV.sub_nn K O _ _ e34_38
  have d34_39 := HeatV.sub_nn K O _ _ e34_39
  have d34_40 := HeatV.sub_nn K O _ _ e34_40
  have d34_41 := HeatV.sub_nn K O _ _ e34_41
  have d34_42 := HeatV.sub_nn K O _ _ e34_42
  have d35_36 := HeatV.sub_nn K O _ _ e35_36
  have d35_37 := HeatV.sub_nn K O _ _ e35_37
  have d35_38 := HeatV.sub_nn K O _ _ e35_38
  have d35_39 := HeatV.sub_nn K O _ _ e35_39
  have d35_40 := HeatV.sub_nn K O _ _ e35_40
  have d35_41 := HeatV.sub_nn K O _ _ e35_41
  have d35_42 := HeatV.sub_nn K O _ _ e35_42
  have d36_37 := HeatV.sub_nn K O _ _ e36_37
  have d36_38 := HeatV.sub_nn K O _ _ e36_38
  have d36_39 := HeatV.sub_nn K O _ _ e36_39
  have d36_40 := HeatV.sub_nn K O _ _ e36_40
  have d36_41 := HeatV.sub_nn K O _ _ e36_41
  have d36_42 := HeatV.sub_nn K O _ _ e36_42
  have d37_38 := HeatV.sub_nn K O _ _ e37_38
  have d37_39 := HeatV.sub_nn K O _ _ e37_39
  have d37_40 := HeatV.sub_nn K O _ _ e37_40
  have d37_41 := HeatV.sub_nn K O _ _ e37_41
  have d37_42 := HeatV.sub_nn K O _ _ e37_42
  have d38_39 := HeatV.sub_nn K O _ _ e38_39
  have d38_40 := HeatV.sub_nn K O _ _ e38_40
  have d38_41 := HeatV.sub_nn K O _ _ e38_41
  have d38_42 := HeatV.sub_nn K O _ _ e38_42
  have d39_40 := HeatV.sub_nn K O _ _ e39_40
  have d39_41 := HeatV.sub_nn K O _ _ e39_41
  have d39_42 := HeatV.sub_nn K O _ _ e39_42
  have d40_41 := HeatV.sub_nn K O _ _ e40_41
  have d40_42 := HeatV.sub_nn K O _ _ e40_42
  have d41_42 := HeatV.sub_nn K O _ _ e41_42
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+153912 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 201356100) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 42) a41))   -- (+4737 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..43, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 43 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 201356100) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 42) (A 41))) (K.mul (K.mul (cN  -- (+5225 chars; full line in the Zenodo source)
      (K.mul (cN K 201043920) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 43) (A 42))) (K.mul (K.mul  -- (+5225 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (A 37) (A 38) (A 39) (A 40) (A 41) (A 42) (A 43) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hnn 7) (hnn 8) (hnn 9) (hnn 10  -- (+298 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 43 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 43 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 43 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 43 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 43 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 43 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 43 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+49421 chars; full line in the Zenodo source)

end G61Lv42

#print axioms G61Lv42.add_nn
#print axioms G61Lv42.level
#print axioms G61Lv42.level_fun

ym/G61Lv43.lean

lean_all/ym/G61Lv43.lean

/-
  ym/G61Lv43 — T45, G61a at level n = 43 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv43

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 a42 a43 a44 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a7) (p8 : O.l  -- (+874 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+43766 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 230432400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 43) a42)) (K.mul (K.mul (c  -- (+4829 chars; full line in the Zenodo source)
      (K.mul (cN K 230090850) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 44) a43)) (K.mul (K.mu  -- (+4832 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_29 := HeatV.sub_nn K O _ _ e0_29
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_32 := HeatV.sub_nn K O _ _ e0_32
  have d0_34 := HeatV.sub_nn K O _ _ e0_34
  have d0_35 := HeatV.sub_nn K O _ _ e0_35
  have d0_36 := HeatV.sub_nn K O _ _ e0_36
  have d0_37 := HeatV.sub_nn K O _ _ e0_37
  have d0_39 := HeatV.sub_nn K O _ _ e0_39
  have d0_41 := HeatV.sub_nn K O _ _ e0_41
  have d0_43 := HeatV.sub_nn K O _ _ e0_43
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_29 := HeatV.sub_nn K O _ _ e1_29
  have d1_31 := HeatV.sub_nn K O _ _ e1_31
  have d1_32 := HeatV.sub_nn K O _ _ e1_32
  have d1_34 := HeatV.sub_nn K O _ _ e1_34
  have d1_35 := HeatV.sub_nn K O _ _ e1_35
  have d1_36 := HeatV.sub_nn K O _ _ e1_36
  have d1_38 := HeatV.sub_nn K O _ _ e1_38
  have d1_39 := HeatV.sub_nn K O _ _ e1_39
  have d1_41 := HeatV.sub_nn K O _ _ e1_41
  have d1_42 := HeatV.sub_nn K O _ _ e1_42
  have d1_43 := HeatV.sub_nn K O _ _ e1_43
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_34 := HeatV.sub_nn K O _ _ e2_34
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d2_36 := HeatV.sub_nn K O _ _ e2_36
  have d2_38 := HeatV.sub_nn K O _ _ e2_38
  have d2_39 := HeatV.sub_nn K O _ _ e2_39
  have d2_41 := HeatV.sub_nn K O _ _ e2_41
  have d2_43 := HeatV.sub_nn K O _ _ e2_43
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d3_34 := HeatV.sub_nn K O _ _ e3_34
  have d3_35 := HeatV.sub_nn K O _ _ e3_35
  have d3_36 := HeatV.sub_nn K O _ _ e3_36
  have d3_37 := HeatV.sub_nn K O _ _ e3_37
  have d3_38 := HeatV.sub_nn K O _ _ e3_38
  have d3_39 := HeatV.sub_nn K O _ _ e3_39
  have d3_40 := HeatV.sub_nn K O _ _ e3_40
  have d3_41 := HeatV.sub_nn K O _ _ e3_41
  have d3_42 := HeatV.sub_nn K O _ _ e3_42
  have d3_43 := HeatV.sub_nn K O _ _ e3_43
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d4_34 := HeatV.sub_nn K O _ _ e4_34
  have d4_35 := HeatV.sub_nn K O _ _ e4_35
  have d4_36 := HeatV.sub_nn K O _ _ e4_36
  have d4_37 := HeatV.sub_nn K O _ _ e4_37
  have d4_38 := HeatV.sub_nn K O _ _ e4_38
  have d4_39 := HeatV.sub_nn K O _ _ e4_39
  have d4_40 := HeatV.sub_nn K O _ _ e4_40
  have d4_41 := HeatV.sub_nn K O _ _ e4_41
  have d4_42 := HeatV.sub_nn K O _ _ e4_42
  have d4_43 := HeatV.sub_nn K O _ _ e4_43
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d5_33 := HeatV.sub_nn K O _ _ e5_33
  have d5_34 := HeatV.sub_nn K O _ _ e5_34
  have d5_35 := HeatV.sub_nn K O _ _ e5_35
  have d5_36 := HeatV.sub_nn K O _ _ e5_36
  have d5_38 := HeatV.sub_nn K O _ _ e5_38
  have d5_39 := HeatV.sub_nn K O _ _ e5_39
  have d5_40 := HeatV.sub_nn K O _ _ e5_40
  have d5_41 := HeatV.sub_nn K O _ _ e5_41
  have d5_42 := HeatV.sub_nn K O _ _ e5_42
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d6_34 := HeatV.sub_nn K O _ _ e6_34
  have d6_35 := HeatV.sub_nn K O _ _ e6_35
  have d6_36 := HeatV.sub_nn K O _ _ e6_36
  have d6_37 := HeatV.sub_nn K O _ _ e6_37
  have d6_38 := HeatV.sub_nn K O _ _ e6_38
  have d6_39 := HeatV.sub_nn K O _ _ e6_39
  have d6_40 := HeatV.sub_nn K O _ _ e6_40
  have d6_41 := HeatV.sub_nn K O _ _ e6_41
  have d6_42 := HeatV.sub_nn K O _ _ e6_42
  have d6_43 := HeatV.sub_nn K O _ _ e6_43
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d7_34 := HeatV.sub_nn K O _ _ e7_34
  have d7_36 := HeatV.sub_nn K O _ _ e7_36
  have d7_37 := HeatV.sub_nn K O _ _ e7_37
  have d7_38 := HeatV.sub_nn K O _ _ e7_38
  have d7_39 := HeatV.sub_nn K O _ _ e7_39
  have d7_40 := HeatV.sub_nn K O _ _ e7_40
  have d7_41 := HeatV.sub_nn K O _ _ e7_41
  have d7_42 := HeatV.sub_nn K O _ _ e7_42
  have d7_43 := HeatV.sub_nn K O _ _ e7_43
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_34 := HeatV.sub_nn K O _ _ e8_34
  have d8_35 := HeatV.sub_nn K O _ _ e8_35
  have d8_36 := HeatV.sub_nn K O _ _ e8_36
  have d8_37 := HeatV.sub_nn K O _ _ e8_37
  have d8_38 := HeatV.sub_nn K O _ _ e8_38
  have d8_39 := HeatV.sub_nn K O _ _ e8_39
  have d8_40 := HeatV.sub_nn K O _ _ e8_40
  have d8_41 := HeatV.sub_nn K O _ _ e8_41
  have d8_42 := HeatV.sub_nn K O _ _ e8_42
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_34 := HeatV.sub_nn K O _ _ e9_34
  have d9_35 := HeatV.sub_nn K O _ _ e9_35
  have d9_37 := HeatV.sub_nn K O _ _ e9_37
  have d9_38 := HeatV.sub_nn K O _ _ e9_38
  have d9_39 := HeatV.sub_nn K O _ _ e9_39
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_34 := HeatV.sub_nn K O _ _ e10_34
  have d10_35 := HeatV.sub_nn K O _ _ e10_35
  have d10_36 := HeatV.sub_nn K O _ _ e10_36
  have d10_37 := HeatV.sub_nn K O _ _ e10_37
  have d10_38 := HeatV.sub_nn K O _ _ e10_38
  have d10_39 := HeatV.sub_nn K O _ _ e10_39
  have d10_40 := HeatV.sub_nn K O _ _ e10_40
  have d10_41 := HeatV.sub_nn K O _ _ e10_41
  have d10_42 := HeatV.sub_nn K O _ _ e10_42
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d11_33 := HeatV.sub_nn K O _ _ e11_33
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d11_35 := HeatV.sub_nn K O _ _ e11_35
  have d11_36 := HeatV.sub_nn K O _ _ e11_36
  have d11_37 := HeatV.sub_nn K O _ _ e11_37
  have d11_38 := HeatV.sub_nn K O _ _ e11_38
  have d11_39 := HeatV.sub_nn K O _ _ e11_39
  have d11_40 := HeatV.sub_nn K O _ _ e11_40
  have d11_41 := HeatV.sub_nn K O _ _ e11_41
  have d11_42 := HeatV.sub_nn K O _ _ e11_42
  have d11_43 := HeatV.sub_nn K O _ _ e11_43
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d12_34 := HeatV.sub_nn K O _ _ e12_34
  have d12_35 := HeatV.sub_nn K O _ _ e12_35
  have d12_36 := HeatV.sub_nn K O _ _ e12_36
  have d12_37 := HeatV.sub_nn K O _ _ e12_37
  have d12_38 := HeatV.sub_nn K O _ _ e12_38
  have d12_39 := HeatV.sub_nn K O _ _ e12_39
  have d12_40 := HeatV.sub_nn K O _ _ e12_40
  have d12_42 := HeatV.sub_nn K O _ _ e12_42
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_33 := HeatV.sub_nn K O _ _ e13_33
  have d13_34 := HeatV.sub_nn K O _ _ e13_34
  have d13_35 := HeatV.sub_nn K O _ _ e13_35
  have d13_36 := HeatV.sub_nn K O _ _ e13_36
  have d13_37 := HeatV.sub_nn K O _ _ e13_37
  have d13_38 := HeatV.sub_nn K O _ _ e13_38
  have d13_39 := HeatV.sub_nn K O _ _ e13_39
  have d13_40 := HeatV.sub_nn K O _ _ e13_40
  have d13_41 := HeatV.sub_nn K O _ _ e13_41
  have d13_42 := HeatV.sub_nn K O _ _ e13_42
  have d13_43 := HeatV.sub_nn K O _ _ e13_43
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d14_32 := HeatV.sub_nn K O _ _ e14_32
  have d14_33 := HeatV.sub_nn K O _ _ e14_33
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d14_35 := HeatV.sub_nn K O _ _ e14_35
  have d14_36 := HeatV.sub_nn K O _ _ e14_36
  have d14_37 := HeatV.sub_nn K O _ _ e14_37
  have d14_38 := HeatV.sub_nn K O _ _ e14_38
  have d14_39 := HeatV.sub_nn K O _ _ e14_39
  have d14_40 := HeatV.sub_nn K O _ _ e14_40
  have d14_42 := HeatV.sub_nn K O _ _ e14_42
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_34 := HeatV.sub_nn K O _ _ e15_34
  have d15_35 := HeatV.sub_nn K O _ _ e15_35
  have d15_36 := HeatV.sub_nn K O _ _ e15_36
  have d15_37 := HeatV.sub_nn K O _ _ e15_37
  have d15_38 := HeatV.sub_nn K O _ _ e15_38
  have d15_39 := HeatV.sub_nn K O _ _ e15_39
  have d15_40 := HeatV.sub_nn K O _ _ e15_40
  have d15_41 := HeatV.sub_nn K O _ _ e15_41
  have d15_42 := HeatV.sub_nn K O _ _ e15_42
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d16_36 := HeatV.sub_nn K O _ _ e16_36
  have d16_37 := HeatV.sub_nn K O _ _ e16_37
  have d16_38 := HeatV.sub_nn K O _ _ e16_38
  have d16_39 := HeatV.sub_nn K O _ _ e16_39
  have d16_42 := HeatV.sub_nn K O _ _ e16_42
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_34 := HeatV.sub_nn K O _ _ e17_34
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d17_36 := HeatV.sub_nn K O _ _ e17_36
  have d17_37 := HeatV.sub_nn K O _ _ e17_37
  have d17_38 := HeatV.sub_nn K O _ _ e17_38
  have d17_39 := HeatV.sub_nn K O _ _ e17_39
  have d17_40 := HeatV.sub_nn K O _ _ e17_40
  have d17_41 := HeatV.sub_nn K O _ _ e17_41
  have d17_42 := HeatV.sub_nn K O _ _ e17_42
  have d17_43 := HeatV.sub_nn K O _ _ e17_43
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d18_34 := HeatV.sub_nn K O _ _ e18_34
  have d18_36 := HeatV.sub_nn K O _ _ e18_36
  have d18_37 := HeatV.sub_nn K O _ _ e18_37
  have d18_38 := HeatV.sub_nn K O _ _ e18_38
  have d18_39 := HeatV.sub_nn K O _ _ e18_39
  have d18_41 := HeatV.sub_nn K O _ _ e18_41
  have d18_43 := HeatV.sub_nn K O _ _ e18_43
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d19_34 := HeatV.sub_nn K O _ _ e19_34
  have d19_35 := HeatV.sub_nn K O _ _ e19_35
  have d19_36 := HeatV.sub_nn K O _ _ e19_36
  have d19_37 := HeatV.sub_nn K O _ _ e19_37
  have d19_38 := HeatV.sub_nn K O _ _ e19_38
  have d19_39 := HeatV.sub_nn K O _ _ e19_39
  have d19_40 := HeatV.sub_nn K O _ _ e19_40
  have d19_41 := HeatV.sub_nn K O _ _ e19_41
  have d19_42 := HeatV.sub_nn K O _ _ e19_42
  have d19_43 := HeatV.sub_nn K O _ _ e19_43
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_34 := HeatV.sub_nn K O _ _ e20_34
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d20_36 := HeatV.sub_nn K O _ _ e20_36
  have d20_37 := HeatV.sub_nn K O _ _ e20_37
  have d20_38 := HeatV.sub_nn K O _ _ e20_38
  have d20_39 := HeatV.sub_nn K O _ _ e20_39
  have d20_40 := HeatV.sub_nn K O _ _ e20_40
  have d20_42 := HeatV.sub_nn K O _ _ e20_42
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d21_35 := HeatV.sub_nn K O _ _ e21_35
  have d21_36 := HeatV.sub_nn K O _ _ e21_36
  have d21_37 := HeatV.sub_nn K O _ _ e21_37
  have d21_38 := HeatV.sub_nn K O _ _ e21_38
  have d21_39 := HeatV.sub_nn K O _ _ e21_39
  have d21_40 := HeatV.sub_nn K O _ _ e21_40
  have d21_41 := HeatV.sub_nn K O _ _ e21_41
  have d21_42 := HeatV.sub_nn K O _ _ e21_42
  have d21_43 := HeatV.sub_nn K O _ _ e21_43
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d22_36 := HeatV.sub_nn K O _ _ e22_36
  have d22_37 := HeatV.sub_nn K O _ _ e22_37
  have d22_38 := HeatV.sub_nn K O _ _ e22_38
  have d22_39 := HeatV.sub_nn K O _ _ e22_39
  have d22_40 := HeatV.sub_nn K O _ _ e22_40
  have d22_41 := HeatV.sub_nn K O _ _ e22_41
  have d22_42 := HeatV.sub_nn K O _ _ e22_42
  have d22_43 := HeatV.sub_nn K O _ _ e22_43
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d23_36 := HeatV.sub_nn K O _ _ e23_36
  have d23_37 := HeatV.sub_nn K O _ _ e23_37
  have d23_38 := HeatV.sub_nn K O _ _ e23_38
  have d23_39 := HeatV.sub_nn K O _ _ e23_39
  have d23_40 := HeatV.sub_nn K O _ _ e23_40
  have d23_41 := HeatV.sub_nn K O _ _ e23_41
  have d23_42 := HeatV.sub_nn K O _ _ e23_42
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d24_35 := HeatV.sub_nn K O _ _ e24_35
  have d24_36 := HeatV.sub_nn K O _ _ e24_36
  have d24_37 := HeatV.sub_nn K O _ _ e24_37
  have d24_38 := HeatV.sub_nn K O _ _ e24_38
  have d24_39 := HeatV.sub_nn K O _ _ e24_39
  have d24_40 := HeatV.sub_nn K O _ _ e24_40
  have d24_41 := HeatV.sub_nn K O _ _ e24_41
  have d24_42 := HeatV.sub_nn K O _ _ e24_42
  have d24_43 := HeatV.sub_nn K O _ _ e24_43
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d25_35 := HeatV.sub_nn K O _ _ e25_35
  have d25_36 := HeatV.sub_nn K O _ _ e25_36
  have d25_37 := HeatV.sub_nn K O _ _ e25_37
  have d25_38 := HeatV.sub_nn K O _ _ e25_38
  have d25_39 := HeatV.sub_nn K O _ _ e25_39
  have d25_40 := HeatV.sub_nn K O _ _ e25_40
  have d25_41 := HeatV.sub_nn K O _ _ e25_41
  have d25_42 := HeatV.sub_nn K O _ _ e25_42
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d26_36 := HeatV.sub_nn K O _ _ e26_36
  have d26_37 := HeatV.sub_nn K O _ _ e26_37
  have d26_38 := HeatV.sub_nn K O _ _ e26_38
  have d26_39 := HeatV.sub_nn K O _ _ e26_39
  have d26_40 := HeatV.sub_nn K O _ _ e26_40
  have d26_41 := HeatV.sub_nn K O _ _ e26_41
  have d26_42 := HeatV.sub_nn K O _ _ e26_42
  have d26_43 := HeatV.sub_nn K O _ _ e26_43
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d27_35 := HeatV.sub_nn K O _ _ e27_35
  have d27_36 := HeatV.sub_nn K O _ _ e27_36
  have d27_37 := HeatV.sub_nn K O _ _ e27_37
  have d27_38 := HeatV.sub_nn K O _ _ e27_38
  have d27_39 := HeatV.sub_nn K O _ _ e27_39
  have d27_40 := HeatV.sub_nn K O _ _ e27_40
  have d27_41 := HeatV.sub_nn K O _ _ e27_41
  have d27_42 := HeatV.sub_nn K O _ _ e27_42
  have d27_43 := HeatV.sub_nn K O _ _ e27_43
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d28_35 := HeatV.sub_nn K O _ _ e28_35
  have d28_36 := HeatV.sub_nn K O _ _ e28_36
  have d28_37 := HeatV.sub_nn K O _ _ e28_37
  have d28_38 := HeatV.sub_nn K O _ _ e28_38
  have d28_39 := HeatV.sub_nn K O _ _ e28_39
  have d28_40 := HeatV.sub_nn K O _ _ e28_40
  have d28_41 := HeatV.sub_nn K O _ _ e28_41
  have d28_42 := HeatV.sub_nn K O _ _ e28_42
  have d28_43 := HeatV.sub_nn K O _ _ e28_43
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d29_36 := HeatV.sub_nn K O _ _ e29_36
  have d29_37 := HeatV.sub_nn K O _ _ e29_37
  have d29_38 := HeatV.sub_nn K O _ _ e29_38
  have d29_39 := HeatV.sub_nn K O _ _ e29_39
  have d29_40 := HeatV.sub_nn K O _ _ e29_40
  have d29_41 := HeatV.sub_nn K O _ _ e29_41
  have d29_42 := HeatV.sub_nn K O _ _ e29_42
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d30_35 := HeatV.sub_nn K O _ _ e30_35
  have d30_36 := HeatV.sub_nn K O _ _ e30_36
  have d30_37 := HeatV.sub_nn K O _ _ e30_37
  have d30_38 := HeatV.sub_nn K O _ _ e30_38
  have d30_39 := HeatV.sub_nn K O _ _ e30_39
  have d30_40 := HeatV.sub_nn K O _ _ e30_40
  have d30_41 := HeatV.sub_nn K O _ _ e30_41
  have d30_42 := HeatV.sub_nn K O _ _ e30_42
  have d30_43 := HeatV.sub_nn K O _ _ e30_43
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d31_35 := HeatV.sub_nn K O _ _ e31_35
  have d31_36 := HeatV.sub_nn K O _ _ e31_36
  have d31_37 := HeatV.sub_nn K O _ _ e31_37
  have d31_38 := HeatV.sub_nn K O _ _ e31_38
  have d31_39 := HeatV.sub_nn K O _ _ e31_39
  have d31_40 := HeatV.sub_nn K O _ _ e31_40
  have d31_41 := HeatV.sub_nn K O _ _ e31_41
  have d31_42 := HeatV.sub_nn K O _ _ e31_42
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d32_36 := HeatV.sub_nn K O _ _ e32_36
  have d32_37 := HeatV.sub_nn K O _ _ e32_37
  have d32_38 := HeatV.sub_nn K O _ _ e32_38
  have d32_39 := HeatV.sub_nn K O _ _ e32_39
  have d32_40 := HeatV.sub_nn K O _ _ e32_40
  have d32_41 := HeatV.sub_nn K O _ _ e32_41
  have d32_42 := HeatV.sub_nn K O _ _ e32_42
  have d32_43 := HeatV.sub_nn K O _ _ e32_43
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d33_36 := HeatV.sub_nn K O _ _ e33_36
  have d33_37 := HeatV.sub_nn K O _ _ e33_37
  have d33_38 := HeatV.sub_nn K O _ _ e33_38
  have d33_39 := HeatV.sub_nn K O _ _ e33_39
  have d33_40 := HeatV.sub_nn K O _ _ e33_40
  have d33_41 := HeatV.sub_nn K O _ _ e33_41
  have d33_42 := HeatV.sub_nn K O _ _ e33_42
  have d33_43 := HeatV.sub_nn K O _ _ e33_43
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have d34_36 := HeatV.sub_nn K O _ _ e34_36
  have d34_37 := HeatV.sub_nn K O _ _ e34_37
  have d34_38 := HeatV.sub_nn K O _ _ e34_38
  have d34_39 := HeatV.sub_nn K O _ _ e34_39
  have d34_40 := HeatV.sub_nn K O _ _ e34_40
  have d34_41 := HeatV.sub_nn K O _ _ e34_41
  have d34_42 := HeatV.sub_nn K O _ _ e34_42
  have d34_43 := HeatV.sub_nn K O _ _ e34_43
  have d35_36 := HeatV.sub_nn K O _ _ e35_36
  have d35_37 := HeatV.sub_nn K O _ _ e35_37
  have d35_38 := HeatV.sub_nn K O _ _ e35_38
  have d35_39 := HeatV.sub_nn K O _ _ e35_39
  have d35_40 := HeatV.sub_nn K O _ _ e35_40
  have d35_41 := HeatV.sub_nn K O _ _ e35_41
  have d35_42 := HeatV.sub_nn K O _ _ e35_42
  have d35_43 := HeatV.sub_nn K O _ _ e35_43
  have d36_37 := HeatV.sub_nn K O _ _ e36_37
  have d36_38 := HeatV.sub_nn K O _ _ e36_38
  have d36_39 := HeatV.sub_nn K O _ _ e36_39
  have d36_40 := HeatV.sub_nn K O _ _ e36_40
  have d36_41 := HeatV.sub_nn K O _ _ e36_41
  have d36_42 := HeatV.sub_nn K O _ _ e36_42
  have d36_43 := HeatV.sub_nn K O _ _ e36_43
  have d37_38 := HeatV.sub_nn K O _ _ e37_38
  have d37_39 := HeatV.sub_nn K O _ _ e37_39
  have d37_40 := HeatV.sub_nn K O _ _ e37_40
  have d37_41 := HeatV.sub_nn K O _ _ e37_41
  have d37_42 := HeatV.sub_nn K O _ _ e37_42
  have d37_43 := HeatV.sub_nn K O _ _ e37_43
  have d38_39 := HeatV.sub_nn K O _ _ e38_39
  have d38_40 := HeatV.sub_nn K O _ _ e38_40
  have d38_41 := HeatV.sub_nn K O _ _ e38_41
  have d38_42 := HeatV.sub_nn K O _ _ e38_42
  have d38_43 := HeatV.sub_nn K O _ _ e38_43
  have d39_40 := HeatV.sub_nn K O _ _ e39_40
  have d39_41 := HeatV.sub_nn K O _ _ e39_41
  have d39_42 := HeatV.sub_nn K O _ _ e39_42
  have d40_41 := HeatV.sub_nn K O _ _ e40_41
  have d40_42 := HeatV.sub_nn K O _ _ e40_42
  have d40_43 := HeatV.sub_nn K O _ _ e40_43
  have d41_42 := HeatV.sub_nn K O _ _ e41_42
  have d41_43 := HeatV.sub_nn K O _ _ e41_43
  have d42_43 := HeatV.sub_nn K O _ _ e42_43
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+163370 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 230432400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 43)  -- (+4857 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..44, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 44 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 230432400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 43) (A 42))) (K.mul (K.  -- (+5357 chars; full line in the Zenodo source)
      (K.mul (cN K 230090850) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 44) (A 43))) (K.mul  -- (+5357 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (A 37) (A 38) (A 39) (A 40) (A 41) (A 42) (A 43) (A 44) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hnn 7) (hnn 8) (hnn 9)   -- (+314 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 44 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 44 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 44 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 44 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 44 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 44 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 44 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+51809 chars; full line in the Zenodo source)

end G61Lv43

#print axioms G61Lv43.add_nn
#print axioms G61Lv43.level
#print axioms G61Lv43.level_fun

ym/G61Lv44.lean

lean_all/ym/G61Lv44.lean

/-
  ym/G61Lv44 — T45, G61a at level n = 44 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv44

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxHeartbeats 0 in
set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 a42 a43 a44 a45 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a7) (p8 :  -- (+902 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+45849 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 262926225) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 44) a43)) (K.mul (K  -- (+4949 chars; full line in the Zenodo source)
      (K.mul (cN K 262553280) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 45) a44)) (K.mu  -- (+4952 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_29 := HeatV.sub_nn K O _ _ e0_29
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_32 := HeatV.sub_nn K O _ _ e0_32
  have d0_33 := HeatV.sub_nn K O _ _ e0_33
  have d0_34 := HeatV.sub_nn K O _ _ e0_34
  have d0_35 := HeatV.sub_nn K O _ _ e0_35
  have d0_36 := HeatV.sub_nn K O _ _ e0_36
  have d0_37 := HeatV.sub_nn K O _ _ e0_37
  have d0_38 := HeatV.sub_nn K O _ _ e0_38
  have d0_40 := HeatV.sub_nn K O _ _ e0_40
  have d0_42 := HeatV.sub_nn K O _ _ e0_42
  have d0_44 := HeatV.sub_nn K O _ _ e0_44
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_29 := HeatV.sub_nn K O _ _ e1_29
  have d1_31 := HeatV.sub_nn K O _ _ e1_31
  have d1_33 := HeatV.sub_nn K O _ _ e1_33
  have d1_34 := HeatV.sub_nn K O _ _ e1_34
  have d1_36 := HeatV.sub_nn K O _ _ e1_36
  have d1_37 := HeatV.sub_nn K O _ _ e1_37
  have d1_38 := HeatV.sub_nn K O _ _ e1_38
  have d1_40 := HeatV.sub_nn K O _ _ e1_40
  have d1_41 := HeatV.sub_nn K O _ _ e1_41
  have d1_43 := HeatV.sub_nn K O _ _ e1_43
  have d1_44 := HeatV.sub_nn K O _ _ e1_44
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_33 := HeatV.sub_nn K O _ _ e2_33
  have d2_34 := HeatV.sub_nn K O _ _ e2_34
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d2_36 := HeatV.sub_nn K O _ _ e2_36
  have d2_37 := HeatV.sub_nn K O _ _ e2_37
  have d2_38 := HeatV.sub_nn K O _ _ e2_38
  have d2_39 := HeatV.sub_nn K O _ _ e2_39
  have d2_40 := HeatV.sub_nn K O _ _ e2_40
  have d2_41 := HeatV.sub_nn K O _ _ e2_41
  have d2_42 := HeatV.sub_nn K O _ _ e2_42
  have d2_43 := HeatV.sub_nn K O _ _ e2_43
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d3_34 := HeatV.sub_nn K O _ _ e3_34
  have d3_35 := HeatV.sub_nn K O _ _ e3_35
  have d3_36 := HeatV.sub_nn K O _ _ e3_36
  have d3_37 := HeatV.sub_nn K O _ _ e3_37
  have d3_38 := HeatV.sub_nn K O _ _ e3_38
  have d3_41 := HeatV.sub_nn K O _ _ e3_41
  have d3_42 := HeatV.sub_nn K O _ _ e3_42
  have d3_43 := HeatV.sub_nn K O _ _ e3_43
  have d3_44 := HeatV.sub_nn K O _ _ e3_44
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d4_34 := HeatV.sub_nn K O _ _ e4_34
  have d4_36 := HeatV.sub_nn K O _ _ e4_36
  have d4_37 := HeatV.sub_nn K O _ _ e4_37
  have d4_38 := HeatV.sub_nn K O _ _ e4_38
  have d4_40 := HeatV.sub_nn K O _ _ e4_40
  have d4_41 := HeatV.sub_nn K O _ _ e4_41
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d5_33 := HeatV.sub_nn K O _ _ e5_33
  have d5_35 := HeatV.sub_nn K O _ _ e5_35
  have d5_36 := HeatV.sub_nn K O _ _ e5_36
  have d5_39 := HeatV.sub_nn K O _ _ e5_39
  have d5_40 := HeatV.sub_nn K O _ _ e5_40
  have d5_41 := HeatV.sub_nn K O _ _ e5_41
  have d5_42 := HeatV.sub_nn K O _ _ e5_42
  have d5_43 := HeatV.sub_nn K O _ _ e5_43
  have d5_44 := HeatV.sub_nn K O _ _ e5_44
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d6_33 := HeatV.sub_nn K O _ _ e6_33
  have d6_34 := HeatV.sub_nn K O _ _ e6_34
  have d6_36 := HeatV.sub_nn K O _ _ e6_36
  have d6_38 := HeatV.sub_nn K O _ _ e6_38
  have d6_39 := HeatV.sub_nn K O _ _ e6_39
  have d6_40 := HeatV.sub_nn K O _ _ e6_40
  have d6_41 := HeatV.sub_nn K O _ _ e6_41
  have d6_42 := HeatV.sub_nn K O _ _ e6_42
  have d6_43 := HeatV.sub_nn K O _ _ e6_43
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d7_33 := HeatV.sub_nn K O _ _ e7_33
  have d7_34 := HeatV.sub_nn K O _ _ e7_34
  have d7_35 := HeatV.sub_nn K O _ _ e7_35
  have d7_36 := HeatV.sub_nn K O _ _ e7_36
  have d7_37 := HeatV.sub_nn K O _ _ e7_37
  have d7_38 := HeatV.sub_nn K O _ _ e7_38
  have d7_39 := HeatV.sub_nn K O _ _ e7_39
  have d7_40 := HeatV.sub_nn K O _ _ e7_40
  have d7_41 := HeatV.sub_nn K O _ _ e7_41
  have d7_42 := HeatV.sub_nn K O _ _ e7_42
  have d7_43 := HeatV.sub_nn K O _ _ e7_43
  have d7_44 := HeatV.sub_nn K O _ _ e7_44
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_32 := HeatV.sub_nn K O _ _ e8_32
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_34 := HeatV.sub_nn K O _ _ e8_34
  have d8_36 := HeatV.sub_nn K O _ _ e8_36
  have d8_38 := HeatV.sub_nn K O _ _ e8_38
  have d8_39 := HeatV.sub_nn K O _ _ e8_39
  have d8_40 := HeatV.sub_nn K O _ _ e8_40
  have d8_41 := HeatV.sub_nn K O _ _ e8_41
  have d8_43 := HeatV.sub_nn K O _ _ e8_43
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d9_35 := HeatV.sub_nn K O _ _ e9_35
  have d9_36 := HeatV.sub_nn K O _ _ e9_36
  have d9_37 := HeatV.sub_nn K O _ _ e9_37
  have d9_38 := HeatV.sub_nn K O _ _ e9_38
  have d9_39 := HeatV.sub_nn K O _ _ e9_39
  have d9_40 := HeatV.sub_nn K O _ _ e9_40
  have d9_41 := HeatV.sub_nn K O _ _ e9_41
  have d9_42 := HeatV.sub_nn K O _ _ e9_42
  have d9_43 := HeatV.sub_nn K O _ _ e9_43
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_34 := HeatV.sub_nn K O _ _ e10_34
  have d10_35 := HeatV.sub_nn K O _ _ e10_35
  have d10_36 := HeatV.sub_nn K O _ _ e10_36
  have d10_37 := HeatV.sub_nn K O _ _ e10_37
  have d10_38 := HeatV.sub_nn K O _ _ e10_38
  have d10_39 := HeatV.sub_nn K O _ _ e10_39
  have d10_40 := HeatV.sub_nn K O _ _ e10_40
  have d10_41 := HeatV.sub_nn K O _ _ e10_41
  have d10_42 := HeatV.sub_nn K O _ _ e10_42
  have d10_43 := HeatV.sub_nn K O _ _ e10_43
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_33 := HeatV.sub_nn K O _ _ e11_33
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d11_35 := HeatV.sub_nn K O _ _ e11_35
  have d11_36 := HeatV.sub_nn K O _ _ e11_36
  have d11_37 := HeatV.sub_nn K O _ _ e11_37
  have d11_38 := HeatV.sub_nn K O _ _ e11_38
  have d11_39 := HeatV.sub_nn K O _ _ e11_39
  have d11_40 := HeatV.sub_nn K O _ _ e11_40
  have d11_43 := HeatV.sub_nn K O _ _ e11_43
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d12_34 := HeatV.sub_nn K O _ _ e12_34
  have d12_35 := HeatV.sub_nn K O _ _ e12_35
  have d12_36 := HeatV.sub_nn K O _ _ e12_36
  have d12_37 := HeatV.sub_nn K O _ _ e12_37
  have d12_38 := HeatV.sub_nn K O _ _ e12_38
  have d12_39 := HeatV.sub_nn K O _ _ e12_39
  have d12_40 := HeatV.sub_nn K O _ _ e12_40
  have d12_41 := HeatV.sub_nn K O _ _ e12_41
  have d12_42 := HeatV.sub_nn K O _ _ e12_42
  have d12_43 := HeatV.sub_nn K O _ _ e12_43
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_33 := HeatV.sub_nn K O _ _ e13_33
  have d13_34 := HeatV.sub_nn K O _ _ e13_34
  have d13_35 := HeatV.sub_nn K O _ _ e13_35
  have d13_36 := HeatV.sub_nn K O _ _ e13_36
  have d13_37 := HeatV.sub_nn K O _ _ e13_37
  have d13_38 := HeatV.sub_nn K O _ _ e13_38
  have d13_39 := HeatV.sub_nn K O _ _ e13_39
  have d13_40 := HeatV.sub_nn K O _ _ e13_40
  have d13_41 := HeatV.sub_nn K O _ _ e13_41
  have d13_42 := HeatV.sub_nn K O _ _ e13_42
  have d13_43 := HeatV.sub_nn K O _ _ e13_43
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d14_32 := HeatV.sub_nn K O _ _ e14_32
  have d14_33 := HeatV.sub_nn K O _ _ e14_33
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d14_35 := HeatV.sub_nn K O _ _ e14_35
  have d14_36 := HeatV.sub_nn K O _ _ e14_36
  have d14_37 := HeatV.sub_nn K O _ _ e14_37
  have d14_38 := HeatV.sub_nn K O _ _ e14_38
  have d14_39 := HeatV.sub_nn K O _ _ e14_39
  have d14_40 := HeatV.sub_nn K O _ _ e14_40
  have d14_41 := HeatV.sub_nn K O _ _ e14_41
  have d14_42 := HeatV.sub_nn K O _ _ e14_42
  have d14_43 := HeatV.sub_nn K O _ _ e14_43
  have d14_44 := HeatV.sub_nn K O _ _ e14_44
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_34 := HeatV.sub_nn K O _ _ e15_34
  have d15_35 := HeatV.sub_nn K O _ _ e15_35
  have d15_36 := HeatV.sub_nn K O _ _ e15_36
  have d15_37 := HeatV.sub_nn K O _ _ e15_37
  have d15_38 := HeatV.sub_nn K O _ _ e15_38
  have d15_39 := HeatV.sub_nn K O _ _ e15_39
  have d15_40 := HeatV.sub_nn K O _ _ e15_40
  have d15_41 := HeatV.sub_nn K O _ _ e15_41
  have d15_42 := HeatV.sub_nn K O _ _ e15_42
  have d15_43 := HeatV.sub_nn K O _ _ e15_43
  have d15_44 := HeatV.sub_nn K O _ _ e15_44
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d16_36 := HeatV.sub_nn K O _ _ e16_36
  have d16_37 := HeatV.sub_nn K O _ _ e16_37
  have d16_38 := HeatV.sub_nn K O _ _ e16_38
  have d16_39 := HeatV.sub_nn K O _ _ e16_39
  have d16_40 := HeatV.sub_nn K O _ _ e16_40
  have d16_41 := HeatV.sub_nn K O _ _ e16_41
  have d16_42 := HeatV.sub_nn K O _ _ e16_42
  have d16_43 := HeatV.sub_nn K O _ _ e16_43
  have d16_44 := HeatV.sub_nn K O _ _ e16_44
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_34 := HeatV.sub_nn K O _ _ e17_34
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d17_36 := HeatV.sub_nn K O _ _ e17_36
  have d17_37 := HeatV.sub_nn K O _ _ e17_37
  have d17_38 := HeatV.sub_nn K O _ _ e17_38
  have d17_39 := HeatV.sub_nn K O _ _ e17_39
  have d17_40 := HeatV.sub_nn K O _ _ e17_40
  have d17_41 := HeatV.sub_nn K O _ _ e17_41
  have d17_42 := HeatV.sub_nn K O _ _ e17_42
  have d17_43 := HeatV.sub_nn K O _ _ e17_43
  have d17_44 := HeatV.sub_nn K O _ _ e17_44
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d18_34 := HeatV.sub_nn K O _ _ e18_34
  have d18_35 := HeatV.sub_nn K O _ _ e18_35
  have d18_36 := HeatV.sub_nn K O _ _ e18_36
  have d18_37 := HeatV.sub_nn K O _ _ e18_37
  have d18_38 := HeatV.sub_nn K O _ _ e18_38
  have d18_39 := HeatV.sub_nn K O _ _ e18_39
  have d18_40 := HeatV.sub_nn K O _ _ e18_40
  have d18_41 := HeatV.sub_nn K O _ _ e18_41
  have d18_42 := HeatV.sub_nn K O _ _ e18_42
  have d18_43 := HeatV.sub_nn K O _ _ e18_43
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d19_34 := HeatV.sub_nn K O _ _ e19_34
  have d19_35 := HeatV.sub_nn K O _ _ e19_35
  have d19_36 := HeatV.sub_nn K O _ _ e19_36
  have d19_37 := HeatV.sub_nn K O _ _ e19_37
  have d19_38 := HeatV.sub_nn K O _ _ e19_38
  have d19_39 := HeatV.sub_nn K O _ _ e19_39
  have d19_40 := HeatV.sub_nn K O _ _ e19_40
  have d19_41 := HeatV.sub_nn K O _ _ e19_41
  have d19_42 := HeatV.sub_nn K O _ _ e19_42
  have d19_43 := HeatV.sub_nn K O _ _ e19_43
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_34 := HeatV.sub_nn K O _ _ e20_34
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d20_36 := HeatV.sub_nn K O _ _ e20_36
  have d20_37 := HeatV.sub_nn K O _ _ e20_37
  have d20_38 := HeatV.sub_nn K O _ _ e20_38
  have d20_39 := HeatV.sub_nn K O _ _ e20_39
  have d20_40 := HeatV.sub_nn K O _ _ e20_40
  have d20_41 := HeatV.sub_nn K O _ _ e20_41
  have d20_42 := HeatV.sub_nn K O _ _ e20_42
  have d20_43 := HeatV.sub_nn K O _ _ e20_43
  have d20_44 := HeatV.sub_nn K O _ _ e20_44
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d21_35 := HeatV.sub_nn K O _ _ e21_35
  have d21_38 := HeatV.sub_nn K O _ _ e21_38
  have d21_39 := HeatV.sub_nn K O _ _ e21_39
  have d21_40 := HeatV.sub_nn K O _ _ e21_40
  have d21_41 := HeatV.sub_nn K O _ _ e21_41
  have d21_42 := HeatV.sub_nn K O _ _ e21_42
  have d21_43 := HeatV.sub_nn K O _ _ e21_43
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d22_36 := HeatV.sub_nn K O _ _ e22_36
  have d22_37 := HeatV.sub_nn K O _ _ e22_37
  have d22_38 := HeatV.sub_nn K O _ _ e22_38
  have d22_39 := HeatV.sub_nn K O _ _ e22_39
  have d22_40 := HeatV.sub_nn K O _ _ e22_40
  have d22_41 := HeatV.sub_nn K O _ _ e22_41
  have d22_42 := HeatV.sub_nn K O _ _ e22_42
  have d22_43 := HeatV.sub_nn K O _ _ e22_43
  have d22_44 := HeatV.sub_nn K O _ _ e22_44
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d23_36 := HeatV.sub_nn K O _ _ e23_36
  have d23_37 := HeatV.sub_nn K O _ _ e23_37
  have d23_38 := HeatV.sub_nn K O _ _ e23_38
  have d23_39 := HeatV.sub_nn K O _ _ e23_39
  have d23_40 := HeatV.sub_nn K O _ _ e23_40
  have d23_41 := HeatV.sub_nn K O _ _ e23_41
  have d23_42 := HeatV.sub_nn K O _ _ e23_42
  have d23_43 := HeatV.sub_nn K O _ _ e23_43
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d24_35 := HeatV.sub_nn K O _ _ e24_35
  have d24_36 := HeatV.sub_nn K O _ _ e24_36
  have d24_37 := HeatV.sub_nn K O _ _ e24_37
  have d24_38 := HeatV.sub_nn K O _ _ e24_38
  have d24_39 := HeatV.sub_nn K O _ _ e24_39
  have d24_40 := HeatV.sub_nn K O _ _ e24_40
  have d24_41 := HeatV.sub_nn K O _ _ e24_41
  have d24_42 := HeatV.sub_nn K O _ _ e24_42
  have d24_43 := HeatV.sub_nn K O _ _ e24_43
  have d24_44 := HeatV.sub_nn K O _ _ e24_44
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d25_35 := HeatV.sub_nn K O _ _ e25_35
  have d25_36 := HeatV.sub_nn K O _ _ e25_36
  have d25_37 := HeatV.sub_nn K O _ _ e25_37
  have d25_38 := HeatV.sub_nn K O _ _ e25_38
  have d25_39 := HeatV.sub_nn K O _ _ e25_39
  have d25_40 := HeatV.sub_nn K O _ _ e25_40
  have d25_41 := HeatV.sub_nn K O _ _ e25_41
  have d25_42 := HeatV.sub_nn K O _ _ e25_42
  have d25_43 := HeatV.sub_nn K O _ _ e25_43
  have d25_44 := HeatV.sub_nn K O _ _ e25_44
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d26_36 := HeatV.sub_nn K O _ _ e26_36
  have d26_37 := HeatV.sub_nn K O _ _ e26_37
  have d26_38 := HeatV.sub_nn K O _ _ e26_38
  have d26_39 := HeatV.sub_nn K O _ _ e26_39
  have d26_40 := HeatV.sub_nn K O _ _ e26_40
  have d26_41 := HeatV.sub_nn K O _ _ e26_41
  have d26_42 := HeatV.sub_nn K O _ _ e26_42
  have d26_43 := HeatV.sub_nn K O _ _ e26_43
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d27_35 := HeatV.sub_nn K O _ _ e27_35
  have d27_36 := HeatV.sub_nn K O _ _ e27_36
  have d27_37 := HeatV.sub_nn K O _ _ e27_37
  have d27_38 := HeatV.sub_nn K O _ _ e27_38
  have d27_39 := HeatV.sub_nn K O _ _ e27_39
  have d27_41 := HeatV.sub_nn K O _ _ e27_41
  have d27_42 := HeatV.sub_nn K O _ _ e27_42
  have d27_43 := HeatV.sub_nn K O _ _ e27_43
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d28_35 := HeatV.sub_nn K O _ _ e28_35
  have d28_36 := HeatV.sub_nn K O _ _ e28_36
  have d28_37 := HeatV.sub_nn K O _ _ e28_37
  have d28_38 := HeatV.sub_nn K O _ _ e28_38
  have d28_39 := HeatV.sub_nn K O _ _ e28_39
  have d28_40 := HeatV.sub_nn K O _ _ e28_40
  have d28_41 := HeatV.sub_nn K O _ _ e28_41
  have d28_42 := HeatV.sub_nn K O _ _ e28_42
  have d28_43 := HeatV.sub_nn K O _ _ e28_43
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d29_36 := HeatV.sub_nn K O _ _ e29_36
  have d29_37 := HeatV.sub_nn K O _ _ e29_37
  have d29_38 := HeatV.sub_nn K O _ _ e29_38
  have d29_39 := HeatV.sub_nn K O _ _ e29_39
  have d29_40 := HeatV.sub_nn K O _ _ e29_40
  have d29_41 := HeatV.sub_nn K O _ _ e29_41
  have d29_42 := HeatV.sub_nn K O _ _ e29_42
  have d29_43 := HeatV.sub_nn K O _ _ e29_43
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d30_35 := HeatV.sub_nn K O _ _ e30_35
  have d30_36 := HeatV.sub_nn K O _ _ e30_36
  have d30_37 := HeatV.sub_nn K O _ _ e30_37
  have d30_38 := HeatV.sub_nn K O _ _ e30_38
  have d30_39 := HeatV.sub_nn K O _ _ e30_39
  have d30_40 := HeatV.sub_nn K O _ _ e30_40
  have d30_41 := HeatV.sub_nn K O _ _ e30_41
  have d30_42 := HeatV.sub_nn K O _ _ e30_42
  have d30_43 := HeatV.sub_nn K O _ _ e30_43
  have d30_44 := HeatV.sub_nn K O _ _ e30_44
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d31_35 := HeatV.sub_nn K O _ _ e31_35
  have d31_36 := HeatV.sub_nn K O _ _ e31_36
  have d31_37 := HeatV.sub_nn K O _ _ e31_37
  have d31_38 := HeatV.sub_nn K O _ _ e31_38
  have d31_39 := HeatV.sub_nn K O _ _ e31_39
  have d31_40 := HeatV.sub_nn K O _ _ e31_40
  have d31_41 := HeatV.sub_nn K O _ _ e31_41
  have d31_42 := HeatV.sub_nn K O _ _ e31_42
  have d31_43 := HeatV.sub_nn K O _ _ e31_43
  have d31_44 := HeatV.sub_nn K O _ _ e31_44
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d32_36 := HeatV.sub_nn K O _ _ e32_36
  have d32_37 := HeatV.sub_nn K O _ _ e32_37
  have d32_38 := HeatV.sub_nn K O _ _ e32_38
  have d32_39 := HeatV.sub_nn K O _ _ e32_39
  have d32_40 := HeatV.sub_nn K O _ _ e32_40
  have d32_41 := HeatV.sub_nn K O _ _ e32_41
  have d32_42 := HeatV.sub_nn K O _ _ e32_42
  have d32_43 := HeatV.sub_nn K O _ _ e32_43
  have d32_44 := HeatV.sub_nn K O _ _ e32_44
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d33_36 := HeatV.sub_nn K O _ _ e33_36
  have d33_37 := HeatV.sub_nn K O _ _ e33_37
  have d33_38 := HeatV.sub_nn K O _ _ e33_38
  have d33_39 := HeatV.sub_nn K O _ _ e33_39
  have d33_40 := HeatV.sub_nn K O _ _ e33_40
  have d33_41 := HeatV.sub_nn K O _ _ e33_41
  have d33_42 := HeatV.sub_nn K O _ _ e33_42
  have d33_43 := HeatV.sub_nn K O _ _ e33_43
  have d33_44 := HeatV.sub_nn K O _ _ e33_44
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have d34_36 := HeatV.sub_nn K O _ _ e34_36
  have d34_37 := HeatV.sub_nn K O _ _ e34_37
  have d34_38 := HeatV.sub_nn K O _ _ e34_38
  have d34_39 := HeatV.sub_nn K O _ _ e34_39
  have d34_40 := HeatV.sub_nn K O _ _ e34_40
  have d34_41 := HeatV.sub_nn K O _ _ e34_41
  have d34_42 := HeatV.sub_nn K O _ _ e34_42
  have d34_43 := HeatV.sub_nn K O _ _ e34_43
  have d34_44 := HeatV.sub_nn K O _ _ e34_44
  have d35_36 := HeatV.sub_nn K O _ _ e35_36
  have d35_37 := HeatV.sub_nn K O _ _ e35_37
  have d35_38 := HeatV.sub_nn K O _ _ e35_38
  have d35_39 := HeatV.sub_nn K O _ _ e35_39
  have d35_40 := HeatV.sub_nn K O _ _ e35_40
  have d35_41 := HeatV.sub_nn K O _ _ e35_41
  have d35_42 := HeatV.sub_nn K O _ _ e35_42
  have d35_43 := HeatV.sub_nn K O _ _ e35_43
  have d35_44 := HeatV.sub_nn K O _ _ e35_44
  have d36_37 := HeatV.sub_nn K O _ _ e36_37
  have d36_38 := HeatV.sub_nn K O _ _ e36_38
  have d36_39 := HeatV.sub_nn K O _ _ e36_39
  have d36_40 := HeatV.sub_nn K O _ _ e36_40
  have d36_41 := HeatV.sub_nn K O _ _ e36_41
  have d36_42 := HeatV.sub_nn K O _ _ e36_42
  have d36_43 := HeatV.sub_nn K O _ _ e36_43
  have d37_38 := HeatV.sub_nn K O _ _ e37_38
  have d37_39 := HeatV.sub_nn K O _ _ e37_39
  have d37_40 := HeatV.sub_nn K O _ _ e37_40
  have d37_41 := HeatV.sub_nn K O _ _ e37_41
  have d37_42 := HeatV.sub_nn K O _ _ e37_42
  have d37_43 := HeatV.sub_nn K O _ _ e37_43
  have d37_44 := HeatV.sub_nn K O _ _ e37_44
  have d38_39 := HeatV.sub_nn K O _ _ e38_39
  have d38_40 := HeatV.sub_nn K O _ _ e38_40
  have d38_41 := HeatV.sub_nn K O _ _ e38_41
  have d38_42 := HeatV.sub_nn K O _ _ e38_42
  have d38_43 := HeatV.sub_nn K O _ _ e38_43
  have d39_40 := HeatV.sub_nn K O _ _ e39_40
  have d39_41 := HeatV.sub_nn K O _ _ e39_41
  have d39_42 := HeatV.sub_nn K O _ _ e39_42
  have d39_43 := HeatV.sub_nn K O _ _ e39_43
  have d39_44 := HeatV.sub_nn K O _ _ e39_44
  have d40_41 := HeatV.sub_nn K O _ _ e40_41
  have d40_42 := HeatV.sub_nn K O _ _ e40_42
  have d40_43 := HeatV.sub_nn K O _ _ e40_43
  have d40_44 := HeatV.sub_nn K O _ _ e40_44
  have d41_42 := HeatV.sub_nn K O _ _ e41_42
  have d41_43 := HeatV.sub_nn K O _ _ e41_43
  have d41_44 := HeatV.sub_nn K O _ _ e41_44
  have d42_43 := HeatV.sub_nn K O _ _ e42_43
  have d42_44 := HeatV.sub_nn K O _ _ e42_44
  have d43_44 := HeatV.sub_nn K O _ _ e43_44
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+169073 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 262926225) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (c  -- (+4977 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..45, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 45 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 262926225) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 44) (A 43))) (K.  -- (+5489 chars; full line in the Zenodo source)
      (K.mul (cN K 262553280) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 45) (A 44)))  -- (+5489 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (A 37) (A 38) (A 39) (A 40) (A 41) (A 42) (A 43) (A 44) (A 45) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hnn 7) (hnn 8) (  -- (+330 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 45 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 45 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 45 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 45 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 45 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 45 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 45 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+54253 chars; full line in the Zenodo source)

end G61Lv44

#print axioms G61Lv44.add_nn
#print axioms G61Lv44.level
#print axioms G61Lv44.level_fun

ym/G61Lv45.lean

lean_all/ym/G61Lv45.lean

/-
  ym/G61Lv45 — T45, G61a at level n = 45 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv45

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxHeartbeats 0 in
set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 a42 a43 a44 a45 a46 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a7) (  -- (+930 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+47980 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 299151616) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 45) a44)) (K  -- (+5069 chars; full line in the Zenodo source)
      (K.mul (cN K 298745160) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 46) a45)  -- (+5072 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_33 := HeatV.sub_nn K O _ _ e0_33
  have d0_35 := HeatV.sub_nn K O _ _ e0_35
  have d0_36 := HeatV.sub_nn K O _ _ e0_36
  have d0_37 := HeatV.sub_nn K O _ _ e0_37
  have d0_38 := HeatV.sub_nn K O _ _ e0_38
  have d0_39 := HeatV.sub_nn K O _ _ e0_39
  have d0_40 := HeatV.sub_nn K O _ _ e0_40
  have d0_41 := HeatV.sub_nn K O _ _ e0_41
  have d0_42 := HeatV.sub_nn K O _ _ e0_42
  have d0_43 := HeatV.sub_nn K O _ _ e0_43
  have d0_44 := HeatV.sub_nn K O _ _ e0_44
  have d0_45 := HeatV.sub_nn K O _ _ e0_45
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_29 := HeatV.sub_nn K O _ _ e1_29
  have d1_30 := HeatV.sub_nn K O _ _ e1_30
  have d1_31 := HeatV.sub_nn K O _ _ e1_31
  have d1_33 := HeatV.sub_nn K O _ _ e1_33
  have d1_35 := HeatV.sub_nn K O _ _ e1_35
  have d1_39 := HeatV.sub_nn K O _ _ e1_39
  have d1_40 := HeatV.sub_nn K O _ _ e1_40
  have d1_42 := HeatV.sub_nn K O _ _ e1_42
  have d1_44 := HeatV.sub_nn K O _ _ e1_44
  have d1_45 := HeatV.sub_nn K O _ _ e1_45
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_33 := HeatV.sub_nn K O _ _ e2_33
  have d2_34 := HeatV.sub_nn K O _ _ e2_34
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d2_36 := HeatV.sub_nn K O _ _ e2_36
  have d2_37 := HeatV.sub_nn K O _ _ e2_37
  have d2_38 := HeatV.sub_nn K O _ _ e2_38
  have d2_39 := HeatV.sub_nn K O _ _ e2_39
  have d2_40 := HeatV.sub_nn K O _ _ e2_40
  have d2_42 := HeatV.sub_nn K O _ _ e2_42
  have d2_43 := HeatV.sub_nn K O _ _ e2_43
  have d2_44 := HeatV.sub_nn K O _ _ e2_44
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d3_35 := HeatV.sub_nn K O _ _ e3_35
  have d3_36 := HeatV.sub_nn K O _ _ e3_36
  have d3_37 := HeatV.sub_nn K O _ _ e3_37
  have d3_38 := HeatV.sub_nn K O _ _ e3_38
  have d3_39 := HeatV.sub_nn K O _ _ e3_39
  have d3_40 := HeatV.sub_nn K O _ _ e3_40
  have d3_42 := HeatV.sub_nn K O _ _ e3_42
  have d3_44 := HeatV.sub_nn K O _ _ e3_44
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d4_34 := HeatV.sub_nn K O _ _ e4_34
  have d4_35 := HeatV.sub_nn K O _ _ e4_35
  have d4_36 := HeatV.sub_nn K O _ _ e4_36
  have d4_38 := HeatV.sub_nn K O _ _ e4_38
  have d4_41 := HeatV.sub_nn K O _ _ e4_41
  have d4_42 := HeatV.sub_nn K O _ _ e4_42
  have d4_43 := HeatV.sub_nn K O _ _ e4_43
  have d4_44 := HeatV.sub_nn K O _ _ e4_44
  have d4_45 := HeatV.sub_nn K O _ _ e4_45
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d5_33 := HeatV.sub_nn K O _ _ e5_33
  have d5_34 := HeatV.sub_nn K O _ _ e5_34
  have d5_35 := HeatV.sub_nn K O _ _ e5_35
  have d5_36 := HeatV.sub_nn K O _ _ e5_36
  have d5_38 := HeatV.sub_nn K O _ _ e5_38
  have d5_40 := HeatV.sub_nn K O _ _ e5_40
  have d5_41 := HeatV.sub_nn K O _ _ e5_41
  have d5_42 := HeatV.sub_nn K O _ _ e5_42
  have d5_43 := HeatV.sub_nn K O _ _ e5_43
  have d5_44 := HeatV.sub_nn K O _ _ e5_44
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d6_33 := HeatV.sub_nn K O _ _ e6_33
  have d6_34 := HeatV.sub_nn K O _ _ e6_34
  have d6_35 := HeatV.sub_nn K O _ _ e6_35
  have d6_36 := HeatV.sub_nn K O _ _ e6_36
  have d6_37 := HeatV.sub_nn K O _ _ e6_37
  have d6_39 := HeatV.sub_nn K O _ _ e6_39
  have d6_40 := HeatV.sub_nn K O _ _ e6_40
  have d6_41 := HeatV.sub_nn K O _ _ e6_41
  have d6_42 := HeatV.sub_nn K O _ _ e6_42
  have d6_43 := HeatV.sub_nn K O _ _ e6_43
  have d6_44 := HeatV.sub_nn K O _ _ e6_44
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d7_33 := HeatV.sub_nn K O _ _ e7_33
  have d7_34 := HeatV.sub_nn K O _ _ e7_34
  have d7_35 := HeatV.sub_nn K O _ _ e7_35
  have d7_36 := HeatV.sub_nn K O _ _ e7_36
  have d7_38 := HeatV.sub_nn K O _ _ e7_38
  have d7_39 := HeatV.sub_nn K O _ _ e7_39
  have d7_40 := HeatV.sub_nn K O _ _ e7_40
  have d7_41 := HeatV.sub_nn K O _ _ e7_41
  have d7_42 := HeatV.sub_nn K O _ _ e7_42
  have d7_44 := HeatV.sub_nn K O _ _ e7_44
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_34 := HeatV.sub_nn K O _ _ e8_34
  have d8_35 := HeatV.sub_nn K O _ _ e8_35
  have d8_37 := HeatV.sub_nn K O _ _ e8_37
  have d8_38 := HeatV.sub_nn K O _ _ e8_38
  have d8_39 := HeatV.sub_nn K O _ _ e8_39
  have d8_40 := HeatV.sub_nn K O _ _ e8_40
  have d8_41 := HeatV.sub_nn K O _ _ e8_41
  have d8_42 := HeatV.sub_nn K O _ _ e8_42
  have d8_43 := HeatV.sub_nn K O _ _ e8_43
  have d8_44 := HeatV.sub_nn K O _ _ e8_44
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d9_36 := HeatV.sub_nn K O _ _ e9_36
  have d9_37 := HeatV.sub_nn K O _ _ e9_37
  have d9_38 := HeatV.sub_nn K O _ _ e9_38
  have d9_39 := HeatV.sub_nn K O _ _ e9_39
  have d9_40 := HeatV.sub_nn K O _ _ e9_40
  have d9_41 := HeatV.sub_nn K O _ _ e9_41
  have d9_42 := HeatV.sub_nn K O _ _ e9_42
  have d9_43 := HeatV.sub_nn K O _ _ e9_43
  have d9_44 := HeatV.sub_nn K O _ _ e9_44
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_35 := HeatV.sub_nn K O _ _ e10_35
  have d10_36 := HeatV.sub_nn K O _ _ e10_36
  have d10_37 := HeatV.sub_nn K O _ _ e10_37
  have d10_38 := HeatV.sub_nn K O _ _ e10_38
  have d10_39 := HeatV.sub_nn K O _ _ e10_39
  have d10_40 := HeatV.sub_nn K O _ _ e10_40
  have d10_42 := HeatV.sub_nn K O _ _ e10_42
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d11_35 := HeatV.sub_nn K O _ _ e11_35
  have d11_36 := HeatV.sub_nn K O _ _ e11_36
  have d11_37 := HeatV.sub_nn K O _ _ e11_37
  have d11_38 := HeatV.sub_nn K O _ _ e11_38
  have d11_39 := HeatV.sub_nn K O _ _ e11_39
  have d11_40 := HeatV.sub_nn K O _ _ e11_40
  have d11_41 := HeatV.sub_nn K O _ _ e11_41
  have d11_42 := HeatV.sub_nn K O _ _ e11_42
  have d11_43 := HeatV.sub_nn K O _ _ e11_43
  have d11_44 := HeatV.sub_nn K O _ _ e11_44
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d12_34 := HeatV.sub_nn K O _ _ e12_34
  have d12_35 := HeatV.sub_nn K O _ _ e12_35
  have d12_36 := HeatV.sub_nn K O _ _ e12_36
  have d12_37 := HeatV.sub_nn K O _ _ e12_37
  have d12_38 := HeatV.sub_nn K O _ _ e12_38
  have d12_39 := HeatV.sub_nn K O _ _ e12_39
  have d12_40 := HeatV.sub_nn K O _ _ e12_40
  have d12_41 := HeatV.sub_nn K O _ _ e12_41
  have d12_42 := HeatV.sub_nn K O _ _ e12_42
  have d12_44 := HeatV.sub_nn K O _ _ e12_44
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_33 := HeatV.sub_nn K O _ _ e13_33
  have d13_34 := HeatV.sub_nn K O _ _ e13_34
  have d13_35 := HeatV.sub_nn K O _ _ e13_35
  have d13_36 := HeatV.sub_nn K O _ _ e13_36
  have d13_37 := HeatV.sub_nn K O _ _ e13_37
  have d13_38 := HeatV.sub_nn K O _ _ e13_38
  have d13_39 := HeatV.sub_nn K O _ _ e13_39
  have d13_40 := HeatV.sub_nn K O _ _ e13_40
  have d13_41 := HeatV.sub_nn K O _ _ e13_41
  have d13_42 := HeatV.sub_nn K O _ _ e13_42
  have d13_43 := HeatV.sub_nn K O _ _ e13_43
  have d13_44 := HeatV.sub_nn K O _ _ e13_44
  have d13_45 := HeatV.sub_nn K O _ _ e13_45
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d14_32 := HeatV.sub_nn K O _ _ e14_32
  have d14_33 := HeatV.sub_nn K O _ _ e14_33
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d14_35 := HeatV.sub_nn K O _ _ e14_35
  have d14_36 := HeatV.sub_nn K O _ _ e14_36
  have d14_37 := HeatV.sub_nn K O _ _ e14_37
  have d14_38 := HeatV.sub_nn K O _ _ e14_38
  have d14_39 := HeatV.sub_nn K O _ _ e14_39
  have d14_40 := HeatV.sub_nn K O _ _ e14_40
  have d14_41 := HeatV.sub_nn K O _ _ e14_41
  have d14_42 := HeatV.sub_nn K O _ _ e14_42
  have d14_43 := HeatV.sub_nn K O _ _ e14_43
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_34 := HeatV.sub_nn K O _ _ e15_34
  have d15_35 := HeatV.sub_nn K O _ _ e15_35
  have d15_36 := HeatV.sub_nn K O _ _ e15_36
  have d15_37 := HeatV.sub_nn K O _ _ e15_37
  have d15_38 := HeatV.sub_nn K O _ _ e15_38
  have d15_39 := HeatV.sub_nn K O _ _ e15_39
  have d15_40 := HeatV.sub_nn K O _ _ e15_40
  have d15_41 := HeatV.sub_nn K O _ _ e15_41
  have d15_42 := HeatV.sub_nn K O _ _ e15_42
  have d15_43 := HeatV.sub_nn K O _ _ e15_43
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d16_36 := HeatV.sub_nn K O _ _ e16_36
  have d16_37 := HeatV.sub_nn K O _ _ e16_37
  have d16_38 := HeatV.sub_nn K O _ _ e16_38
  have d16_39 := HeatV.sub_nn K O _ _ e16_39
  have d16_40 := HeatV.sub_nn K O _ _ e16_40
  have d16_41 := HeatV.sub_nn K O _ _ e16_41
  have d16_42 := HeatV.sub_nn K O _ _ e16_42
  have d16_43 := HeatV.sub_nn K O _ _ e16_43
  have d16_44 := HeatV.sub_nn K O _ _ e16_44
  have d16_45 := HeatV.sub_nn K O _ _ e16_45
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_34 := HeatV.sub_nn K O _ _ e17_34
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d17_36 := HeatV.sub_nn K O _ _ e17_36
  have d17_37 := HeatV.sub_nn K O _ _ e17_37
  have d17_38 := HeatV.sub_nn K O _ _ e17_38
  have d17_39 := HeatV.sub_nn K O _ _ e17_39
  have d17_40 := HeatV.sub_nn K O _ _ e17_40
  have d17_41 := HeatV.sub_nn K O _ _ e17_41
  have d17_42 := HeatV.sub_nn K O _ _ e17_42
  have d17_43 := HeatV.sub_nn K O _ _ e17_43
  have d17_44 := HeatV.sub_nn K O _ _ e17_44
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d18_34 := HeatV.sub_nn K O _ _ e18_34
  have d18_35 := HeatV.sub_nn K O _ _ e18_35
  have d18_36 := HeatV.sub_nn K O _ _ e18_36
  have d18_37 := HeatV.sub_nn K O _ _ e18_37
  have d18_38 := HeatV.sub_nn K O _ _ e18_38
  have d18_40 := HeatV.sub_nn K O _ _ e18_40
  have d18_41 := HeatV.sub_nn K O _ _ e18_41
  have d18_42 := HeatV.sub_nn K O _ _ e18_42
  have d18_43 := HeatV.sub_nn K O _ _ e18_43
  have d18_44 := HeatV.sub_nn K O _ _ e18_44
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d19_34 := HeatV.sub_nn K O _ _ e19_34
  have d19_35 := HeatV.sub_nn K O _ _ e19_35
  have d19_36 := HeatV.sub_nn K O _ _ e19_36
  have d19_37 := HeatV.sub_nn K O _ _ e19_37
  have d19_38 := HeatV.sub_nn K O _ _ e19_38
  have d19_39 := HeatV.sub_nn K O _ _ e19_39
  have d19_40 := HeatV.sub_nn K O _ _ e19_40
  have d19_41 := HeatV.sub_nn K O _ _ e19_41
  have d19_42 := HeatV.sub_nn K O _ _ e19_42
  have d19_43 := HeatV.sub_nn K O _ _ e19_43
  have d19_44 := HeatV.sub_nn K O _ _ e19_44
  have d19_45 := HeatV.sub_nn K O _ _ e19_45
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_34 := HeatV.sub_nn K O _ _ e20_34
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d20_36 := HeatV.sub_nn K O _ _ e20_36
  have d20_37 := HeatV.sub_nn K O _ _ e20_37
  have d20_38 := HeatV.sub_nn K O _ _ e20_38
  have d20_39 := HeatV.sub_nn K O _ _ e20_39
  have d20_40 := HeatV.sub_nn K O _ _ e20_40
  have d20_41 := HeatV.sub_nn K O _ _ e20_41
  have d20_42 := HeatV.sub_nn K O _ _ e20_42
  have d20_43 := HeatV.sub_nn K O _ _ e20_43
  have d20_44 := HeatV.sub_nn K O _ _ e20_44
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d21_35 := HeatV.sub_nn K O _ _ e21_35
  have d21_36 := HeatV.sub_nn K O _ _ e21_36
  have d21_37 := HeatV.sub_nn K O _ _ e21_37
  have d21_38 := HeatV.sub_nn K O _ _ e21_38
  have d21_40 := HeatV.sub_nn K O _ _ e21_40
  have d21_42 := HeatV.sub_nn K O _ _ e21_42
  have d21_43 := HeatV.sub_nn K O _ _ e21_43
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d22_36 := HeatV.sub_nn K O _ _ e22_36
  have d22_37 := HeatV.sub_nn K O _ _ e22_37
  have d22_38 := HeatV.sub_nn K O _ _ e22_38
  have d22_39 := HeatV.sub_nn K O _ _ e22_39
  have d22_40 := HeatV.sub_nn K O _ _ e22_40
  have d22_41 := HeatV.sub_nn K O _ _ e22_41
  have d22_42 := HeatV.sub_nn K O _ _ e22_42
  have d22_43 := HeatV.sub_nn K O _ _ e22_43
  have d22_44 := HeatV.sub_nn K O _ _ e22_44
  have d22_45 := HeatV.sub_nn K O _ _ e22_45
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d23_36 := HeatV.sub_nn K O _ _ e23_36
  have d23_37 := HeatV.sub_nn K O _ _ e23_37
  have d23_38 := HeatV.sub_nn K O _ _ e23_38
  have d23_39 := HeatV.sub_nn K O _ _ e23_39
  have d23_40 := HeatV.sub_nn K O _ _ e23_40
  have d23_41 := HeatV.sub_nn K O _ _ e23_41
  have d23_42 := HeatV.sub_nn K O _ _ e23_42
  have d23_43 := HeatV.sub_nn K O _ _ e23_43
  have d23_44 := HeatV.sub_nn K O _ _ e23_44
  have d23_45 := HeatV.sub_nn K O _ _ e23_45
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d24_35 := HeatV.sub_nn K O _ _ e24_35
  have d24_36 := HeatV.sub_nn K O _ _ e24_36
  have d24_37 := HeatV.sub_nn K O _ _ e24_37
  have d24_38 := HeatV.sub_nn K O _ _ e24_38
  have d24_39 := HeatV.sub_nn K O _ _ e24_39
  have d24_40 := HeatV.sub_nn K O _ _ e24_40
  have d24_41 := HeatV.sub_nn K O _ _ e24_41
  have d24_42 := HeatV.sub_nn K O _ _ e24_42
  have d24_43 := HeatV.sub_nn K O _ _ e24_43
  have d24_44 := HeatV.sub_nn K O _ _ e24_44
  have d24_45 := HeatV.sub_nn K O _ _ e24_45
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d25_35 := HeatV.sub_nn K O _ _ e25_35
  have d25_36 := HeatV.sub_nn K O _ _ e25_36
  have d25_37 := HeatV.sub_nn K O _ _ e25_37
  have d25_38 := HeatV.sub_nn K O _ _ e25_38
  have d25_39 := HeatV.sub_nn K O _ _ e25_39
  have d25_40 := HeatV.sub_nn K O _ _ e25_40
  have d25_41 := HeatV.sub_nn K O _ _ e25_41
  have d25_42 := HeatV.sub_nn K O _ _ e25_42
  have d25_43 := HeatV.sub_nn K O _ _ e25_43
  have d25_44 := HeatV.sub_nn K O _ _ e25_44
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d26_36 := HeatV.sub_nn K O _ _ e26_36
  have d26_37 := HeatV.sub_nn K O _ _ e26_37
  have d26_38 := HeatV.sub_nn K O _ _ e26_38
  have d26_39 := HeatV.sub_nn K O _ _ e26_39
  have d26_40 := HeatV.sub_nn K O _ _ e26_40
  have d26_41 := HeatV.sub_nn K O _ _ e26_41
  have d26_42 := HeatV.sub_nn K O _ _ e26_42
  have d26_43 := HeatV.sub_nn K O _ _ e26_43
  have d26_44 := HeatV.sub_nn K O _ _ e26_44
  have d26_45 := HeatV.sub_nn K O _ _ e26_45
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d27_35 := HeatV.sub_nn K O _ _ e27_35
  have d27_36 := HeatV.sub_nn K O _ _ e27_36
  have d27_37 := HeatV.sub_nn K O _ _ e27_37
  have d27_38 := HeatV.sub_nn K O _ _ e27_38
  have d27_39 := HeatV.sub_nn K O _ _ e27_39
  have d27_40 := HeatV.sub_nn K O _ _ e27_40
  have d27_41 := HeatV.sub_nn K O _ _ e27_41
  have d27_42 := HeatV.sub_nn K O _ _ e27_42
  have d27_43 := HeatV.sub_nn K O _ _ e27_43
  have d27_44 := HeatV.sub_nn K O _ _ e27_44
  have d27_45 := HeatV.sub_nn K O _ _ e27_45
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d28_35 := HeatV.sub_nn K O _ _ e28_35
  have d28_36 := HeatV.sub_nn K O _ _ e28_36
  have d28_37 := HeatV.sub_nn K O _ _ e28_37
  have d28_38 := HeatV.sub_nn K O _ _ e28_38
  have d28_39 := HeatV.sub_nn K O _ _ e28_39
  have d28_40 := HeatV.sub_nn K O _ _ e28_40
  have d28_41 := HeatV.sub_nn K O _ _ e28_41
  have d28_42 := HeatV.sub_nn K O _ _ e28_42
  have d28_43 := HeatV.sub_nn K O _ _ e28_43
  have d28_44 := HeatV.sub_nn K O _ _ e28_44
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d29_36 := HeatV.sub_nn K O _ _ e29_36
  have d29_37 := HeatV.sub_nn K O _ _ e29_37
  have d29_38 := HeatV.sub_nn K O _ _ e29_38
  have d29_39 := HeatV.sub_nn K O _ _ e29_39
  have d29_40 := HeatV.sub_nn K O _ _ e29_40
  have d29_41 := HeatV.sub_nn K O _ _ e29_41
  have d29_42 := HeatV.sub_nn K O _ _ e29_42
  have d29_43 := HeatV.sub_nn K O _ _ e29_43
  have d29_44 := HeatV.sub_nn K O _ _ e29_44
  have d29_45 := HeatV.sub_nn K O _ _ e29_45
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d30_35 := HeatV.sub_nn K O _ _ e30_35
  have d30_36 := HeatV.sub_nn K O _ _ e30_36
  have d30_37 := HeatV.sub_nn K O _ _ e30_37
  have d30_38 := HeatV.sub_nn K O _ _ e30_38
  have d30_39 := HeatV.sub_nn K O _ _ e30_39
  have d30_40 := HeatV.sub_nn K O _ _ e30_40
  have d30_41 := HeatV.sub_nn K O _ _ e30_41
  have d30_42 := HeatV.sub_nn K O _ _ e30_42
  have d30_43 := HeatV.sub_nn K O _ _ e30_43
  have d30_44 := HeatV.sub_nn K O _ _ e30_44
  have d30_45 := HeatV.sub_nn K O _ _ e30_45
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d31_35 := HeatV.sub_nn K O _ _ e31_35
  have d31_36 := HeatV.sub_nn K O _ _ e31_36
  have d31_37 := HeatV.sub_nn K O _ _ e31_37
  have d31_38 := HeatV.sub_nn K O _ _ e31_38
  have d31_39 := HeatV.sub_nn K O _ _ e31_39
  have d31_40 := HeatV.sub_nn K O _ _ e31_40
  have d31_41 := HeatV.sub_nn K O _ _ e31_41
  have d31_42 := HeatV.sub_nn K O _ _ e31_42
  have d31_43 := HeatV.sub_nn K O _ _ e31_43
  have d31_44 := HeatV.sub_nn K O _ _ e31_44
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d32_36 := HeatV.sub_nn K O _ _ e32_36
  have d32_37 := HeatV.sub_nn K O _ _ e32_37
  have d32_38 := HeatV.sub_nn K O _ _ e32_38
  have d32_39 := HeatV.sub_nn K O _ _ e32_39
  have d32_40 := HeatV.sub_nn K O _ _ e32_40
  have d32_41 := HeatV.sub_nn K O _ _ e32_41
  have d32_42 := HeatV.sub_nn K O _ _ e32_42
  have d32_43 := HeatV.sub_nn K O _ _ e32_43
  have d32_44 := HeatV.sub_nn K O _ _ e32_44
  have d32_45 := HeatV.sub_nn K O _ _ e32_45
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d33_36 := HeatV.sub_nn K O _ _ e33_36
  have d33_37 := HeatV.sub_nn K O _ _ e33_37
  have d33_38 := HeatV.sub_nn K O _ _ e33_38
  have d33_39 := HeatV.sub_nn K O _ _ e33_39
  have d33_40 := HeatV.sub_nn K O _ _ e33_40
  have d33_41 := HeatV.sub_nn K O _ _ e33_41
  have d33_42 := HeatV.sub_nn K O _ _ e33_42
  have d33_43 := HeatV.sub_nn K O _ _ e33_43
  have d33_44 := HeatV.sub_nn K O _ _ e33_44
  have d33_45 := HeatV.sub_nn K O _ _ e33_45
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have d34_36 := HeatV.sub_nn K O _ _ e34_36
  have d34_37 := HeatV.sub_nn K O _ _ e34_37
  have d34_38 := HeatV.sub_nn K O _ _ e34_38
  have d34_39 := HeatV.sub_nn K O _ _ e34_39
  have d34_40 := HeatV.sub_nn K O _ _ e34_40
  have d34_41 := HeatV.sub_nn K O _ _ e34_41
  have d34_42 := HeatV.sub_nn K O _ _ e34_42
  have d34_43 := HeatV.sub_nn K O _ _ e34_43
  have d34_44 := HeatV.sub_nn K O _ _ e34_44
  have d34_45 := HeatV.sub_nn K O _ _ e34_45
  have d35_36 := HeatV.sub_nn K O _ _ e35_36
  have d35_37 := HeatV.sub_nn K O _ _ e35_37
  have d35_38 := HeatV.sub_nn K O _ _ e35_38
  have d35_39 := HeatV.sub_nn K O _ _ e35_39
  have d35_40 := HeatV.sub_nn K O _ _ e35_40
  have d35_41 := HeatV.sub_nn K O _ _ e35_41
  have d35_42 := HeatV.sub_nn K O _ _ e35_42
  have d35_43 := HeatV.sub_nn K O _ _ e35_43
  have d35_44 := HeatV.sub_nn K O _ _ e35_44
  have d35_45 := HeatV.sub_nn K O _ _ e35_45
  have d36_37 := HeatV.sub_nn K O _ _ e36_37
  have d36_38 := HeatV.sub_nn K O _ _ e36_38
  have d36_39 := HeatV.sub_nn K O _ _ e36_39
  have d36_40 := HeatV.sub_nn K O _ _ e36_40
  have d36_41 := HeatV.sub_nn K O _ _ e36_41
  have d36_42 := HeatV.sub_nn K O _ _ e36_42
  have d36_43 := HeatV.sub_nn K O _ _ e36_43
  have d36_44 := HeatV.sub_nn K O _ _ e36_44
  have d36_45 := HeatV.sub_nn K O _ _ e36_45
  have d37_38 := HeatV.sub_nn K O _ _ e37_38
  have d37_39 := HeatV.sub_nn K O _ _ e37_39
  have d37_40 := HeatV.sub_nn K O _ _ e37_40
  have d37_41 := HeatV.sub_nn K O _ _ e37_41
  have d37_42 := HeatV.sub_nn K O _ _ e37_42
  have d37_43 := HeatV.sub_nn K O _ _ e37_43
  have d37_44 := HeatV.sub_nn K O _ _ e37_44
  have d37_45 := HeatV.sub_nn K O _ _ e37_45
  have d38_39 := HeatV.sub_nn K O _ _ e38_39
  have d38_40 := HeatV.sub_nn K O _ _ e38_40
  have d38_41 := HeatV.sub_nn K O _ _ e38_41
  have d38_42 := HeatV.sub_nn K O _ _ e38_42
  have d38_43 := HeatV.sub_nn K O _ _ e38_43
  have d38_44 := HeatV.sub_nn K O _ _ e38_44
  have d38_45 := HeatV.sub_nn K O _ _ e38_45
  have d39_40 := HeatV.sub_nn K O _ _ e39_40
  have d39_41 := HeatV.sub_nn K O _ _ e39_41
  have d39_42 := HeatV.sub_nn K O _ _ e39_42
  have d39_43 := HeatV.sub_nn K O _ _ e39_43
  have d39_44 := HeatV.sub_nn K O _ _ e39_44
  have d39_45 := HeatV.sub_nn K O _ _ e39_45
  have d40_41 := HeatV.sub_nn K O _ _ e40_41
  have d40_42 := HeatV.sub_nn K O _ _ e40_42
  have d40_43 := HeatV.sub_nn K O _ _ e40_43
  have d40_44 := HeatV.sub_nn K O _ _ e40_44
  have d40_45 := HeatV.sub_nn K O _ _ e40_45
  have d41_42 := HeatV.sub_nn K O _ _ e41_42
  have d41_43 := HeatV.sub_nn K O _ _ e41_43
  have d41_44 := HeatV.sub_nn K O _ _ e41_44
  have d41_45 := HeatV.sub_nn K O _ _ e41_45
  have d42_43 := HeatV.sub_nn K O _ _ e42_43
  have d42_44 := HeatV.sub_nn K O _ _ e42_44
  have d42_45 := HeatV.sub_nn K O _ _ e42_45
  have d43_44 := HeatV.sub_nn K O _ _ e43_44
  have d43_45 := HeatV.sub_nn K O _ _ e43_45
  have d44_45 := HeatV.sub_nn K O _ _ e44_45
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+178749 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 299151616) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K  -- (+5097 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..46, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 46 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 299151616) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 45) (A 44  -- (+5621 chars; full line in the Zenodo source)
      (K.mul (cN K 298745160) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 46) (  -- (+5621 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (A 37) (A 38) (A 39) (A 40) (A 41) (A 42) (A 43) (A 44) (A 45) (A 46) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hnn 7) (h  -- (+346 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 46 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 46 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 46 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 46 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 46 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 46 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 46 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+56753 chars; full line in the Zenodo source)

end G61Lv45

#print axioms G61Lv45.add_nn
#print axioms G61Lv45.level
#print axioms G61Lv45.level_fun

ym/G61Lv46.lean

lean_all/ym/G61Lv46.lean

/-
  ym/G61Lv46 — T45, G61a at level n = 46 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv46

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxHeartbeats 0 in
set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 a42 a43 a44 a45 a46 a47 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a  -- (+958 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+50159 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 339443776) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 46) a  -- (+5189 chars; full line in the Zenodo source)
      (K.mul (cN K 339001600) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 4  -- (+5192 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_29 := HeatV.sub_nn K O _ _ e0_29
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_32 := HeatV.sub_nn K O _ _ e0_32
  have d0_33 := HeatV.sub_nn K O _ _ e0_33
  have d0_36 := HeatV.sub_nn K O _ _ e0_36
  have d0_37 := HeatV.sub_nn K O _ _ e0_37
  have d0_41 := HeatV.sub_nn K O _ _ e0_41
  have d0_42 := HeatV.sub_nn K O _ _ e0_42
  have d0_44 := HeatV.sub_nn K O _ _ e0_44
  have d0_45 := HeatV.sub_nn K O _ _ e0_45
  have d0_46 := HeatV.sub_nn K O _ _ e0_46
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_29 := HeatV.sub_nn K O _ _ e1_29
  have d1_30 := HeatV.sub_nn K O _ _ e1_30
  have d1_35 := HeatV.sub_nn K O _ _ e1_35
  have d1_36 := HeatV.sub_nn K O _ _ e1_36
  have d1_37 := HeatV.sub_nn K O _ _ e1_37
  have d1_38 := HeatV.sub_nn K O _ _ e1_38
  have d1_39 := HeatV.sub_nn K O _ _ e1_39
  have d1_40 := HeatV.sub_nn K O _ _ e1_40
  have d1_41 := HeatV.sub_nn K O _ _ e1_41
  have d1_43 := HeatV.sub_nn K O _ _ e1_43
  have d1_44 := HeatV.sub_nn K O _ _ e1_44
  have d1_45 := HeatV.sub_nn K O _ _ e1_45
  have d1_46 := HeatV.sub_nn K O _ _ e1_46
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_33 := HeatV.sub_nn K O _ _ e2_33
  have d2_34 := HeatV.sub_nn K O _ _ e2_34
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d2_36 := HeatV.sub_nn K O _ _ e2_36
  have d2_37 := HeatV.sub_nn K O _ _ e2_37
  have d2_38 := HeatV.sub_nn K O _ _ e2_38
  have d2_39 := HeatV.sub_nn K O _ _ e2_39
  have d2_41 := HeatV.sub_nn K O _ _ e2_41
  have d2_42 := HeatV.sub_nn K O _ _ e2_42
  have d2_44 := HeatV.sub_nn K O _ _ e2_44
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d3_34 := HeatV.sub_nn K O _ _ e3_34
  have d3_36 := HeatV.sub_nn K O _ _ e3_36
  have d3_37 := HeatV.sub_nn K O _ _ e3_37
  have d3_38 := HeatV.sub_nn K O _ _ e3_38
  have d3_39 := HeatV.sub_nn K O _ _ e3_39
  have d3_40 := HeatV.sub_nn K O _ _ e3_40
  have d3_41 := HeatV.sub_nn K O _ _ e3_41
  have d3_43 := HeatV.sub_nn K O _ _ e3_43
  have d3_44 := HeatV.sub_nn K O _ _ e3_44
  have d3_45 := HeatV.sub_nn K O _ _ e3_45
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d4_34 := HeatV.sub_nn K O _ _ e4_34
  have d4_35 := HeatV.sub_nn K O _ _ e4_35
  have d4_36 := HeatV.sub_nn K O _ _ e4_36
  have d4_37 := HeatV.sub_nn K O _ _ e4_37
  have d4_38 := HeatV.sub_nn K O _ _ e4_38
  have d4_39 := HeatV.sub_nn K O _ _ e4_39
  have d4_40 := HeatV.sub_nn K O _ _ e4_40
  have d4_41 := HeatV.sub_nn K O _ _ e4_41
  have d4_42 := HeatV.sub_nn K O _ _ e4_42
  have d4_43 := HeatV.sub_nn K O _ _ e4_43
  have d4_44 := HeatV.sub_nn K O _ _ e4_44
  have d4_45 := HeatV.sub_nn K O _ _ e4_45
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d5_34 := HeatV.sub_nn K O _ _ e5_34
  have d5_35 := HeatV.sub_nn K O _ _ e5_35
  have d5_36 := HeatV.sub_nn K O _ _ e5_36
  have d5_37 := HeatV.sub_nn K O _ _ e5_37
  have d5_38 := HeatV.sub_nn K O _ _ e5_38
  have d5_39 := HeatV.sub_nn K O _ _ e5_39
  have d5_41 := HeatV.sub_nn K O _ _ e5_41
  have d5_42 := HeatV.sub_nn K O _ _ e5_42
  have d5_43 := HeatV.sub_nn K O _ _ e5_43
  have d5_44 := HeatV.sub_nn K O _ _ e5_44
  have d5_45 := HeatV.sub_nn K O _ _ e5_45
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d6_33 := HeatV.sub_nn K O _ _ e6_33
  have d6_34 := HeatV.sub_nn K O _ _ e6_34
  have d6_35 := HeatV.sub_nn K O _ _ e6_35
  have d6_36 := HeatV.sub_nn K O _ _ e6_36
  have d6_37 := HeatV.sub_nn K O _ _ e6_37
  have d6_38 := HeatV.sub_nn K O _ _ e6_38
  have d6_40 := HeatV.sub_nn K O _ _ e6_40
  have d6_41 := HeatV.sub_nn K O _ _ e6_41
  have d6_42 := HeatV.sub_nn K O _ _ e6_42
  have d6_43 := HeatV.sub_nn K O _ _ e6_43
  have d6_44 := HeatV.sub_nn K O _ _ e6_44
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d7_33 := HeatV.sub_nn K O _ _ e7_33
  have d7_34 := HeatV.sub_nn K O _ _ e7_34
  have d7_35 := HeatV.sub_nn K O _ _ e7_35
  have d7_36 := HeatV.sub_nn K O _ _ e7_36
  have d7_37 := HeatV.sub_nn K O _ _ e7_37
  have d7_39 := HeatV.sub_nn K O _ _ e7_39
  have d7_40 := HeatV.sub_nn K O _ _ e7_40
  have d7_41 := HeatV.sub_nn K O _ _ e7_41
  have d7_42 := HeatV.sub_nn K O _ _ e7_42
  have d7_43 := HeatV.sub_nn K O _ _ e7_43
  have d7_44 := HeatV.sub_nn K O _ _ e7_44
  have d7_45 := HeatV.sub_nn K O _ _ e7_45
  have d7_46 := HeatV.sub_nn K O _ _ e7_46
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_32 := HeatV.sub_nn K O _ _ e8_32
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_34 := HeatV.sub_nn K O _ _ e8_34
  have d8_35 := HeatV.sub_nn K O _ _ e8_35
  have d8_36 := HeatV.sub_nn K O _ _ e8_36
  have d8_38 := HeatV.sub_nn K O _ _ e8_38
  have d8_39 := HeatV.sub_nn K O _ _ e8_39
  have d8_40 := HeatV.sub_nn K O _ _ e8_40
  have d8_41 := HeatV.sub_nn K O _ _ e8_41
  have d8_42 := HeatV.sub_nn K O _ _ e8_42
  have d8_43 := HeatV.sub_nn K O _ _ e8_43
  have d8_44 := HeatV.sub_nn K O _ _ e8_44
  have d8_45 := HeatV.sub_nn K O _ _ e8_45
  have d8_46 := HeatV.sub_nn K O _ _ e8_46
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d9_34 := HeatV.sub_nn K O _ _ e9_34
  have d9_35 := HeatV.sub_nn K O _ _ e9_35
  have d9_36 := HeatV.sub_nn K O _ _ e9_36
  have d9_37 := HeatV.sub_nn K O _ _ e9_37
  have d9_38 := HeatV.sub_nn K O _ _ e9_38
  have d9_39 := HeatV.sub_nn K O _ _ e9_39
  have d9_40 := HeatV.sub_nn K O _ _ e9_40
  have d9_41 := HeatV.sub_nn K O _ _ e9_41
  have d9_42 := HeatV.sub_nn K O _ _ e9_42
  have d9_43 := HeatV.sub_nn K O _ _ e9_43
  have d9_44 := HeatV.sub_nn K O _ _ e9_44
  have d9_45 := HeatV.sub_nn K O _ _ e9_45
  have d9_46 := HeatV.sub_nn K O _ _ e9_46
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_34 := HeatV.sub_nn K O _ _ e10_34
  have d10_35 := HeatV.sub_nn K O _ _ e10_35
  have d10_36 := HeatV.sub_nn K O _ _ e10_36
  have d10_37 := HeatV.sub_nn K O _ _ e10_37
  have d10_38 := HeatV.sub_nn K O _ _ e10_38
  have d10_39 := HeatV.sub_nn K O _ _ e10_39
  have d10_40 := HeatV.sub_nn K O _ _ e10_40
  have d10_41 := HeatV.sub_nn K O _ _ e10_41
  have d10_43 := HeatV.sub_nn K O _ _ e10_43
  have d10_44 := HeatV.sub_nn K O _ _ e10_44
  have d10_46 := HeatV.sub_nn K O _ _ e10_46
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d11_33 := HeatV.sub_nn K O _ _ e11_33
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d11_35 := HeatV.sub_nn K O _ _ e11_35
  have d11_36 := HeatV.sub_nn K O _ _ e11_36
  have d11_37 := HeatV.sub_nn K O _ _ e11_37
  have d11_38 := HeatV.sub_nn K O _ _ e11_38
  have d11_39 := HeatV.sub_nn K O _ _ e11_39
  have d11_40 := HeatV.sub_nn K O _ _ e11_40
  have d11_41 := HeatV.sub_nn K O _ _ e11_41
  have d11_42 := HeatV.sub_nn K O _ _ e11_42
  have d11_43 := HeatV.sub_nn K O _ _ e11_43
  have d11_44 := HeatV.sub_nn K O _ _ e11_44
  have d11_46 := HeatV.sub_nn K O _ _ e11_46
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_34 := HeatV.sub_nn K O _ _ e12_34
  have d12_35 := HeatV.sub_nn K O _ _ e12_35
  have d12_36 := HeatV.sub_nn K O _ _ e12_36
  have d12_37 := HeatV.sub_nn K O _ _ e12_37
  have d12_38 := HeatV.sub_nn K O _ _ e12_38
  have d12_39 := HeatV.sub_nn K O _ _ e12_39
  have d12_41 := HeatV.sub_nn K O _ _ e12_41
  have d12_42 := HeatV.sub_nn K O _ _ e12_42
  have d12_43 := HeatV.sub_nn K O _ _ e12_43
  have d12_45 := HeatV.sub_nn K O _ _ e12_45
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_33 := HeatV.sub_nn K O _ _ e13_33
  have d13_34 := HeatV.sub_nn K O _ _ e13_34
  have d13_35 := HeatV.sub_nn K O _ _ e13_35
  have d13_36 := HeatV.sub_nn K O _ _ e13_36
  have d13_37 := HeatV.sub_nn K O _ _ e13_37
  have d13_38 := HeatV.sub_nn K O _ _ e13_38
  have d13_39 := HeatV.sub_nn K O _ _ e13_39
  have d13_40 := HeatV.sub_nn K O _ _ e13_40
  have d13_41 := HeatV.sub_nn K O _ _ e13_41
  have d13_42 := HeatV.sub_nn K O _ _ e13_42
  have d13_43 := HeatV.sub_nn K O _ _ e13_43
  have d13_45 := HeatV.sub_nn K O _ _ e13_45
  have d13_46 := HeatV.sub_nn K O _ _ e13_46
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_32 := HeatV.sub_nn K O _ _ e14_32
  have d14_33 := HeatV.sub_nn K O _ _ e14_33
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d14_35 := HeatV.sub_nn K O _ _ e14_35
  have d14_36 := HeatV.sub_nn K O _ _ e14_36
  have d14_38 := HeatV.sub_nn K O _ _ e14_38
  have d14_39 := HeatV.sub_nn K O _ _ e14_39
  have d14_40 := HeatV.sub_nn K O _ _ e14_40
  have d14_41 := HeatV.sub_nn K O _ _ e14_41
  have d14_43 := HeatV.sub_nn K O _ _ e14_43
  have d14_45 := HeatV.sub_nn K O _ _ e14_45
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_34 := HeatV.sub_nn K O _ _ e15_34
  have d15_35 := HeatV.sub_nn K O _ _ e15_35
  have d15_36 := HeatV.sub_nn K O _ _ e15_36
  have d15_37 := HeatV.sub_nn K O _ _ e15_37
  have d15_38 := HeatV.sub_nn K O _ _ e15_38
  have d15_39 := HeatV.sub_nn K O _ _ e15_39
  have d15_40 := HeatV.sub_nn K O _ _ e15_40
  have d15_41 := HeatV.sub_nn K O _ _ e15_41
  have d15_42 := HeatV.sub_nn K O _ _ e15_42
  have d15_43 := HeatV.sub_nn K O _ _ e15_43
  have d15_44 := HeatV.sub_nn K O _ _ e15_44
  have d15_45 := HeatV.sub_nn K O _ _ e15_45
  have d15_46 := HeatV.sub_nn K O _ _ e15_46
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d16_36 := HeatV.sub_nn K O _ _ e16_36
  have d16_38 := HeatV.sub_nn K O _ _ e16_38
  have d16_39 := HeatV.sub_nn K O _ _ e16_39
  have d16_40 := HeatV.sub_nn K O _ _ e16_40
  have d16_41 := HeatV.sub_nn K O _ _ e16_41
  have d16_42 := HeatV.sub_nn K O _ _ e16_42
  have d16_43 := HeatV.sub_nn K O _ _ e16_43
  have d16_44 := HeatV.sub_nn K O _ _ e16_44
  have d16_45 := HeatV.sub_nn K O _ _ e16_45
  have d16_46 := HeatV.sub_nn K O _ _ e16_46
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_34 := HeatV.sub_nn K O _ _ e17_34
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d17_36 := HeatV.sub_nn K O _ _ e17_36
  have d17_37 := HeatV.sub_nn K O _ _ e17_37
  have d17_38 := HeatV.sub_nn K O _ _ e17_38
  have d17_39 := HeatV.sub_nn K O _ _ e17_39
  have d17_40 := HeatV.sub_nn K O _ _ e17_40
  have d17_41 := HeatV.sub_nn K O _ _ e17_41
  have d17_42 := HeatV.sub_nn K O _ _ e17_42
  have d17_43 := HeatV.sub_nn K O _ _ e17_43
  have d17_44 := HeatV.sub_nn K O _ _ e17_44
  have d17_45 := HeatV.sub_nn K O _ _ e17_45
  have d17_46 := HeatV.sub_nn K O _ _ e17_46
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d18_34 := HeatV.sub_nn K O _ _ e18_34
  have d18_35 := HeatV.sub_nn K O _ _ e18_35
  have d18_36 := HeatV.sub_nn K O _ _ e18_36
  have d18_37 := HeatV.sub_nn K O _ _ e18_37
  have d18_38 := HeatV.sub_nn K O _ _ e18_38
  have d18_39 := HeatV.sub_nn K O _ _ e18_39
  have d18_40 := HeatV.sub_nn K O _ _ e18_40
  have d18_41 := HeatV.sub_nn K O _ _ e18_41
  have d18_42 := HeatV.sub_nn K O _ _ e18_42
  have d18_43 := HeatV.sub_nn K O _ _ e18_43
  have d18_44 := HeatV.sub_nn K O _ _ e18_44
  have d18_45 := HeatV.sub_nn K O _ _ e18_45
  have d18_46 := HeatV.sub_nn K O _ _ e18_46
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d19_34 := HeatV.sub_nn K O _ _ e19_34
  have d19_35 := HeatV.sub_nn K O _ _ e19_35
  have d19_36 := HeatV.sub_nn K O _ _ e19_36
  have d19_37 := HeatV.sub_nn K O _ _ e19_37
  have d19_38 := HeatV.sub_nn K O _ _ e19_38
  have d19_39 := HeatV.sub_nn K O _ _ e19_39
  have d19_40 := HeatV.sub_nn K O _ _ e19_40
  have d19_41 := HeatV.sub_nn K O _ _ e19_41
  have d19_42 := HeatV.sub_nn K O _ _ e19_42
  have d19_43 := HeatV.sub_nn K O _ _ e19_43
  have d19_44 := HeatV.sub_nn K O _ _ e19_44
  have d19_45 := HeatV.sub_nn K O _ _ e19_45
  have d19_46 := HeatV.sub_nn K O _ _ e19_46
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_34 := HeatV.sub_nn K O _ _ e20_34
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d20_36 := HeatV.sub_nn K O _ _ e20_36
  have d20_37 := HeatV.sub_nn K O _ _ e20_37
  have d20_38 := HeatV.sub_nn K O _ _ e20_38
  have d20_39 := HeatV.sub_nn K O _ _ e20_39
  have d20_40 := HeatV.sub_nn K O _ _ e20_40
  have d20_41 := HeatV.sub_nn K O _ _ e20_41
  have d20_42 := HeatV.sub_nn K O _ _ e20_42
  have d20_43 := HeatV.sub_nn K O _ _ e20_43
  have d20_44 := HeatV.sub_nn K O _ _ e20_44
  have d20_45 := HeatV.sub_nn K O _ _ e20_45
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d21_35 := HeatV.sub_nn K O _ _ e21_35
  have d21_37 := HeatV.sub_nn K O _ _ e21_37
  have d21_38 := HeatV.sub_nn K O _ _ e21_38
  have d21_39 := HeatV.sub_nn K O _ _ e21_39
  have d21_40 := HeatV.sub_nn K O _ _ e21_40
  have d21_41 := HeatV.sub_nn K O _ _ e21_41
  have d21_42 := HeatV.sub_nn K O _ _ e21_42
  have d21_43 := HeatV.sub_nn K O _ _ e21_43
  have d21_44 := HeatV.sub_nn K O _ _ e21_44
  have d21_45 := HeatV.sub_nn K O _ _ e21_45
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d22_36 := HeatV.sub_nn K O _ _ e22_36
  have d22_37 := HeatV.sub_nn K O _ _ e22_37
  have d22_38 := HeatV.sub_nn K O _ _ e22_38
  have d22_39 := HeatV.sub_nn K O _ _ e22_39
  have d22_40 := HeatV.sub_nn K O _ _ e22_40
  have d22_41 := HeatV.sub_nn K O _ _ e22_41
  have d22_42 := HeatV.sub_nn K O _ _ e22_42
  have d22_43 := HeatV.sub_nn K O _ _ e22_43
  have d22_44 := HeatV.sub_nn K O _ _ e22_44
  have d22_45 := HeatV.sub_nn K O _ _ e22_45
  have d22_46 := HeatV.sub_nn K O _ _ e22_46
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d23_36 := HeatV.sub_nn K O _ _ e23_36
  have d23_37 := HeatV.sub_nn K O _ _ e23_37
  have d23_38 := HeatV.sub_nn K O _ _ e23_38
  have d23_39 := HeatV.sub_nn K O _ _ e23_39
  have d23_40 := HeatV.sub_nn K O _ _ e23_40
  have d23_41 := HeatV.sub_nn K O _ _ e23_41
  have d23_42 := HeatV.sub_nn K O _ _ e23_42
  have d23_43 := HeatV.sub_nn K O _ _ e23_43
  have d23_44 := HeatV.sub_nn K O _ _ e23_44
  have d23_45 := HeatV.sub_nn K O _ _ e23_45
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d24_35 := HeatV.sub_nn K O _ _ e24_35
  have d24_36 := HeatV.sub_nn K O _ _ e24_36
  have d24_37 := HeatV.sub_nn K O _ _ e24_37
  have d24_38 := HeatV.sub_nn K O _ _ e24_38
  have d24_39 := HeatV.sub_nn K O _ _ e24_39
  have d24_40 := HeatV.sub_nn K O _ _ e24_40
  have d24_41 := HeatV.sub_nn K O _ _ e24_41
  have d24_42 := HeatV.sub_nn K O _ _ e24_42
  have d24_43 := HeatV.sub_nn K O _ _ e24_43
  have d24_44 := HeatV.sub_nn K O _ _ e24_44
  have d24_45 := HeatV.sub_nn K O _ _ e24_45
  have d24_46 := HeatV.sub_nn K O _ _ e24_46
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d25_35 := HeatV.sub_nn K O _ _ e25_35
  have d25_36 := HeatV.sub_nn K O _ _ e25_36
  have d25_37 := HeatV.sub_nn K O _ _ e25_37
  have d25_38 := HeatV.sub_nn K O _ _ e25_38
  have d25_39 := HeatV.sub_nn K O _ _ e25_39
  have d25_40 := HeatV.sub_nn K O _ _ e25_40
  have d25_41 := HeatV.sub_nn K O _ _ e25_41
  have d25_42 := HeatV.sub_nn K O _ _ e25_42
  have d25_43 := HeatV.sub_nn K O _ _ e25_43
  have d25_44 := HeatV.sub_nn K O _ _ e25_44
  have d25_45 := HeatV.sub_nn K O _ _ e25_45
  have d25_46 := HeatV.sub_nn K O _ _ e25_46
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d26_36 := HeatV.sub_nn K O _ _ e26_36
  have d26_37 := HeatV.sub_nn K O _ _ e26_37
  have d26_38 := HeatV.sub_nn K O _ _ e26_38
  have d26_39 := HeatV.sub_nn K O _ _ e26_39
  have d26_40 := HeatV.sub_nn K O _ _ e26_40
  have d26_41 := HeatV.sub_nn K O _ _ e26_41
  have d26_42 := HeatV.sub_nn K O _ _ e26_42
  have d26_43 := HeatV.sub_nn K O _ _ e26_43
  have d26_44 := HeatV.sub_nn K O _ _ e26_44
  have d26_45 := HeatV.sub_nn K O _ _ e26_45
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d27_35 := HeatV.sub_nn K O _ _ e27_35
  have d27_36 := HeatV.sub_nn K O _ _ e27_36
  have d27_37 := HeatV.sub_nn K O _ _ e27_37
  have d27_38 := HeatV.sub_nn K O _ _ e27_38
  have d27_39 := HeatV.sub_nn K O _ _ e27_39
  have d27_40 := HeatV.sub_nn K O _ _ e27_40
  have d27_41 := HeatV.sub_nn K O _ _ e27_41
  have d27_42 := HeatV.sub_nn K O _ _ e27_42
  have d27_43 := HeatV.sub_nn K O _ _ e27_43
  have d27_44 := HeatV.sub_nn K O _ _ e27_44
  have d27_45 := HeatV.sub_nn K O _ _ e27_45
  have d27_46 := HeatV.sub_nn K O _ _ e27_46
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d28_35 := HeatV.sub_nn K O _ _ e28_35
  have d28_36 := HeatV.sub_nn K O _ _ e28_36
  have d28_37 := HeatV.sub_nn K O _ _ e28_37
  have d28_38 := HeatV.sub_nn K O _ _ e28_38
  have d28_40 := HeatV.sub_nn K O _ _ e28_40
  have d28_41 := HeatV.sub_nn K O _ _ e28_41
  have d28_42 := HeatV.sub_nn K O _ _ e28_42
  have d28_43 := HeatV.sub_nn K O _ _ e28_43
  have d28_44 := HeatV.sub_nn K O _ _ e28_44
  have d28_45 := HeatV.sub_nn K O _ _ e28_45
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d29_36 := HeatV.sub_nn K O _ _ e29_36
  have d29_37 := HeatV.sub_nn K O _ _ e29_37
  have d29_38 := HeatV.sub_nn K O _ _ e29_38
  have d29_39 := HeatV.sub_nn K O _ _ e29_39
  have d29_40 := HeatV.sub_nn K O _ _ e29_40
  have d29_41 := HeatV.sub_nn K O _ _ e29_41
  have d29_42 := HeatV.sub_nn K O _ _ e29_42
  have d29_43 := HeatV.sub_nn K O _ _ e29_43
  have d29_44 := HeatV.sub_nn K O _ _ e29_44
  have d29_45 := HeatV.sub_nn K O _ _ e29_45
  have d29_46 := HeatV.sub_nn K O _ _ e29_46
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d30_35 := HeatV.sub_nn K O _ _ e30_35
  have d30_36 := HeatV.sub_nn K O _ _ e30_36
  have d30_37 := HeatV.sub_nn K O _ _ e30_37
  have d30_38 := HeatV.sub_nn K O _ _ e30_38
  have d30_39 := HeatV.sub_nn K O _ _ e30_39
  have d30_40 := HeatV.sub_nn K O _ _ e30_40
  have d30_41 := HeatV.sub_nn K O _ _ e30_41
  have d30_42 := HeatV.sub_nn K O _ _ e30_42
  have d30_43 := HeatV.sub_nn K O _ _ e30_43
  have d30_44 := HeatV.sub_nn K O _ _ e30_44
  have d30_45 := HeatV.sub_nn K O _ _ e30_45
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d31_35 := HeatV.sub_nn K O _ _ e31_35
  have d31_36 := HeatV.sub_nn K O _ _ e31_36
  have d31_37 := HeatV.sub_nn K O _ _ e31_37
  have d31_38 := HeatV.sub_nn K O _ _ e31_38
  have d31_39 := HeatV.sub_nn K O _ _ e31_39
  have d31_40 := HeatV.sub_nn K O _ _ e31_40
  have d31_41 := HeatV.sub_nn K O _ _ e31_41
  have d31_42 := HeatV.sub_nn K O _ _ e31_42
  have d31_43 := HeatV.sub_nn K O _ _ e31_43
  have d31_44 := HeatV.sub_nn K O _ _ e31_44
  have d31_45 := HeatV.sub_nn K O _ _ e31_45
  have d31_46 := HeatV.sub_nn K O _ _ e31_46
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d32_36 := HeatV.sub_nn K O _ _ e32_36
  have d32_37 := HeatV.sub_nn K O _ _ e32_37
  have d32_38 := HeatV.sub_nn K O _ _ e32_38
  have d32_39 := HeatV.sub_nn K O _ _ e32_39
  have d32_40 := HeatV.sub_nn K O _ _ e32_40
  have d32_41 := HeatV.sub_nn K O _ _ e32_41
  have d32_42 := HeatV.sub_nn K O _ _ e32_42
  have d32_43 := HeatV.sub_nn K O _ _ e32_43
  have d32_44 := HeatV.sub_nn K O _ _ e32_44
  have d32_45 := HeatV.sub_nn K O _ _ e32_45
  have d32_46 := HeatV.sub_nn K O _ _ e32_46
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d33_36 := HeatV.sub_nn K O _ _ e33_36
  have d33_37 := HeatV.sub_nn K O _ _ e33_37
  have d33_38 := HeatV.sub_nn K O _ _ e33_38
  have d33_39 := HeatV.sub_nn K O _ _ e33_39
  have d33_40 := HeatV.sub_nn K O _ _ e33_40
  have d33_41 := HeatV.sub_nn K O _ _ e33_41
  have d33_42 := HeatV.sub_nn K O _ _ e33_42
  have d33_43 := HeatV.sub_nn K O _ _ e33_43
  have d33_44 := HeatV.sub_nn K O _ _ e33_44
  have d33_45 := HeatV.sub_nn K O _ _ e33_45
  have d33_46 := HeatV.sub_nn K O _ _ e33_46
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have d34_36 := HeatV.sub_nn K O _ _ e34_36
  have d34_37 := HeatV.sub_nn K O _ _ e34_37
  have d34_38 := HeatV.sub_nn K O _ _ e34_38
  have d34_39 := HeatV.sub_nn K O _ _ e34_39
  have d34_40 := HeatV.sub_nn K O _ _ e34_40
  have d34_41 := HeatV.sub_nn K O _ _ e34_41
  have d34_42 := HeatV.sub_nn K O _ _ e34_42
  have d34_43 := HeatV.sub_nn K O _ _ e34_43
  have d34_44 := HeatV.sub_nn K O _ _ e34_44
  have d34_45 := HeatV.sub_nn K O _ _ e34_45
  have d34_46 := HeatV.sub_nn K O _ _ e34_46
  have d35_36 := HeatV.sub_nn K O _ _ e35_36
  have d35_37 := HeatV.sub_nn K O _ _ e35_37
  have d35_38 := HeatV.sub_nn K O _ _ e35_38
  have d35_39 := HeatV.sub_nn K O _ _ e35_39
  have d35_40 := HeatV.sub_nn K O _ _ e35_40
  have d35_41 := HeatV.sub_nn K O _ _ e35_41
  have d35_42 := HeatV.sub_nn K O _ _ e35_42
  have d35_43 := HeatV.sub_nn K O _ _ e35_43
  have d35_44 := HeatV.sub_nn K O _ _ e35_44
  have d35_45 := HeatV.sub_nn K O _ _ e35_45
  have d35_46 := HeatV.sub_nn K O _ _ e35_46
  have d36_37 := HeatV.sub_nn K O _ _ e36_37
  have d36_38 := HeatV.sub_nn K O _ _ e36_38
  have d36_39 := HeatV.sub_nn K O _ _ e36_39
  have d36_40 := HeatV.sub_nn K O _ _ e36_40
  have d36_41 := HeatV.sub_nn K O _ _ e36_41
  have d36_42 := HeatV.sub_nn K O _ _ e36_42
  have d36_43 := HeatV.sub_nn K O _ _ e36_43
  have d36_44 := HeatV.sub_nn K O _ _ e36_44
  have d36_45 := HeatV.sub_nn K O _ _ e36_45
  have d37_38 := HeatV.sub_nn K O _ _ e37_38
  have d37_39 := HeatV.sub_nn K O _ _ e37_39
  have d37_40 := HeatV.sub_nn K O _ _ e37_40
  have d37_41 := HeatV.sub_nn K O _ _ e37_41
  have d37_42 := HeatV.sub_nn K O _ _ e37_42
  have d37_43 := HeatV.sub_nn K O _ _ e37_43
  have d37_44 := HeatV.sub_nn K O _ _ e37_44
  have d37_45 := HeatV.sub_nn K O _ _ e37_45
  have d37_46 := HeatV.sub_nn K O _ _ e37_46
  have d38_39 := HeatV.sub_nn K O _ _ e38_39
  have d38_40 := HeatV.sub_nn K O _ _ e38_40
  have d38_41 := HeatV.sub_nn K O _ _ e38_41
  have d38_42 := HeatV.sub_nn K O _ _ e38_42
  have d38_43 := HeatV.sub_nn K O _ _ e38_43
  have d38_44 := HeatV.sub_nn K O _ _ e38_44
  have d38_45 := HeatV.sub_nn K O _ _ e38_45
  have d38_46 := HeatV.sub_nn K O _ _ e38_46
  have d39_40 := HeatV.sub_nn K O _ _ e39_40
  have d39_41 := HeatV.sub_nn K O _ _ e39_41
  have d39_42 := HeatV.sub_nn K O _ _ e39_42
  have d39_43 := HeatV.sub_nn K O _ _ e39_43
  have d39_44 := HeatV.sub_nn K O _ _ e39_44
  have d39_45 := HeatV.sub_nn K O _ _ e39_45
  have d39_46 := HeatV.sub_nn K O _ _ e39_46
  have d40_41 := HeatV.sub_nn K O _ _ e40_41
  have d40_42 := HeatV.sub_nn K O _ _ e40_42
  have d40_43 := HeatV.sub_nn K O _ _ e40_43
  have d40_44 := HeatV.sub_nn K O _ _ e40_44
  have d40_45 := HeatV.sub_nn K O _ _ e40_45
  have d40_46 := HeatV.sub_nn K O _ _ e40_46
  have d41_42 := HeatV.sub_nn K O _ _ e41_42
  have d41_43 := HeatV.sub_nn K O _ _ e41_43
  have d41_44 := HeatV.sub_nn K O _ _ e41_44
  have d41_45 := HeatV.sub_nn K O _ _ e41_45
  have d41_46 := HeatV.sub_nn K O _ _ e41_46
  have d42_43 := HeatV.sub_nn K O _ _ e42_43
  have d42_44 := HeatV.sub_nn K O _ _ e42_44
  have d42_45 := HeatV.sub_nn K O _ _ e42_45
  have d42_46 := HeatV.sub_nn K O _ _ e42_46
  have d43_44 := HeatV.sub_nn K O _ _ e43_44
  have d43_45 := HeatV.sub_nn K O _ _ e43_45
  have d43_46 := HeatV.sub_nn K O _ _ e43_46
  have d44_45 := HeatV.sub_nn K O _ _ e44_45
  have d44_46 := HeatV.sub_nn K O _ _ e44_46
  have d45_46 := HeatV.sub_nn K O _ _ e45_46
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+184667 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 339443776) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1)  -- (+5217 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..47, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 47 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 339443776) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 46  -- (+5753 chars; full line in the Zenodo source)
      (K.mul (cN K 339001600) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN   -- (+5753 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (A 37) (A 38) (A 39) (A 40) (A 41) (A 42) (A 43) (A 44) (A 45) (A 46) (A 47) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hn  -- (+362 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 47 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 47 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 47 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 47 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 47 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 47 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 47 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+59309 chars; full line in the Zenodo source)

end G61Lv46

#print axioms G61Lv46.add_nn
#print axioms G61Lv46.level
#print axioms G61Lv46.level_fun

ym/G61Lv47.lean

lean_all/ym/G61Lv47.lean

/-
  ym/G61Lv47 — T45, G61a at level n = 47 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv47

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxHeartbeats 0 in
set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 a42 a43 a44 a45 a46 a47 a48 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.ze  -- (+986 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+52386 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 384160000) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN   -- (+5309 chars; full line in the Zenodo source)
      (K.mul (cN K 383679800) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul   -- (+5312 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_29 := HeatV.sub_nn K O _ _ e0_29
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_32 := HeatV.sub_nn K O _ _ e0_32
  have d0_33 := HeatV.sub_nn K O _ _ e0_33
  have d0_34 := HeatV.sub_nn K O _ _ e0_34
  have d0_35 := HeatV.sub_nn K O _ _ e0_35
  have d0_36 := HeatV.sub_nn K O _ _ e0_36
  have d0_37 := HeatV.sub_nn K O _ _ e0_37
  have d0_38 := HeatV.sub_nn K O _ _ e0_38
  have d0_39 := HeatV.sub_nn K O _ _ e0_39
  have d0_40 := HeatV.sub_nn K O _ _ e0_40
  have d0_41 := HeatV.sub_nn K O _ _ e0_41
  have d0_44 := HeatV.sub_nn K O _ _ e0_44
  have d0_45 := HeatV.sub_nn K O _ _ e0_45
  have d0_46 := HeatV.sub_nn K O _ _ e0_46
  have d0_47 := HeatV.sub_nn K O _ _ e0_47
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_29 := HeatV.sub_nn K O _ _ e1_29
  have d1_30 := HeatV.sub_nn K O _ _ e1_30
  have d1_31 := HeatV.sub_nn K O _ _ e1_31
  have d1_32 := HeatV.sub_nn K O _ _ e1_32
  have d1_33 := HeatV.sub_nn K O _ _ e1_33
  have d1_34 := HeatV.sub_nn K O _ _ e1_34
  have d1_35 := HeatV.sub_nn K O _ _ e1_35
  have d1_36 := HeatV.sub_nn K O _ _ e1_36
  have d1_37 := HeatV.sub_nn K O _ _ e1_37
  have d1_38 := HeatV.sub_nn K O _ _ e1_38
  have d1_39 := HeatV.sub_nn K O _ _ e1_39
  have d1_40 := HeatV.sub_nn K O _ _ e1_40
  have d1_43 := HeatV.sub_nn K O _ _ e1_43
  have d1_44 := HeatV.sub_nn K O _ _ e1_44
  have d1_46 := HeatV.sub_nn K O _ _ e1_46
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_33 := HeatV.sub_nn K O _ _ e2_33
  have d2_34 := HeatV.sub_nn K O _ _ e2_34
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d2_36 := HeatV.sub_nn K O _ _ e2_36
  have d2_37 := HeatV.sub_nn K O _ _ e2_37
  have d2_38 := HeatV.sub_nn K O _ _ e2_38
  have d2_39 := HeatV.sub_nn K O _ _ e2_39
  have d2_40 := HeatV.sub_nn K O _ _ e2_40
  have d2_41 := HeatV.sub_nn K O _ _ e2_41
  have d2_42 := HeatV.sub_nn K O _ _ e2_42
  have d2_43 := HeatV.sub_nn K O _ _ e2_43
  have d2_44 := HeatV.sub_nn K O _ _ e2_44
  have d2_45 := HeatV.sub_nn K O _ _ e2_45
  have d2_46 := HeatV.sub_nn K O _ _ e2_46
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d3_34 := HeatV.sub_nn K O _ _ e3_34
  have d3_35 := HeatV.sub_nn K O _ _ e3_35
  have d3_36 := HeatV.sub_nn K O _ _ e3_36
  have d3_37 := HeatV.sub_nn K O _ _ e3_37
  have d3_38 := HeatV.sub_nn K O _ _ e3_38
  have d3_39 := HeatV.sub_nn K O _ _ e3_39
  have d3_40 := HeatV.sub_nn K O _ _ e3_40
  have d3_41 := HeatV.sub_nn K O _ _ e3_41
  have d3_42 := HeatV.sub_nn K O _ _ e3_42
  have d3_43 := HeatV.sub_nn K O _ _ e3_43
  have d3_44 := HeatV.sub_nn K O _ _ e3_44
  have d3_45 := HeatV.sub_nn K O _ _ e3_45
  have d3_46 := HeatV.sub_nn K O _ _ e3_46
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d4_34 := HeatV.sub_nn K O _ _ e4_34
  have d4_35 := HeatV.sub_nn K O _ _ e4_35
  have d4_36 := HeatV.sub_nn K O _ _ e4_36
  have d4_37 := HeatV.sub_nn K O _ _ e4_37
  have d4_38 := HeatV.sub_nn K O _ _ e4_38
  have d4_39 := HeatV.sub_nn K O _ _ e4_39
  have d4_40 := HeatV.sub_nn K O _ _ e4_40
  have d4_41 := HeatV.sub_nn K O _ _ e4_41
  have d4_43 := HeatV.sub_nn K O _ _ e4_43
  have d4_44 := HeatV.sub_nn K O _ _ e4_44
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d5_33 := HeatV.sub_nn K O _ _ e5_33
  have d5_36 := HeatV.sub_nn K O _ _ e5_36
  have d5_38 := HeatV.sub_nn K O _ _ e5_38
  have d5_39 := HeatV.sub_nn K O _ _ e5_39
  have d5_40 := HeatV.sub_nn K O _ _ e5_40
  have d5_42 := HeatV.sub_nn K O _ _ e5_42
  have d5_43 := HeatV.sub_nn K O _ _ e5_43
  have d5_44 := HeatV.sub_nn K O _ _ e5_44
  have d5_46 := HeatV.sub_nn K O _ _ e5_46
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_33 := HeatV.sub_nn K O _ _ e6_33
  have d6_34 := HeatV.sub_nn K O _ _ e6_34
  have d6_35 := HeatV.sub_nn K O _ _ e6_35
  have d6_36 := HeatV.sub_nn K O _ _ e6_36
  have d6_37 := HeatV.sub_nn K O _ _ e6_37
  have d6_38 := HeatV.sub_nn K O _ _ e6_38
  have d6_39 := HeatV.sub_nn K O _ _ e6_39
  have d6_41 := HeatV.sub_nn K O _ _ e6_41
  have d6_42 := HeatV.sub_nn K O _ _ e6_42
  have d6_43 := HeatV.sub_nn K O _ _ e6_43
  have d6_44 := HeatV.sub_nn K O _ _ e6_44
  have d6_45 := HeatV.sub_nn K O _ _ e6_45
  have d6_46 := HeatV.sub_nn K O _ _ e6_46
  have d6_47 := HeatV.sub_nn K O _ _ e6_47
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d7_33 := HeatV.sub_nn K O _ _ e7_33
  have d7_34 := HeatV.sub_nn K O _ _ e7_34
  have d7_36 := HeatV.sub_nn K O _ _ e7_36
  have d7_37 := HeatV.sub_nn K O _ _ e7_37
  have d7_38 := HeatV.sub_nn K O _ _ e7_38
  have d7_40 := HeatV.sub_nn K O _ _ e7_40
  have d7_41 := HeatV.sub_nn K O _ _ e7_41
  have d7_42 := HeatV.sub_nn K O _ _ e7_42
  have d7_43 := HeatV.sub_nn K O _ _ e7_43
  have d7_44 := HeatV.sub_nn K O _ _ e7_44
  have d7_45 := HeatV.sub_nn K O _ _ e7_45
  have d7_46 := HeatV.sub_nn K O _ _ e7_46
  have d7_47 := HeatV.sub_nn K O _ _ e7_47
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_32 := HeatV.sub_nn K O _ _ e8_32
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_34 := HeatV.sub_nn K O _ _ e8_34
  have d8_35 := HeatV.sub_nn K O _ _ e8_35
  have d8_36 := HeatV.sub_nn K O _ _ e8_36
  have d8_37 := HeatV.sub_nn K O _ _ e8_37
  have d8_39 := HeatV.sub_nn K O _ _ e8_39
  have d8_40 := HeatV.sub_nn K O _ _ e8_40
  have d8_41 := HeatV.sub_nn K O _ _ e8_41
  have d8_42 := HeatV.sub_nn K O _ _ e8_42
  have d8_43 := HeatV.sub_nn K O _ _ e8_43
  have d8_44 := HeatV.sub_nn K O _ _ e8_44
  have d8_45 := HeatV.sub_nn K O _ _ e8_45
  have d8_46 := HeatV.sub_nn K O _ _ e8_46
  have d8_47 := HeatV.sub_nn K O _ _ e8_47
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d9_35 := HeatV.sub_nn K O _ _ e9_35
  have d9_36 := HeatV.sub_nn K O _ _ e9_36
  have d9_38 := HeatV.sub_nn K O _ _ e9_38
  have d9_39 := HeatV.sub_nn K O _ _ e9_39
  have d9_40 := HeatV.sub_nn K O _ _ e9_40
  have d9_41 := HeatV.sub_nn K O _ _ e9_41
  have d9_42 := HeatV.sub_nn K O _ _ e9_42
  have d9_43 := HeatV.sub_nn K O _ _ e9_43
  have d9_44 := HeatV.sub_nn K O _ _ e9_44
  have d9_45 := HeatV.sub_nn K O _ _ e9_45
  have d9_46 := HeatV.sub_nn K O _ _ e9_46
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_34 := HeatV.sub_nn K O _ _ e10_34
  have d10_35 := HeatV.sub_nn K O _ _ e10_35
  have d10_36 := HeatV.sub_nn K O _ _ e10_36
  have d10_37 := HeatV.sub_nn K O _ _ e10_37
  have d10_38 := HeatV.sub_nn K O _ _ e10_38
  have d10_39 := HeatV.sub_nn K O _ _ e10_39
  have d10_40 := HeatV.sub_nn K O _ _ e10_40
  have d10_41 := HeatV.sub_nn K O _ _ e10_41
  have d10_42 := HeatV.sub_nn K O _ _ e10_42
  have d10_43 := HeatV.sub_nn K O _ _ e10_43
  have d10_44 := HeatV.sub_nn K O _ _ e10_44
  have d10_45 := HeatV.sub_nn K O _ _ e10_45
  have d10_46 := HeatV.sub_nn K O _ _ e10_46
  have d10_47 := HeatV.sub_nn K O _ _ e10_47
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d11_33 := HeatV.sub_nn K O _ _ e11_33
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d11_36 := HeatV.sub_nn K O _ _ e11_36
  have d11_37 := HeatV.sub_nn K O _ _ e11_37
  have d11_38 := HeatV.sub_nn K O _ _ e11_38
  have d11_39 := HeatV.sub_nn K O _ _ e11_39
  have d11_40 := HeatV.sub_nn K O _ _ e11_40
  have d11_41 := HeatV.sub_nn K O _ _ e11_41
  have d11_42 := HeatV.sub_nn K O _ _ e11_42
  have d11_43 := HeatV.sub_nn K O _ _ e11_43
  have d11_44 := HeatV.sub_nn K O _ _ e11_44
  have d11_45 := HeatV.sub_nn K O _ _ e11_45
  have d11_46 := HeatV.sub_nn K O _ _ e11_46
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d12_35 := HeatV.sub_nn K O _ _ e12_35
  have d12_36 := HeatV.sub_nn K O _ _ e12_36
  have d12_38 := HeatV.sub_nn K O _ _ e12_38
  have d12_39 := HeatV.sub_nn K O _ _ e12_39
  have d12_40 := HeatV.sub_nn K O _ _ e12_40
  have d12_41 := HeatV.sub_nn K O _ _ e12_41
  have d12_42 := HeatV.sub_nn K O _ _ e12_42
  have d12_43 := HeatV.sub_nn K O _ _ e12_43
  have d12_44 := HeatV.sub_nn K O _ _ e12_44
  have d12_45 := HeatV.sub_nn K O _ _ e12_45
  have d12_46 := HeatV.sub_nn K O _ _ e12_46
  have d12_47 := HeatV.sub_nn K O _ _ e12_47
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_33 := HeatV.sub_nn K O _ _ e13_33
  have d13_34 := HeatV.sub_nn K O _ _ e13_34
  have d13_35 := HeatV.sub_nn K O _ _ e13_35
  have d13_36 := HeatV.sub_nn K O _ _ e13_36
  have d13_37 := HeatV.sub_nn K O _ _ e13_37
  have d13_38 := HeatV.sub_nn K O _ _ e13_38
  have d13_39 := HeatV.sub_nn K O _ _ e13_39
  have d13_40 := HeatV.sub_nn K O _ _ e13_40
  have d13_41 := HeatV.sub_nn K O _ _ e13_41
  have d13_42 := HeatV.sub_nn K O _ _ e13_42
  have d13_43 := HeatV.sub_nn K O _ _ e13_43
  have d13_44 := HeatV.sub_nn K O _ _ e13_44
  have d13_45 := HeatV.sub_nn K O _ _ e13_45
  have d13_46 := HeatV.sub_nn K O _ _ e13_46
  have d13_47 := HeatV.sub_nn K O _ _ e13_47
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_33 := HeatV.sub_nn K O _ _ e14_33
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d14_35 := HeatV.sub_nn K O _ _ e14_35
  have d14_36 := HeatV.sub_nn K O _ _ e14_36
  have d14_37 := HeatV.sub_nn K O _ _ e14_37
  have d14_38 := HeatV.sub_nn K O _ _ e14_38
  have d14_39 := HeatV.sub_nn K O _ _ e14_39
  have d14_40 := HeatV.sub_nn K O _ _ e14_40
  have d14_41 := HeatV.sub_nn K O _ _ e14_41
  have d14_42 := HeatV.sub_nn K O _ _ e14_42
  have d14_43 := HeatV.sub_nn K O _ _ e14_43
  have d14_44 := HeatV.sub_nn K O _ _ e14_44
  have d14_45 := HeatV.sub_nn K O _ _ e14_45
  have d14_46 := HeatV.sub_nn K O _ _ e14_46
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_35 := HeatV.sub_nn K O _ _ e15_35
  have d15_36 := HeatV.sub_nn K O _ _ e15_36
  have d15_37 := HeatV.sub_nn K O _ _ e15_37
  have d15_38 := HeatV.sub_nn K O _ _ e15_38
  have d15_39 := HeatV.sub_nn K O _ _ e15_39
  have d15_40 := HeatV.sub_nn K O _ _ e15_40
  have d15_41 := HeatV.sub_nn K O _ _ e15_41
  have d15_42 := HeatV.sub_nn K O _ _ e15_42
  have d15_43 := HeatV.sub_nn K O _ _ e15_43
  have d15_44 := HeatV.sub_nn K O _ _ e15_44
  have d15_45 := HeatV.sub_nn K O _ _ e15_45
  have d15_46 := HeatV.sub_nn K O _ _ e15_46
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d16_36 := HeatV.sub_nn K O _ _ e16_36
  have d16_37 := HeatV.sub_nn K O _ _ e16_37
  have d16_38 := HeatV.sub_nn K O _ _ e16_38
  have d16_39 := HeatV.sub_nn K O _ _ e16_39
  have d16_40 := HeatV.sub_nn K O _ _ e16_40
  have d16_41 := HeatV.sub_nn K O _ _ e16_41
  have d16_42 := HeatV.sub_nn K O _ _ e16_42
  have d16_43 := HeatV.sub_nn K O _ _ e16_43
  have d16_44 := HeatV.sub_nn K O _ _ e16_44
  have d16_45 := HeatV.sub_nn K O _ _ e16_45
  have d16_46 := HeatV.sub_nn K O _ _ e16_46
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_34 := HeatV.sub_nn K O _ _ e17_34
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d17_36 := HeatV.sub_nn K O _ _ e17_36
  have d17_37 := HeatV.sub_nn K O _ _ e17_37
  have d17_38 := HeatV.sub_nn K O _ _ e17_38
  have d17_39 := HeatV.sub_nn K O _ _ e17_39
  have d17_40 := HeatV.sub_nn K O _ _ e17_40
  have d17_41 := HeatV.sub_nn K O _ _ e17_41
  have d17_42 := HeatV.sub_nn K O _ _ e17_42
  have d17_43 := HeatV.sub_nn K O _ _ e17_43
  have d17_44 := HeatV.sub_nn K O _ _ e17_44
  have d17_45 := HeatV.sub_nn K O _ _ e17_45
  have d17_46 := HeatV.sub_nn K O _ _ e17_46
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d18_34 := HeatV.sub_nn K O _ _ e18_34
  have d18_35 := HeatV.sub_nn K O _ _ e18_35
  have d18_36 := HeatV.sub_nn K O _ _ e18_36
  have d18_37 := HeatV.sub_nn K O _ _ e18_37
  have d18_38 := HeatV.sub_nn K O _ _ e18_38
  have d18_39 := HeatV.sub_nn K O _ _ e18_39
  have d18_40 := HeatV.sub_nn K O _ _ e18_40
  have d18_41 := HeatV.sub_nn K O _ _ e18_41
  have d18_42 := HeatV.sub_nn K O _ _ e18_42
  have d18_43 := HeatV.sub_nn K O _ _ e18_43
  have d18_44 := HeatV.sub_nn K O _ _ e18_44
  have d18_45 := HeatV.sub_nn K O _ _ e18_45
  have d18_46 := HeatV.sub_nn K O _ _ e18_46
  have d18_47 := HeatV.sub_nn K O _ _ e18_47
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d19_34 := HeatV.sub_nn K O _ _ e19_34
  have d19_35 := HeatV.sub_nn K O _ _ e19_35
  have d19_36 := HeatV.sub_nn K O _ _ e19_36
  have d19_37 := HeatV.sub_nn K O _ _ e19_37
  have d19_38 := HeatV.sub_nn K O _ _ e19_38
  have d19_39 := HeatV.sub_nn K O _ _ e19_39
  have d19_40 := HeatV.sub_nn K O _ _ e19_40
  have d19_41 := HeatV.sub_nn K O _ _ e19_41
  have d19_42 := HeatV.sub_nn K O _ _ e19_42
  have d19_43 := HeatV.sub_nn K O _ _ e19_43
  have d19_44 := HeatV.sub_nn K O _ _ e19_44
  have d19_45 := HeatV.sub_nn K O _ _ e19_45
  have d19_46 := HeatV.sub_nn K O _ _ e19_46
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_34 := HeatV.sub_nn K O _ _ e20_34
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d20_36 := HeatV.sub_nn K O _ _ e20_36
  have d20_37 := HeatV.sub_nn K O _ _ e20_37
  have d20_38 := HeatV.sub_nn K O _ _ e20_38
  have d20_39 := HeatV.sub_nn K O _ _ e20_39
  have d20_40 := HeatV.sub_nn K O _ _ e20_40
  have d20_41 := HeatV.sub_nn K O _ _ e20_41
  have d20_42 := HeatV.sub_nn K O _ _ e20_42
  have d20_43 := HeatV.sub_nn K O _ _ e20_43
  have d20_44 := HeatV.sub_nn K O _ _ e20_44
  have d20_45 := HeatV.sub_nn K O _ _ e20_45
  have d20_46 := HeatV.sub_nn K O _ _ e20_46
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d21_35 := HeatV.sub_nn K O _ _ e21_35
  have d21_36 := HeatV.sub_nn K O _ _ e21_36
  have d21_38 := HeatV.sub_nn K O _ _ e21_38
  have d21_40 := HeatV.sub_nn K O _ _ e21_40
  have d21_41 := HeatV.sub_nn K O _ _ e21_41
  have d21_42 := HeatV.sub_nn K O _ _ e21_42
  have d21_43 := HeatV.sub_nn K O _ _ e21_43
  have d21_44 := HeatV.sub_nn K O _ _ e21_44
  have d21_45 := HeatV.sub_nn K O _ _ e21_45
  have d21_46 := HeatV.sub_nn K O _ _ e21_46
  have d21_47 := HeatV.sub_nn K O _ _ e21_47
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d22_36 := HeatV.sub_nn K O _ _ e22_36
  have d22_37 := HeatV.sub_nn K O _ _ e22_37
  have d22_38 := HeatV.sub_nn K O _ _ e22_38
  have d22_39 := HeatV.sub_nn K O _ _ e22_39
  have d22_40 := HeatV.sub_nn K O _ _ e22_40
  have d22_41 := HeatV.sub_nn K O _ _ e22_41
  have d22_42 := HeatV.sub_nn K O _ _ e22_42
  have d22_43 := HeatV.sub_nn K O _ _ e22_43
  have d22_44 := HeatV.sub_nn K O _ _ e22_44
  have d22_45 := HeatV.sub_nn K O _ _ e22_45
  have d22_46 := HeatV.sub_nn K O _ _ e22_46
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d23_36 := HeatV.sub_nn K O _ _ e23_36
  have d23_37 := HeatV.sub_nn K O _ _ e23_37
  have d23_38 := HeatV.sub_nn K O _ _ e23_38
  have d23_39 := HeatV.sub_nn K O _ _ e23_39
  have d23_40 := HeatV.sub_nn K O _ _ e23_40
  have d23_41 := HeatV.sub_nn K O _ _ e23_41
  have d23_42 := HeatV.sub_nn K O _ _ e23_42
  have d23_43 := HeatV.sub_nn K O _ _ e23_43
  have d23_44 := HeatV.sub_nn K O _ _ e23_44
  have d23_45 := HeatV.sub_nn K O _ _ e23_45
  have d23_46 := HeatV.sub_nn K O _ _ e23_46
  have d23_47 := HeatV.sub_nn K O _ _ e23_47
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d24_35 := HeatV.sub_nn K O _ _ e24_35
  have d24_36 := HeatV.sub_nn K O _ _ e24_36
  have d24_37 := HeatV.sub_nn K O _ _ e24_37
  have d24_38 := HeatV.sub_nn K O _ _ e24_38
  have d24_39 := HeatV.sub_nn K O _ _ e24_39
  have d24_40 := HeatV.sub_nn K O _ _ e24_40
  have d24_41 := HeatV.sub_nn K O _ _ e24_41
  have d24_42 := HeatV.sub_nn K O _ _ e24_42
  have d24_43 := HeatV.sub_nn K O _ _ e24_43
  have d24_44 := HeatV.sub_nn K O _ _ e24_44
  have d24_45 := HeatV.sub_nn K O _ _ e24_45
  have d24_46 := HeatV.sub_nn K O _ _ e24_46
  have d24_47 := HeatV.sub_nn K O _ _ e24_47
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d25_35 := HeatV.sub_nn K O _ _ e25_35
  have d25_36 := HeatV.sub_nn K O _ _ e25_36
  have d25_37 := HeatV.sub_nn K O _ _ e25_37
  have d25_38 := HeatV.sub_nn K O _ _ e25_38
  have d25_39 := HeatV.sub_nn K O _ _ e25_39
  have d25_40 := HeatV.sub_nn K O _ _ e25_40
  have d25_41 := HeatV.sub_nn K O _ _ e25_41
  have d25_42 := HeatV.sub_nn K O _ _ e25_42
  have d25_43 := HeatV.sub_nn K O _ _ e25_43
  have d25_44 := HeatV.sub_nn K O _ _ e25_44
  have d25_45 := HeatV.sub_nn K O _ _ e25_45
  have d25_46 := HeatV.sub_nn K O _ _ e25_46
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d26_36 := HeatV.sub_nn K O _ _ e26_36
  have d26_37 := HeatV.sub_nn K O _ _ e26_37
  have d26_38 := HeatV.sub_nn K O _ _ e26_38
  have d26_39 := HeatV.sub_nn K O _ _ e26_39
  have d26_40 := HeatV.sub_nn K O _ _ e26_40
  have d26_41 := HeatV.sub_nn K O _ _ e26_41
  have d26_42 := HeatV.sub_nn K O _ _ e26_42
  have d26_43 := HeatV.sub_nn K O _ _ e26_43
  have d26_44 := HeatV.sub_nn K O _ _ e26_44
  have d26_45 := HeatV.sub_nn K O _ _ e26_45
  have d26_46 := HeatV.sub_nn K O _ _ e26_46
  have d26_47 := HeatV.sub_nn K O _ _ e26_47
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d27_35 := HeatV.sub_nn K O _ _ e27_35
  have d27_36 := HeatV.sub_nn K O _ _ e27_36
  have d27_37 := HeatV.sub_nn K O _ _ e27_37
  have d27_38 := HeatV.sub_nn K O _ _ e27_38
  have d27_39 := HeatV.sub_nn K O _ _ e27_39
  have d27_40 := HeatV.sub_nn K O _ _ e27_40
  have d27_41 := HeatV.sub_nn K O _ _ e27_41
  have d27_42 := HeatV.sub_nn K O _ _ e27_42
  have d27_43 := HeatV.sub_nn K O _ _ e27_43
  have d27_44 := HeatV.sub_nn K O _ _ e27_44
  have d27_45 := HeatV.sub_nn K O _ _ e27_45
  have d27_46 := HeatV.sub_nn K O _ _ e27_46
  have d27_47 := HeatV.sub_nn K O _ _ e27_47
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d28_35 := HeatV.sub_nn K O _ _ e28_35
  have d28_36 := HeatV.sub_nn K O _ _ e28_36
  have d28_37 := HeatV.sub_nn K O _ _ e28_37
  have d28_38 := HeatV.sub_nn K O _ _ e28_38
  have d28_39 := HeatV.sub_nn K O _ _ e28_39
  have d28_40 := HeatV.sub_nn K O _ _ e28_40
  have d28_41 := HeatV.sub_nn K O _ _ e28_41
  have d28_42 := HeatV.sub_nn K O _ _ e28_42
  have d28_43 := HeatV.sub_nn K O _ _ e28_43
  have d28_44 := HeatV.sub_nn K O _ _ e28_44
  have d28_45 := HeatV.sub_nn K O _ _ e28_45
  have d28_46 := HeatV.sub_nn K O _ _ e28_46
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d29_36 := HeatV.sub_nn K O _ _ e29_36
  have d29_37 := HeatV.sub_nn K O _ _ e29_37
  have d29_38 := HeatV.sub_nn K O _ _ e29_38
  have d29_39 := HeatV.sub_nn K O _ _ e29_39
  have d29_40 := HeatV.sub_nn K O _ _ e29_40
  have d29_41 := HeatV.sub_nn K O _ _ e29_41
  have d29_42 := HeatV.sub_nn K O _ _ e29_42
  have d29_43 := HeatV.sub_nn K O _ _ e29_43
  have d29_44 := HeatV.sub_nn K O _ _ e29_44
  have d29_45 := HeatV.sub_nn K O _ _ e29_45
  have d29_46 := HeatV.sub_nn K O _ _ e29_46
  have d29_47 := HeatV.sub_nn K O _ _ e29_47
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d30_35 := HeatV.sub_nn K O _ _ e30_35
  have d30_36 := HeatV.sub_nn K O _ _ e30_36
  have d30_37 := HeatV.sub_nn K O _ _ e30_37
  have d30_38 := HeatV.sub_nn K O _ _ e30_38
  have d30_39 := HeatV.sub_nn K O _ _ e30_39
  have d30_40 := HeatV.sub_nn K O _ _ e30_40
  have d30_41 := HeatV.sub_nn K O _ _ e30_41
  have d30_42 := HeatV.sub_nn K O _ _ e30_42
  have d30_43 := HeatV.sub_nn K O _ _ e30_43
  have d30_44 := HeatV.sub_nn K O _ _ e30_44
  have d30_45 := HeatV.sub_nn K O _ _ e30_45
  have d30_46 := HeatV.sub_nn K O _ _ e30_46
  have d30_47 := HeatV.sub_nn K O _ _ e30_47
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d31_35 := HeatV.sub_nn K O _ _ e31_35
  have d31_36 := HeatV.sub_nn K O _ _ e31_36
  have d31_37 := HeatV.sub_nn K O _ _ e31_37
  have d31_38 := HeatV.sub_nn K O _ _ e31_38
  have d31_39 := HeatV.sub_nn K O _ _ e31_39
  have d31_40 := HeatV.sub_nn K O _ _ e31_40
  have d31_41 := HeatV.sub_nn K O _ _ e31_41
  have d31_42 := HeatV.sub_nn K O _ _ e31_42
  have d31_43 := HeatV.sub_nn K O _ _ e31_43
  have d31_44 := HeatV.sub_nn K O _ _ e31_44
  have d31_45 := HeatV.sub_nn K O _ _ e31_45
  have d31_46 := HeatV.sub_nn K O _ _ e31_46
  have d31_47 := HeatV.sub_nn K O _ _ e31_47
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d32_36 := HeatV.sub_nn K O _ _ e32_36
  have d32_37 := HeatV.sub_nn K O _ _ e32_37
  have d32_38 := HeatV.sub_nn K O _ _ e32_38
  have d32_39 := HeatV.sub_nn K O _ _ e32_39
  have d32_40 := HeatV.sub_nn K O _ _ e32_40
  have d32_41 := HeatV.sub_nn K O _ _ e32_41
  have d32_42 := HeatV.sub_nn K O _ _ e32_42
  have d32_43 := HeatV.sub_nn K O _ _ e32_43
  have d32_44 := HeatV.sub_nn K O _ _ e32_44
  have d32_45 := HeatV.sub_nn K O _ _ e32_45
  have d32_46 := HeatV.sub_nn K O _ _ e32_46
  have d32_47 := HeatV.sub_nn K O _ _ e32_47
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d33_36 := HeatV.sub_nn K O _ _ e33_36
  have d33_37 := HeatV.sub_nn K O _ _ e33_37
  have d33_38 := HeatV.sub_nn K O _ _ e33_38
  have d33_39 := HeatV.sub_nn K O _ _ e33_39
  have d33_40 := HeatV.sub_nn K O _ _ e33_40
  have d33_41 := HeatV.sub_nn K O _ _ e33_41
  have d33_42 := HeatV.sub_nn K O _ _ e33_42
  have d33_43 := HeatV.sub_nn K O _ _ e33_43
  have d33_44 := HeatV.sub_nn K O _ _ e33_44
  have d33_45 := HeatV.sub_nn K O _ _ e33_45
  have d33_46 := HeatV.sub_nn K O _ _ e33_46
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have d34_36 := HeatV.sub_nn K O _ _ e34_36
  have d34_37 := HeatV.sub_nn K O _ _ e34_37
  have d34_38 := HeatV.sub_nn K O _ _ e34_38
  have d34_39 := HeatV.sub_nn K O _ _ e34_39
  have d34_40 := HeatV.sub_nn K O _ _ e34_40
  have d34_41 := HeatV.sub_nn K O _ _ e34_41
  have d34_42 := HeatV.sub_nn K O _ _ e34_42
  have d34_43 := HeatV.sub_nn K O _ _ e34_43
  have d34_44 := HeatV.sub_nn K O _ _ e34_44
  have d34_45 := HeatV.sub_nn K O _ _ e34_45
  have d34_46 := HeatV.sub_nn K O _ _ e34_46
  have d34_47 := HeatV.sub_nn K O _ _ e34_47
  have d35_36 := HeatV.sub_nn K O _ _ e35_36
  have d35_37 := HeatV.sub_nn K O _ _ e35_37
  have d35_38 := HeatV.sub_nn K O _ _ e35_38
  have d35_39 := HeatV.sub_nn K O _ _ e35_39
  have d35_40 := HeatV.sub_nn K O _ _ e35_40
  have d35_41 := HeatV.sub_nn K O _ _ e35_41
  have d35_42 := HeatV.sub_nn K O _ _ e35_42
  have d35_43 := HeatV.sub_nn K O _ _ e35_43
  have d35_44 := HeatV.sub_nn K O _ _ e35_44
  have d35_45 := HeatV.sub_nn K O _ _ e35_45
  have d35_46 := HeatV.sub_nn K O _ _ e35_46
  have d35_47 := HeatV.sub_nn K O _ _ e35_47
  have d36_37 := HeatV.sub_nn K O _ _ e36_37
  have d36_38 := HeatV.sub_nn K O _ _ e36_38
  have d36_39 := HeatV.sub_nn K O _ _ e36_39
  have d36_40 := HeatV.sub_nn K O _ _ e36_40
  have d36_41 := HeatV.sub_nn K O _ _ e36_41
  have d36_42 := HeatV.sub_nn K O _ _ e36_42
  have d36_43 := HeatV.sub_nn K O _ _ e36_43
  have d36_44 := HeatV.sub_nn K O _ _ e36_44
  have d36_45 := HeatV.sub_nn K O _ _ e36_45
  have d36_46 := HeatV.sub_nn K O _ _ e36_46
  have d37_38 := HeatV.sub_nn K O _ _ e37_38
  have d37_39 := HeatV.sub_nn K O _ _ e37_39
  have d37_40 := HeatV.sub_nn K O _ _ e37_40
  have d37_41 := HeatV.sub_nn K O _ _ e37_41
  have d37_42 := HeatV.sub_nn K O _ _ e37_42
  have d37_43 := HeatV.sub_nn K O _ _ e37_43
  have d37_44 := HeatV.sub_nn K O _ _ e37_44
  have d37_45 := HeatV.sub_nn K O _ _ e37_45
  have d37_46 := HeatV.sub_nn K O _ _ e37_46
  have d37_47 := HeatV.sub_nn K O _ _ e37_47
  have d38_39 := HeatV.sub_nn K O _ _ e38_39
  have d38_40 := HeatV.sub_nn K O _ _ e38_40
  have d38_41 := HeatV.sub_nn K O _ _ e38_41
  have d38_42 := HeatV.sub_nn K O _ _ e38_42
  have d38_43 := HeatV.sub_nn K O _ _ e38_43
  have d38_44 := HeatV.sub_nn K O _ _ e38_44
  have d38_45 := HeatV.sub_nn K O _ _ e38_45
  have d38_46 := HeatV.sub_nn K O _ _ e38_46
  have d38_47 := HeatV.sub_nn K O _ _ e38_47
  have d39_40 := HeatV.sub_nn K O _ _ e39_40
  have d39_41 := HeatV.sub_nn K O _ _ e39_41
  have d39_42 := HeatV.sub_nn K O _ _ e39_42
  have d39_43 := HeatV.sub_nn K O _ _ e39_43
  have d39_44 := HeatV.sub_nn K O _ _ e39_44
  have d39_45 := HeatV.sub_nn K O _ _ e39_45
  have d39_46 := HeatV.sub_nn K O _ _ e39_46
  have d39_47 := HeatV.sub_nn K O _ _ e39_47
  have d40_41 := HeatV.sub_nn K O _ _ e40_41
  have d40_42 := HeatV.sub_nn K O _ _ e40_42
  have d40_43 := HeatV.sub_nn K O _ _ e40_43
  have d40_44 := HeatV.sub_nn K O _ _ e40_44
  have d40_45 := HeatV.sub_nn K O _ _ e40_45
  have d40_46 := HeatV.sub_nn K O _ _ e40_46
  have d40_47 := HeatV.sub_nn K O _ _ e40_47
  have d41_42 := HeatV.sub_nn K O _ _ e41_42
  have d41_43 := HeatV.sub_nn K O _ _ e41_43
  have d41_44 := HeatV.sub_nn K O _ _ e41_44
  have d41_45 := HeatV.sub_nn K O _ _ e41_45
  have d41_46 := HeatV.sub_nn K O _ _ e41_46
  have d41_47 := HeatV.sub_nn K O _ _ e41_47
  have d42_43 := HeatV.sub_nn K O _ _ e42_43
  have d42_44 := HeatV.sub_nn K O _ _ e42_44
  have d42_45 := HeatV.sub_nn K O _ _ e42_45
  have d42_46 := HeatV.sub_nn K O _ _ e42_46
  have d42_47 := HeatV.sub_nn K O _ _ e42_47
  have d43_44 := HeatV.sub_nn K O _ _ e43_44
  have d43_45 := HeatV.sub_nn K O _ _ e43_45
  have d43_46 := HeatV.sub_nn K O _ _ e43_46
  have d43_47 := HeatV.sub_nn K O _ _ e43_47
  have d44_45 := HeatV.sub_nn K O _ _ e44_45
  have d44_46 := HeatV.sub_nn K O _ _ e44_46
  have d44_47 := HeatV.sub_nn K O _ _ e44_47
  have d45_46 := HeatV.sub_nn K O _ _ e45_46
  have d45_47 := HeatV.sub_nn K O _ _ e45_47
  have d46_47 := HeatV.sub_nn K O _ _ e46_47
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+195450 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 384160000) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (  -- (+5337 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..48, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 48 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 384160000) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (  -- (+5885 chars; full line in the Zenodo source)
      (K.mul (cN K 383679800) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.m  -- (+5885 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (A 37) (A 38) (A 39) (A 40) (A 41) (A 42) (A 43) (A 44) (A 45) (A 46) (A 47) (A 48) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn  -- (+378 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 48 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 48 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 48 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 48 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 48 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 48 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 48 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+61921 chars; full line in the Zenodo source)

end G61Lv47

#print axioms G61Lv47.add_nn
#print axioms G61Lv47.level
#print axioms G61Lv47.level_fun

ym/G61Lv48.lean

lean_all/ym/G61Lv48.lean

/-
  ym/G61Lv48 — T45, G61a at level n = 48 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv48

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxHeartbeats 0 in
set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 a42 a43 a44 a45 a46 a47 a48 a49 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le   -- (+1014 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+54661 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 433680625) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.m  -- (+5429 chars; full line in the Zenodo source)
      (K.mul (cN K 433160000) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0)   -- (+5432 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_29 := HeatV.sub_nn K O _ _ e0_29
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_32 := HeatV.sub_nn K O _ _ e0_32
  have d0_35 := HeatV.sub_nn K O _ _ e0_35
  have d0_36 := HeatV.sub_nn K O _ _ e0_36
  have d0_37 := HeatV.sub_nn K O _ _ e0_37
  have d0_38 := HeatV.sub_nn K O _ _ e0_38
  have d0_39 := HeatV.sub_nn K O _ _ e0_39
  have d0_40 := HeatV.sub_nn K O _ _ e0_40
  have d0_41 := HeatV.sub_nn K O _ _ e0_41
  have d0_43 := HeatV.sub_nn K O _ _ e0_43
  have d0_44 := HeatV.sub_nn K O _ _ e0_44
  have d0_45 := HeatV.sub_nn K O _ _ e0_45
  have d0_46 := HeatV.sub_nn K O _ _ e0_46
  have d0_48 := HeatV.sub_nn K O _ _ e0_48
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_29 := HeatV.sub_nn K O _ _ e1_29
  have d1_30 := HeatV.sub_nn K O _ _ e1_30
  have d1_31 := HeatV.sub_nn K O _ _ e1_31
  have d1_32 := HeatV.sub_nn K O _ _ e1_32
  have d1_33 := HeatV.sub_nn K O _ _ e1_33
  have d1_34 := HeatV.sub_nn K O _ _ e1_34
  have d1_35 := HeatV.sub_nn K O _ _ e1_35
  have d1_36 := HeatV.sub_nn K O _ _ e1_36
  have d1_37 := HeatV.sub_nn K O _ _ e1_37
  have d1_38 := HeatV.sub_nn K O _ _ e1_38
  have d1_39 := HeatV.sub_nn K O _ _ e1_39
  have d1_40 := HeatV.sub_nn K O _ _ e1_40
  have d1_41 := HeatV.sub_nn K O _ _ e1_41
  have d1_42 := HeatV.sub_nn K O _ _ e1_42
  have d1_43 := HeatV.sub_nn K O _ _ e1_43
  have d1_47 := HeatV.sub_nn K O _ _ e1_47
  have d1_48 := HeatV.sub_nn K O _ _ e1_48
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_34 := HeatV.sub_nn K O _ _ e2_34
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d2_36 := HeatV.sub_nn K O _ _ e2_36
  have d2_37 := HeatV.sub_nn K O _ _ e2_37
  have d2_38 := HeatV.sub_nn K O _ _ e2_38
  have d2_39 := HeatV.sub_nn K O _ _ e2_39
  have d2_40 := HeatV.sub_nn K O _ _ e2_40
  have d2_41 := HeatV.sub_nn K O _ _ e2_41
  have d2_42 := HeatV.sub_nn K O _ _ e2_42
  have d2_43 := HeatV.sub_nn K O _ _ e2_43
  have d2_44 := HeatV.sub_nn K O _ _ e2_44
  have d2_46 := HeatV.sub_nn K O _ _ e2_46
  have d2_47 := HeatV.sub_nn K O _ _ e2_47
  have d2_48 := HeatV.sub_nn K O _ _ e2_48
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d3_34 := HeatV.sub_nn K O _ _ e3_34
  have d3_35 := HeatV.sub_nn K O _ _ e3_35
  have d3_36 := HeatV.sub_nn K O _ _ e3_36
  have d3_37 := HeatV.sub_nn K O _ _ e3_37
  have d3_38 := HeatV.sub_nn K O _ _ e3_38
  have d3_39 := HeatV.sub_nn K O _ _ e3_39
  have d3_40 := HeatV.sub_nn K O _ _ e3_40
  have d3_41 := HeatV.sub_nn K O _ _ e3_41
  have d3_42 := HeatV.sub_nn K O _ _ e3_42
  have d3_43 := HeatV.sub_nn K O _ _ e3_43
  have d3_45 := HeatV.sub_nn K O _ _ e3_45
  have d3_46 := HeatV.sub_nn K O _ _ e3_46
  have d3_47 := HeatV.sub_nn K O _ _ e3_47
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d4_34 := HeatV.sub_nn K O _ _ e4_34
  have d4_35 := HeatV.sub_nn K O _ _ e4_35
  have d4_36 := HeatV.sub_nn K O _ _ e4_36
  have d4_39 := HeatV.sub_nn K O _ _ e4_39
  have d4_40 := HeatV.sub_nn K O _ _ e4_40
  have d4_41 := HeatV.sub_nn K O _ _ e4_41
  have d4_44 := HeatV.sub_nn K O _ _ e4_44
  have d4_45 := HeatV.sub_nn K O _ _ e4_45
  have d4_46 := HeatV.sub_nn K O _ _ e4_46
  have d4_47 := HeatV.sub_nn K O _ _ e4_47
  have d4_48 := HeatV.sub_nn K O _ _ e4_48
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d5_33 := HeatV.sub_nn K O _ _ e5_33
  have d5_34 := HeatV.sub_nn K O _ _ e5_34
  have d5_35 := HeatV.sub_nn K O _ _ e5_35
  have d5_36 := HeatV.sub_nn K O _ _ e5_36
  have d5_37 := HeatV.sub_nn K O _ _ e5_37
  have d5_38 := HeatV.sub_nn K O _ _ e5_38
  have d5_39 := HeatV.sub_nn K O _ _ e5_39
  have d5_40 := HeatV.sub_nn K O _ _ e5_40
  have d5_41 := HeatV.sub_nn K O _ _ e5_41
  have d5_43 := HeatV.sub_nn K O _ _ e5_43
  have d5_44 := HeatV.sub_nn K O _ _ e5_44
  have d5_45 := HeatV.sub_nn K O _ _ e5_45
  have d5_46 := HeatV.sub_nn K O _ _ e5_46
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d6_33 := HeatV.sub_nn K O _ _ e6_33
  have d6_34 := HeatV.sub_nn K O _ _ e6_34
  have d6_35 := HeatV.sub_nn K O _ _ e6_35
  have d6_36 := HeatV.sub_nn K O _ _ e6_36
  have d6_37 := HeatV.sub_nn K O _ _ e6_37
  have d6_38 := HeatV.sub_nn K O _ _ e6_38
  have d6_39 := HeatV.sub_nn K O _ _ e6_39
  have d6_40 := HeatV.sub_nn K O _ _ e6_40
  have d6_42 := HeatV.sub_nn K O _ _ e6_42
  have d6_43 := HeatV.sub_nn K O _ _ e6_43
  have d6_44 := HeatV.sub_nn K O _ _ e6_44
  have d6_45 := HeatV.sub_nn K O _ _ e6_45
  have d6_46 := HeatV.sub_nn K O _ _ e6_46
  have d6_47 := HeatV.sub_nn K O _ _ e6_47
  have d6_48 := HeatV.sub_nn K O _ _ e6_48
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d7_33 := HeatV.sub_nn K O _ _ e7_33
  have d7_35 := HeatV.sub_nn K O _ _ e7_35
  have d7_36 := HeatV.sub_nn K O _ _ e7_36
  have d7_37 := HeatV.sub_nn K O _ _ e7_37
  have d7_38 := HeatV.sub_nn K O _ _ e7_38
  have d7_39 := HeatV.sub_nn K O _ _ e7_39
  have d7_41 := HeatV.sub_nn K O _ _ e7_41
  have d7_42 := HeatV.sub_nn K O _ _ e7_42
  have d7_43 := HeatV.sub_nn K O _ _ e7_43
  have d7_44 := HeatV.sub_nn K O _ _ e7_44
  have d7_45 := HeatV.sub_nn K O _ _ e7_45
  have d7_46 := HeatV.sub_nn K O _ _ e7_46
  have d7_47 := HeatV.sub_nn K O _ _ e7_47
  have d7_48 := HeatV.sub_nn K O _ _ e7_48
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_32 := HeatV.sub_nn K O _ _ e8_32
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_35 := HeatV.sub_nn K O _ _ e8_35
  have d8_36 := HeatV.sub_nn K O _ _ e8_36
  have d8_38 := HeatV.sub_nn K O _ _ e8_38
  have d8_40 := HeatV.sub_nn K O _ _ e8_40
  have d8_41 := HeatV.sub_nn K O _ _ e8_41
  have d8_42 := HeatV.sub_nn K O _ _ e8_42
  have d8_43 := HeatV.sub_nn K O _ _ e8_43
  have d8_44 := HeatV.sub_nn K O _ _ e8_44
  have d8_45 := HeatV.sub_nn K O _ _ e8_45
  have d8_46 := HeatV.sub_nn K O _ _ e8_46
  have d8_47 := HeatV.sub_nn K O _ _ e8_47
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d9_34 := HeatV.sub_nn K O _ _ e9_34
  have d9_35 := HeatV.sub_nn K O _ _ e9_35
  have d9_36 := HeatV.sub_nn K O _ _ e9_36
  have d9_37 := HeatV.sub_nn K O _ _ e9_37
  have d9_39 := HeatV.sub_nn K O _ _ e9_39
  have d9_40 := HeatV.sub_nn K O _ _ e9_40
  have d9_41 := HeatV.sub_nn K O _ _ e9_41
  have d9_42 := HeatV.sub_nn K O _ _ e9_42
  have d9_43 := HeatV.sub_nn K O _ _ e9_43
  have d9_44 := HeatV.sub_nn K O _ _ e9_44
  have d9_45 := HeatV.sub_nn K O _ _ e9_45
  have d9_46 := HeatV.sub_nn K O _ _ e9_46
  have d9_47 := HeatV.sub_nn K O _ _ e9_47
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_34 := HeatV.sub_nn K O _ _ e10_34
  have d10_35 := HeatV.sub_nn K O _ _ e10_35
  have d10_36 := HeatV.sub_nn K O _ _ e10_36
  have d10_38 := HeatV.sub_nn K O _ _ e10_38
  have d10_39 := HeatV.sub_nn K O _ _ e10_39
  have d10_40 := HeatV.sub_nn K O _ _ e10_40
  have d10_41 := HeatV.sub_nn K O _ _ e10_41
  have d10_42 := HeatV.sub_nn K O _ _ e10_42
  have d10_44 := HeatV.sub_nn K O _ _ e10_44
  have d10_45 := HeatV.sub_nn K O _ _ e10_45
  have d10_46 := HeatV.sub_nn K O _ _ e10_46
  have d10_47 := HeatV.sub_nn K O _ _ e10_47
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d11_35 := HeatV.sub_nn K O _ _ e11_35
  have d11_37 := HeatV.sub_nn K O _ _ e11_37
  have d11_38 := HeatV.sub_nn K O _ _ e11_38
  have d11_39 := HeatV.sub_nn K O _ _ e11_39
  have d11_40 := HeatV.sub_nn K O _ _ e11_40
  have d11_41 := HeatV.sub_nn K O _ _ e11_41
  have d11_42 := HeatV.sub_nn K O _ _ e11_42
  have d11_43 := HeatV.sub_nn K O _ _ e11_43
  have d11_44 := HeatV.sub_nn K O _ _ e11_44
  have d11_45 := HeatV.sub_nn K O _ _ e11_45
  have d11_46 := HeatV.sub_nn K O _ _ e11_46
  have d11_47 := HeatV.sub_nn K O _ _ e11_47
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_34 := HeatV.sub_nn K O _ _ e12_34
  have d12_35 := HeatV.sub_nn K O _ _ e12_35
  have d12_36 := HeatV.sub_nn K O _ _ e12_36
  have d12_37 := HeatV.sub_nn K O _ _ e12_37
  have d12_38 := HeatV.sub_nn K O _ _ e12_38
  have d12_39 := HeatV.sub_nn K O _ _ e12_39
  have d12_40 := HeatV.sub_nn K O _ _ e12_40
  have d12_41 := HeatV.sub_nn K O _ _ e12_41
  have d12_42 := HeatV.sub_nn K O _ _ e12_42
  have d12_43 := HeatV.sub_nn K O _ _ e12_43
  have d12_44 := HeatV.sub_nn K O _ _ e12_44
  have d12_45 := HeatV.sub_nn K O _ _ e12_45
  have d12_46 := HeatV.sub_nn K O _ _ e12_46
  have d12_47 := HeatV.sub_nn K O _ _ e12_47
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_33 := HeatV.sub_nn K O _ _ e13_33
  have d13_35 := HeatV.sub_nn K O _ _ e13_35
  have d13_36 := HeatV.sub_nn K O _ _ e13_36
  have d13_37 := HeatV.sub_nn K O _ _ e13_37
  have d13_38 := HeatV.sub_nn K O _ _ e13_38
  have d13_39 := HeatV.sub_nn K O _ _ e13_39
  have d13_40 := HeatV.sub_nn K O _ _ e13_40
  have d13_41 := HeatV.sub_nn K O _ _ e13_41
  have d13_42 := HeatV.sub_nn K O _ _ e13_42
  have d13_43 := HeatV.sub_nn K O _ _ e13_43
  have d13_44 := HeatV.sub_nn K O _ _ e13_44
  have d13_45 := HeatV.sub_nn K O _ _ e13_45
  have d13_46 := HeatV.sub_nn K O _ _ e13_46
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d14_35 := HeatV.sub_nn K O _ _ e14_35
  have d14_37 := HeatV.sub_nn K O _ _ e14_37
  have d14_38 := HeatV.sub_nn K O _ _ e14_38
  have d14_39 := HeatV.sub_nn K O _ _ e14_39
  have d14_40 := HeatV.sub_nn K O _ _ e14_40
  have d14_41 := HeatV.sub_nn K O _ _ e14_41
  have d14_42 := HeatV.sub_nn K O _ _ e14_42
  have d14_43 := HeatV.sub_nn K O _ _ e14_43
  have d14_44 := HeatV.sub_nn K O _ _ e14_44
  have d14_46 := HeatV.sub_nn K O _ _ e14_46
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_34 := HeatV.sub_nn K O _ _ e15_34
  have d15_35 := HeatV.sub_nn K O _ _ e15_35
  have d15_36 := HeatV.sub_nn K O _ _ e15_36
  have d15_37 := HeatV.sub_nn K O _ _ e15_37
  have d15_38 := HeatV.sub_nn K O _ _ e15_38
  have d15_39 := HeatV.sub_nn K O _ _ e15_39
  have d15_40 := HeatV.sub_nn K O _ _ e15_40
  have d15_41 := HeatV.sub_nn K O _ _ e15_41
  have d15_42 := HeatV.sub_nn K O _ _ e15_42
  have d15_43 := HeatV.sub_nn K O _ _ e15_43
  have d15_44 := HeatV.sub_nn K O _ _ e15_44
  have d15_45 := HeatV.sub_nn K O _ _ e15_45
  have d15_46 := HeatV.sub_nn K O _ _ e15_46
  have d15_47 := HeatV.sub_nn K O _ _ e15_47
  have d15_48 := HeatV.sub_nn K O _ _ e15_48
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d16_36 := HeatV.sub_nn K O _ _ e16_36
  have d16_37 := HeatV.sub_nn K O _ _ e16_37
  have d16_38 := HeatV.sub_nn K O _ _ e16_38
  have d16_39 := HeatV.sub_nn K O _ _ e16_39
  have d16_40 := HeatV.sub_nn K O _ _ e16_40
  have d16_42 := HeatV.sub_nn K O _ _ e16_42
  have d16_44 := HeatV.sub_nn K O _ _ e16_44
  have d16_45 := HeatV.sub_nn K O _ _ e16_45
  have d16_46 := HeatV.sub_nn K O _ _ e16_46
  have d16_47 := HeatV.sub_nn K O _ _ e16_47
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_34 := HeatV.sub_nn K O _ _ e17_34
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d17_36 := HeatV.sub_nn K O _ _ e17_36
  have d17_37 := HeatV.sub_nn K O _ _ e17_37
  have d17_38 := HeatV.sub_nn K O _ _ e17_38
  have d17_39 := HeatV.sub_nn K O _ _ e17_39
  have d17_40 := HeatV.sub_nn K O _ _ e17_40
  have d17_41 := HeatV.sub_nn K O _ _ e17_41
  have d17_42 := HeatV.sub_nn K O _ _ e17_42
  have d17_43 := HeatV.sub_nn K O _ _ e17_43
  have d17_44 := HeatV.sub_nn K O _ _ e17_44
  have d17_45 := HeatV.sub_nn K O _ _ e17_45
  have d17_46 := HeatV.sub_nn K O _ _ e17_46
  have d17_47 := HeatV.sub_nn K O _ _ e17_47
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d18_34 := HeatV.sub_nn K O _ _ e18_34
  have d18_35 := HeatV.sub_nn K O _ _ e18_35
  have d18_36 := HeatV.sub_nn K O _ _ e18_36
  have d18_37 := HeatV.sub_nn K O _ _ e18_37
  have d18_38 := HeatV.sub_nn K O _ _ e18_38
  have d18_39 := HeatV.sub_nn K O _ _ e18_39
  have d18_40 := HeatV.sub_nn K O _ _ e18_40
  have d18_41 := HeatV.sub_nn K O _ _ e18_41
  have d18_42 := HeatV.sub_nn K O _ _ e18_42
  have d18_43 := HeatV.sub_nn K O _ _ e18_43
  have d18_44 := HeatV.sub_nn K O _ _ e18_44
  have d18_45 := HeatV.sub_nn K O _ _ e18_45
  have d18_46 := HeatV.sub_nn K O _ _ e18_46
  have d18_47 := HeatV.sub_nn K O _ _ e18_47
  have d18_48 := HeatV.sub_nn K O _ _ e18_48
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d19_34 := HeatV.sub_nn K O _ _ e19_34
  have d19_35 := HeatV.sub_nn K O _ _ e19_35
  have d19_36 := HeatV.sub_nn K O _ _ e19_36
  have d19_37 := HeatV.sub_nn K O _ _ e19_37
  have d19_38 := HeatV.sub_nn K O _ _ e19_38
  have d19_39 := HeatV.sub_nn K O _ _ e19_39
  have d19_40 := HeatV.sub_nn K O _ _ e19_40
  have d19_41 := HeatV.sub_nn K O _ _ e19_41
  have d19_42 := HeatV.sub_nn K O _ _ e19_42
  have d19_43 := HeatV.sub_nn K O _ _ e19_43
  have d19_44 := HeatV.sub_nn K O _ _ e19_44
  have d19_45 := HeatV.sub_nn K O _ _ e19_45
  have d19_46 := HeatV.sub_nn K O _ _ e19_46
  have d19_47 := HeatV.sub_nn K O _ _ e19_47
  have d19_48 := HeatV.sub_nn K O _ _ e19_48
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_34 := HeatV.sub_nn K O _ _ e20_34
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d20_36 := HeatV.sub_nn K O _ _ e20_36
  have d20_37 := HeatV.sub_nn K O _ _ e20_37
  have d20_38 := HeatV.sub_nn K O _ _ e20_38
  have d20_39 := HeatV.sub_nn K O _ _ e20_39
  have d20_40 := HeatV.sub_nn K O _ _ e20_40
  have d20_41 := HeatV.sub_nn K O _ _ e20_41
  have d20_42 := HeatV.sub_nn K O _ _ e20_42
  have d20_43 := HeatV.sub_nn K O _ _ e20_43
  have d20_44 := HeatV.sub_nn K O _ _ e20_44
  have d20_45 := HeatV.sub_nn K O _ _ e20_45
  have d20_46 := HeatV.sub_nn K O _ _ e20_46
  have d20_47 := HeatV.sub_nn K O _ _ e20_47
  have d20_48 := HeatV.sub_nn K O _ _ e20_48
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d21_35 := HeatV.sub_nn K O _ _ e21_35
  have d21_36 := HeatV.sub_nn K O _ _ e21_36
  have d21_37 := HeatV.sub_nn K O _ _ e21_37
  have d21_38 := HeatV.sub_nn K O _ _ e21_38
  have d21_39 := HeatV.sub_nn K O _ _ e21_39
  have d21_40 := HeatV.sub_nn K O _ _ e21_40
  have d21_41 := HeatV.sub_nn K O _ _ e21_41
  have d21_42 := HeatV.sub_nn K O _ _ e21_42
  have d21_43 := HeatV.sub_nn K O _ _ e21_43
  have d21_44 := HeatV.sub_nn K O _ _ e21_44
  have d21_45 := HeatV.sub_nn K O _ _ e21_45
  have d21_46 := HeatV.sub_nn K O _ _ e21_46
  have d21_47 := HeatV.sub_nn K O _ _ e21_47
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d22_36 := HeatV.sub_nn K O _ _ e22_36
  have d22_37 := HeatV.sub_nn K O _ _ e22_37
  have d22_38 := HeatV.sub_nn K O _ _ e22_38
  have d22_39 := HeatV.sub_nn K O _ _ e22_39
  have d22_40 := HeatV.sub_nn K O _ _ e22_40
  have d22_41 := HeatV.sub_nn K O _ _ e22_41
  have d22_42 := HeatV.sub_nn K O _ _ e22_42
  have d22_43 := HeatV.sub_nn K O _ _ e22_43
  have d22_44 := HeatV.sub_nn K O _ _ e22_44
  have d22_45 := HeatV.sub_nn K O _ _ e22_45
  have d22_46 := HeatV.sub_nn K O _ _ e22_46
  have d22_47 := HeatV.sub_nn K O _ _ e22_47
  have d22_48 := HeatV.sub_nn K O _ _ e22_48
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d23_36 := HeatV.sub_nn K O _ _ e23_36
  have d23_37 := HeatV.sub_nn K O _ _ e23_37
  have d23_38 := HeatV.sub_nn K O _ _ e23_38
  have d23_39 := HeatV.sub_nn K O _ _ e23_39
  have d23_40 := HeatV.sub_nn K O _ _ e23_40
  have d23_41 := HeatV.sub_nn K O _ _ e23_41
  have d23_42 := HeatV.sub_nn K O _ _ e23_42
  have d23_43 := HeatV.sub_nn K O _ _ e23_43
  have d23_44 := HeatV.sub_nn K O _ _ e23_44
  have d23_45 := HeatV.sub_nn K O _ _ e23_45
  have d23_46 := HeatV.sub_nn K O _ _ e23_46
  have d23_47 := HeatV.sub_nn K O _ _ e23_47
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d24_35 := HeatV.sub_nn K O _ _ e24_35
  have d24_36 := HeatV.sub_nn K O _ _ e24_36
  have d24_37 := HeatV.sub_nn K O _ _ e24_37
  have d24_38 := HeatV.sub_nn K O _ _ e24_38
  have d24_39 := HeatV.sub_nn K O _ _ e24_39
  have d24_40 := HeatV.sub_nn K O _ _ e24_40
  have d24_41 := HeatV.sub_nn K O _ _ e24_41
  have d24_42 := HeatV.sub_nn K O _ _ e24_42
  have d24_43 := HeatV.sub_nn K O _ _ e24_43
  have d24_44 := HeatV.sub_nn K O _ _ e24_44
  have d24_45 := HeatV.sub_nn K O _ _ e24_45
  have d24_46 := HeatV.sub_nn K O _ _ e24_46
  have d24_47 := HeatV.sub_nn K O _ _ e24_47
  have d24_48 := HeatV.sub_nn K O _ _ e24_48
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d25_35 := HeatV.sub_nn K O _ _ e25_35
  have d25_36 := HeatV.sub_nn K O _ _ e25_36
  have d25_37 := HeatV.sub_nn K O _ _ e25_37
  have d25_38 := HeatV.sub_nn K O _ _ e25_38
  have d25_39 := HeatV.sub_nn K O _ _ e25_39
  have d25_40 := HeatV.sub_nn K O _ _ e25_40
  have d25_41 := HeatV.sub_nn K O _ _ e25_41
  have d25_42 := HeatV.sub_nn K O _ _ e25_42
  have d25_43 := HeatV.sub_nn K O _ _ e25_43
  have d25_44 := HeatV.sub_nn K O _ _ e25_44
  have d25_45 := HeatV.sub_nn K O _ _ e25_45
  have d25_46 := HeatV.sub_nn K O _ _ e25_46
  have d25_47 := HeatV.sub_nn K O _ _ e25_47
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d26_36 := HeatV.sub_nn K O _ _ e26_36
  have d26_37 := HeatV.sub_nn K O _ _ e26_37
  have d26_38 := HeatV.sub_nn K O _ _ e26_38
  have d26_39 := HeatV.sub_nn K O _ _ e26_39
  have d26_40 := HeatV.sub_nn K O _ _ e26_40
  have d26_41 := HeatV.sub_nn K O _ _ e26_41
  have d26_42 := HeatV.sub_nn K O _ _ e26_42
  have d26_43 := HeatV.sub_nn K O _ _ e26_43
  have d26_44 := HeatV.sub_nn K O _ _ e26_44
  have d26_45 := HeatV.sub_nn K O _ _ e26_45
  have d26_46 := HeatV.sub_nn K O _ _ e26_46
  have d26_47 := HeatV.sub_nn K O _ _ e26_47
  have d26_48 := HeatV.sub_nn K O _ _ e26_48
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d27_35 := HeatV.sub_nn K O _ _ e27_35
  have d27_36 := HeatV.sub_nn K O _ _ e27_36
  have d27_37 := HeatV.sub_nn K O _ _ e27_37
  have d27_38 := HeatV.sub_nn K O _ _ e27_38
  have d27_39 := HeatV.sub_nn K O _ _ e27_39
  have d27_40 := HeatV.sub_nn K O _ _ e27_40
  have d27_41 := HeatV.sub_nn K O _ _ e27_41
  have d27_42 := HeatV.sub_nn K O _ _ e27_42
  have d27_43 := HeatV.sub_nn K O _ _ e27_43
  have d27_44 := HeatV.sub_nn K O _ _ e27_44
  have d27_45 := HeatV.sub_nn K O _ _ e27_45
  have d27_46 := HeatV.sub_nn K O _ _ e27_46
  have d27_47 := HeatV.sub_nn K O _ _ e27_47
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d28_35 := HeatV.sub_nn K O _ _ e28_35
  have d28_36 := HeatV.sub_nn K O _ _ e28_36
  have d28_37 := HeatV.sub_nn K O _ _ e28_37
  have d28_38 := HeatV.sub_nn K O _ _ e28_38
  have d28_39 := HeatV.sub_nn K O _ _ e28_39
  have d28_40 := HeatV.sub_nn K O _ _ e28_40
  have d28_41 := HeatV.sub_nn K O _ _ e28_41
  have d28_42 := HeatV.sub_nn K O _ _ e28_42
  have d28_43 := HeatV.sub_nn K O _ _ e28_43
  have d28_44 := HeatV.sub_nn K O _ _ e28_44
  have d28_45 := HeatV.sub_nn K O _ _ e28_45
  have d28_46 := HeatV.sub_nn K O _ _ e28_46
  have d28_47 := HeatV.sub_nn K O _ _ e28_47
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d29_36 := HeatV.sub_nn K O _ _ e29_36
  have d29_37 := HeatV.sub_nn K O _ _ e29_37
  have d29_38 := HeatV.sub_nn K O _ _ e29_38
  have d29_39 := HeatV.sub_nn K O _ _ e29_39
  have d29_40 := HeatV.sub_nn K O _ _ e29_40
  have d29_41 := HeatV.sub_nn K O _ _ e29_41
  have d29_42 := HeatV.sub_nn K O _ _ e29_42
  have d29_43 := HeatV.sub_nn K O _ _ e29_43
  have d29_44 := HeatV.sub_nn K O _ _ e29_44
  have d29_45 := HeatV.sub_nn K O _ _ e29_45
  have d29_46 := HeatV.sub_nn K O _ _ e29_46
  have d29_47 := HeatV.sub_nn K O _ _ e29_47
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d30_35 := HeatV.sub_nn K O _ _ e30_35
  have d30_36 := HeatV.sub_nn K O _ _ e30_36
  have d30_37 := HeatV.sub_nn K O _ _ e30_37
  have d30_38 := HeatV.sub_nn K O _ _ e30_38
  have d30_39 := HeatV.sub_nn K O _ _ e30_39
  have d30_40 := HeatV.sub_nn K O _ _ e30_40
  have d30_41 := HeatV.sub_nn K O _ _ e30_41
  have d30_42 := HeatV.sub_nn K O _ _ e30_42
  have d30_43 := HeatV.sub_nn K O _ _ e30_43
  have d30_44 := HeatV.sub_nn K O _ _ e30_44
  have d30_45 := HeatV.sub_nn K O _ _ e30_45
  have d30_46 := HeatV.sub_nn K O _ _ e30_46
  have d30_47 := HeatV.sub_nn K O _ _ e30_47
  have d30_48 := HeatV.sub_nn K O _ _ e30_48
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d31_35 := HeatV.sub_nn K O _ _ e31_35
  have d31_36 := HeatV.sub_nn K O _ _ e31_36
  have d31_37 := HeatV.sub_nn K O _ _ e31_37
  have d31_38 := HeatV.sub_nn K O _ _ e31_38
  have d31_39 := HeatV.sub_nn K O _ _ e31_39
  have d31_40 := HeatV.sub_nn K O _ _ e31_40
  have d31_41 := HeatV.sub_nn K O _ _ e31_41
  have d31_42 := HeatV.sub_nn K O _ _ e31_42
  have d31_43 := HeatV.sub_nn K O _ _ e31_43
  have d31_44 := HeatV.sub_nn K O _ _ e31_44
  have d31_45 := HeatV.sub_nn K O _ _ e31_45
  have d31_46 := HeatV.sub_nn K O _ _ e31_46
  have d31_47 := HeatV.sub_nn K O _ _ e31_47
  have d31_48 := HeatV.sub_nn K O _ _ e31_48
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d32_36 := HeatV.sub_nn K O _ _ e32_36
  have d32_37 := HeatV.sub_nn K O _ _ e32_37
  have d32_38 := HeatV.sub_nn K O _ _ e32_38
  have d32_39 := HeatV.sub_nn K O _ _ e32_39
  have d32_40 := HeatV.sub_nn K O _ _ e32_40
  have d32_41 := HeatV.sub_nn K O _ _ e32_41
  have d32_42 := HeatV.sub_nn K O _ _ e32_42
  have d32_43 := HeatV.sub_nn K O _ _ e32_43
  have d32_44 := HeatV.sub_nn K O _ _ e32_44
  have d32_45 := HeatV.sub_nn K O _ _ e32_45
  have d32_46 := HeatV.sub_nn K O _ _ e32_46
  have d32_47 := HeatV.sub_nn K O _ _ e32_47
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d33_36 := HeatV.sub_nn K O _ _ e33_36
  have d33_37 := HeatV.sub_nn K O _ _ e33_37
  have d33_38 := HeatV.sub_nn K O _ _ e33_38
  have d33_39 := HeatV.sub_nn K O _ _ e33_39
  have d33_40 := HeatV.sub_nn K O _ _ e33_40
  have d33_41 := HeatV.sub_nn K O _ _ e33_41
  have d33_42 := HeatV.sub_nn K O _ _ e33_42
  have d33_43 := HeatV.sub_nn K O _ _ e33_43
  have d33_44 := HeatV.sub_nn K O _ _ e33_44
  have d33_45 := HeatV.sub_nn K O _ _ e33_45
  have d33_46 := HeatV.sub_nn K O _ _ e33_46
  have d33_47 := HeatV.sub_nn K O _ _ e33_47
  have d33_48 := HeatV.sub_nn K O _ _ e33_48
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have d34_36 := HeatV.sub_nn K O _ _ e34_36
  have d34_37 := HeatV.sub_nn K O _ _ e34_37
  have d34_38 := HeatV.sub_nn K O _ _ e34_38
  have d34_39 := HeatV.sub_nn K O _ _ e34_39
  have d34_40 := HeatV.sub_nn K O _ _ e34_40
  have d34_41 := HeatV.sub_nn K O _ _ e34_41
  have d34_42 := HeatV.sub_nn K O _ _ e34_42
  have d34_43 := HeatV.sub_nn K O _ _ e34_43
  have d34_44 := HeatV.sub_nn K O _ _ e34_44
  have d34_45 := HeatV.sub_nn K O _ _ e34_45
  have d34_46 := HeatV.sub_nn K O _ _ e34_46
  have d34_47 := HeatV.sub_nn K O _ _ e34_47
  have d34_48 := HeatV.sub_nn K O _ _ e34_48
  have d35_36 := HeatV.sub_nn K O _ _ e35_36
  have d35_37 := HeatV.sub_nn K O _ _ e35_37
  have d35_38 := HeatV.sub_nn K O _ _ e35_38
  have d35_39 := HeatV.sub_nn K O _ _ e35_39
  have d35_40 := HeatV.sub_nn K O _ _ e35_40
  have d35_41 := HeatV.sub_nn K O _ _ e35_41
  have d35_42 := HeatV.sub_nn K O _ _ e35_42
  have d35_43 := HeatV.sub_nn K O _ _ e35_43
  have d35_44 := HeatV.sub_nn K O _ _ e35_44
  have d35_45 := HeatV.sub_nn K O _ _ e35_45
  have d35_46 := HeatV.sub_nn K O _ _ e35_46
  have d35_47 := HeatV.sub_nn K O _ _ e35_47
  have d35_48 := HeatV.sub_nn K O _ _ e35_48
  have d36_37 := HeatV.sub_nn K O _ _ e36_37
  have d36_38 := HeatV.sub_nn K O _ _ e36_38
  have d36_39 := HeatV.sub_nn K O _ _ e36_39
  have d36_40 := HeatV.sub_nn K O _ _ e36_40
  have d36_41 := HeatV.sub_nn K O _ _ e36_41
  have d36_42 := HeatV.sub_nn K O _ _ e36_42
  have d36_43 := HeatV.sub_nn K O _ _ e36_43
  have d36_44 := HeatV.sub_nn K O _ _ e36_44
  have d36_45 := HeatV.sub_nn K O _ _ e36_45
  have d36_46 := HeatV.sub_nn K O _ _ e36_46
  have d36_47 := HeatV.sub_nn K O _ _ e36_47
  have d36_48 := HeatV.sub_nn K O _ _ e36_48
  have d37_38 := HeatV.sub_nn K O _ _ e37_38
  have d37_39 := HeatV.sub_nn K O _ _ e37_39
  have d37_40 := HeatV.sub_nn K O _ _ e37_40
  have d37_41 := HeatV.sub_nn K O _ _ e37_41
  have d37_42 := HeatV.sub_nn K O _ _ e37_42
  have d37_43 := HeatV.sub_nn K O _ _ e37_43
  have d37_44 := HeatV.sub_nn K O _ _ e37_44
  have d37_45 := HeatV.sub_nn K O _ _ e37_45
  have d37_46 := HeatV.sub_nn K O _ _ e37_46
  have d37_47 := HeatV.sub_nn K O _ _ e37_47
  have d37_48 := HeatV.sub_nn K O _ _ e37_48
  have d38_39 := HeatV.sub_nn K O _ _ e38_39
  have d38_40 := HeatV.sub_nn K O _ _ e38_40
  have d38_41 := HeatV.sub_nn K O _ _ e38_41
  have d38_42 := HeatV.sub_nn K O _ _ e38_42
  have d38_43 := HeatV.sub_nn K O _ _ e38_43
  have d38_44 := HeatV.sub_nn K O _ _ e38_44
  have d38_45 := HeatV.sub_nn K O _ _ e38_45
  have d38_46 := HeatV.sub_nn K O _ _ e38_46
  have d38_47 := HeatV.sub_nn K O _ _ e38_47
  have d38_48 := HeatV.sub_nn K O _ _ e38_48
  have d39_40 := HeatV.sub_nn K O _ _ e39_40
  have d39_41 := HeatV.sub_nn K O _ _ e39_41
  have d39_42 := HeatV.sub_nn K O _ _ e39_42
  have d39_43 := HeatV.sub_nn K O _ _ e39_43
  have d39_44 := HeatV.sub_nn K O _ _ e39_44
  have d39_45 := HeatV.sub_nn K O _ _ e39_45
  have d39_46 := HeatV.sub_nn K O _ _ e39_46
  have d39_47 := HeatV.sub_nn K O _ _ e39_47
  have d39_48 := HeatV.sub_nn K O _ _ e39_48
  have d40_41 := HeatV.sub_nn K O _ _ e40_41
  have d40_42 := HeatV.sub_nn K O _ _ e40_42
  have d40_43 := HeatV.sub_nn K O _ _ e40_43
  have d40_44 := HeatV.sub_nn K O _ _ e40_44
  have d40_45 := HeatV.sub_nn K O _ _ e40_45
  have d40_46 := HeatV.sub_nn K O _ _ e40_46
  have d40_47 := HeatV.sub_nn K O _ _ e40_47
  have d40_48 := HeatV.sub_nn K O _ _ e40_48
  have d41_42 := HeatV.sub_nn K O _ _ e41_42
  have d41_43 := HeatV.sub_nn K O _ _ e41_43
  have d41_44 := HeatV.sub_nn K O _ _ e41_44
  have d41_45 := HeatV.sub_nn K O _ _ e41_45
  have d41_46 := HeatV.sub_nn K O _ _ e41_46
  have d41_47 := HeatV.sub_nn K O _ _ e41_47
  have d41_48 := HeatV.sub_nn K O _ _ e41_48
  have d42_43 := HeatV.sub_nn K O _ _ e42_43
  have d42_44 := HeatV.sub_nn K O _ _ e42_44
  have d42_45 := HeatV.sub_nn K O _ _ e42_45
  have d42_46 := HeatV.sub_nn K O _ _ e42_46
  have d42_47 := HeatV.sub_nn K O _ _ e42_47
  have d42_48 := HeatV.sub_nn K O _ _ e42_48
  have d43_44 := HeatV.sub_nn K O _ _ e43_44
  have d43_45 := HeatV.sub_nn K O _ _ e43_45
  have d43_46 := HeatV.sub_nn K O _ _ e43_46
  have d43_47 := HeatV.sub_nn K O _ _ e43_47
  have d44_45 := HeatV.sub_nn K O _ _ e44_45
  have d44_46 := HeatV.sub_nn K O _ _ e44_46
  have d44_47 := HeatV.sub_nn K O _ _ e44_47
  have d44_48 := HeatV.sub_nn K O _ _ e44_48
  have d45_46 := HeatV.sub_nn K O _ _ e45_46
  have d45_47 := HeatV.sub_nn K O _ _ e45_47
  have d45_48 := HeatV.sub_nn K O _ _ e45_48
  have d46_47 := HeatV.sub_nn K O _ _ e46_47
  have d46_48 := HeatV.sub_nn K O _ _ e46_48
  have d47_48 := HeatV.sub_nn K O _ _ e47_48
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+201294 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 433680625) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (  -- (+5457 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..49, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 49 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 433680625) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (  -- (+6017 chars; full line in the Zenodo source)
      (K.mul (cN K 433160000) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0  -- (+6017 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (A 37) (A 38) (A 39) (A 40) (A 41) (A 42) (A 43) (A 44) (A 45) (A 46) (A 47) (A 48) (A 49) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn   -- (+394 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 49 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 49 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 49 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 49 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 49 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 49 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 49 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+64589 chars; full line in the Zenodo source)

end G61Lv48

#print axioms G61Lv48.add_nn
#print axioms G61Lv48.level
#print axioms G61Lv48.level_fun

ym/G61Lv49.lean

lean_all/ym/G61Lv49.lean

/-
  ym/G61Lv49 — T45, G61a at level n = 49 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv49

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxHeartbeats 0 in
set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 a42 a43 a44 a45 a46 a47 a48 a49 a50 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O  -- (+1042 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+56984 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 488410000) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a  -- (+5549 chars; full line in the Zenodo source)
      (K.mul (cN K 487846450) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K   -- (+5552 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_29 := HeatV.sub_nn K O _ _ e0_29
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_32 := HeatV.sub_nn K O _ _ e0_32
  have d0_33 := HeatV.sub_nn K O _ _ e0_33
  have d0_34 := HeatV.sub_nn K O _ _ e0_34
  have d0_35 := HeatV.sub_nn K O _ _ e0_35
  have d0_36 := HeatV.sub_nn K O _ _ e0_36
  have d0_37 := HeatV.sub_nn K O _ _ e0_37
  have d0_38 := HeatV.sub_nn K O _ _ e0_38
  have d0_39 := HeatV.sub_nn K O _ _ e0_39
  have d0_40 := HeatV.sub_nn K O _ _ e0_40
  have d0_41 := HeatV.sub_nn K O _ _ e0_41
  have d0_42 := HeatV.sub_nn K O _ _ e0_42
  have d0_43 := HeatV.sub_nn K O _ _ e0_43
  have d0_44 := HeatV.sub_nn K O _ _ e0_44
  have d0_45 := HeatV.sub_nn K O _ _ e0_45
  have d0_47 := HeatV.sub_nn K O _ _ e0_47
  have d0_49 := HeatV.sub_nn K O _ _ e0_49
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_29 := HeatV.sub_nn K O _ _ e1_29
  have d1_30 := HeatV.sub_nn K O _ _ e1_30
  have d1_31 := HeatV.sub_nn K O _ _ e1_31
  have d1_32 := HeatV.sub_nn K O _ _ e1_32
  have d1_33 := HeatV.sub_nn K O _ _ e1_33
  have d1_34 := HeatV.sub_nn K O _ _ e1_34
  have d1_35 := HeatV.sub_nn K O _ _ e1_35
  have d1_37 := HeatV.sub_nn K O _ _ e1_37
  have d1_38 := HeatV.sub_nn K O _ _ e1_38
  have d1_39 := HeatV.sub_nn K O _ _ e1_39
  have d1_40 := HeatV.sub_nn K O _ _ e1_40
  have d1_41 := HeatV.sub_nn K O _ _ e1_41
  have d1_42 := HeatV.sub_nn K O _ _ e1_42
  have d1_43 := HeatV.sub_nn K O _ _ e1_43
  have d1_44 := HeatV.sub_nn K O _ _ e1_44
  have d1_45 := HeatV.sub_nn K O _ _ e1_45
  have d1_46 := HeatV.sub_nn K O _ _ e1_46
  have d1_47 := HeatV.sub_nn K O _ _ e1_47
  have d1_48 := HeatV.sub_nn K O _ _ e1_48
  have d1_49 := HeatV.sub_nn K O _ _ e1_49
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_33 := HeatV.sub_nn K O _ _ e2_33
  have d2_34 := HeatV.sub_nn K O _ _ e2_34
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d2_36 := HeatV.sub_nn K O _ _ e2_36
  have d2_37 := HeatV.sub_nn K O _ _ e2_37
  have d2_38 := HeatV.sub_nn K O _ _ e2_38
  have d2_39 := HeatV.sub_nn K O _ _ e2_39
  have d2_40 := HeatV.sub_nn K O _ _ e2_40
  have d2_41 := HeatV.sub_nn K O _ _ e2_41
  have d2_43 := HeatV.sub_nn K O _ _ e2_43
  have d2_44 := HeatV.sub_nn K O _ _ e2_44
  have d2_47 := HeatV.sub_nn K O _ _ e2_47
  have d2_48 := HeatV.sub_nn K O _ _ e2_48
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d3_34 := HeatV.sub_nn K O _ _ e3_34
  have d3_35 := HeatV.sub_nn K O _ _ e3_35
  have d3_36 := HeatV.sub_nn K O _ _ e3_36
  have d3_37 := HeatV.sub_nn K O _ _ e3_37
  have d3_38 := HeatV.sub_nn K O _ _ e3_38
  have d3_39 := HeatV.sub_nn K O _ _ e3_39
  have d3_40 := HeatV.sub_nn K O _ _ e3_40
  have d3_41 := HeatV.sub_nn K O _ _ e3_41
  have d3_42 := HeatV.sub_nn K O _ _ e3_42
  have d3_43 := HeatV.sub_nn K O _ _ e3_43
  have d3_44 := HeatV.sub_nn K O _ _ e3_44
  have d3_46 := HeatV.sub_nn K O _ _ e3_46
  have d3_47 := HeatV.sub_nn K O _ _ e3_47
  have d3_48 := HeatV.sub_nn K O _ _ e3_48
  have d3_49 := HeatV.sub_nn K O _ _ e3_49
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d4_34 := HeatV.sub_nn K O _ _ e4_34
  have d4_36 := HeatV.sub_nn K O _ _ e4_36
  have d4_38 := HeatV.sub_nn K O _ _ e4_38
  have d4_39 := HeatV.sub_nn K O _ _ e4_39
  have d4_41 := HeatV.sub_nn K O _ _ e4_41
  have d4_42 := HeatV.sub_nn K O _ _ e4_42
  have d4_43 := HeatV.sub_nn K O _ _ e4_43
  have d4_45 := HeatV.sub_nn K O _ _ e4_45
  have d4_46 := HeatV.sub_nn K O _ _ e4_46
  have d4_47 := HeatV.sub_nn K O _ _ e4_47
  have d4_48 := HeatV.sub_nn K O _ _ e4_48
  have d4_49 := HeatV.sub_nn K O _ _ e4_49
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d5_34 := HeatV.sub_nn K O _ _ e5_34
  have d5_36 := HeatV.sub_nn K O _ _ e5_36
  have d5_37 := HeatV.sub_nn K O _ _ e5_37
  have d5_38 := HeatV.sub_nn K O _ _ e5_38
  have d5_39 := HeatV.sub_nn K O _ _ e5_39
  have d5_40 := HeatV.sub_nn K O _ _ e5_40
  have d5_41 := HeatV.sub_nn K O _ _ e5_41
  have d5_42 := HeatV.sub_nn K O _ _ e5_42
  have d5_44 := HeatV.sub_nn K O _ _ e5_44
  have d5_45 := HeatV.sub_nn K O _ _ e5_45
  have d5_46 := HeatV.sub_nn K O _ _ e5_46
  have d5_47 := HeatV.sub_nn K O _ _ e5_47
  have d5_48 := HeatV.sub_nn K O _ _ e5_48
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d6_34 := HeatV.sub_nn K O _ _ e6_34
  have d6_35 := HeatV.sub_nn K O _ _ e6_35
  have d6_36 := HeatV.sub_nn K O _ _ e6_36
  have d6_37 := HeatV.sub_nn K O _ _ e6_37
  have d6_38 := HeatV.sub_nn K O _ _ e6_38
  have d6_39 := HeatV.sub_nn K O _ _ e6_39
  have d6_40 := HeatV.sub_nn K O _ _ e6_40
  have d6_41 := HeatV.sub_nn K O _ _ e6_41
  have d6_43 := HeatV.sub_nn K O _ _ e6_43
  have d6_44 := HeatV.sub_nn K O _ _ e6_44
  have d6_45 := HeatV.sub_nn K O _ _ e6_45
  have d6_46 := HeatV.sub_nn K O _ _ e6_46
  have d6_47 := HeatV.sub_nn K O _ _ e6_47
  have d6_48 := HeatV.sub_nn K O _ _ e6_48
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d7_33 := HeatV.sub_nn K O _ _ e7_33
  have d7_34 := HeatV.sub_nn K O _ _ e7_34
  have d7_35 := HeatV.sub_nn K O _ _ e7_35
  have d7_36 := HeatV.sub_nn K O _ _ e7_36
  have d7_37 := HeatV.sub_nn K O _ _ e7_37
  have d7_38 := HeatV.sub_nn K O _ _ e7_38
  have d7_39 := HeatV.sub_nn K O _ _ e7_39
  have d7_40 := HeatV.sub_nn K O _ _ e7_40
  have d7_41 := HeatV.sub_nn K O _ _ e7_41
  have d7_42 := HeatV.sub_nn K O _ _ e7_42
  have d7_43 := HeatV.sub_nn K O _ _ e7_43
  have d7_44 := HeatV.sub_nn K O _ _ e7_44
  have d7_45 := HeatV.sub_nn K O _ _ e7_45
  have d7_46 := HeatV.sub_nn K O _ _ e7_46
  have d7_47 := HeatV.sub_nn K O _ _ e7_47
  have d7_48 := HeatV.sub_nn K O _ _ e7_48
  have d7_49 := HeatV.sub_nn K O _ _ e7_49
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_32 := HeatV.sub_nn K O _ _ e8_32
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_34 := HeatV.sub_nn K O _ _ e8_34
  have d8_35 := HeatV.sub_nn K O _ _ e8_35
  have d8_36 := HeatV.sub_nn K O _ _ e8_36
  have d8_37 := HeatV.sub_nn K O _ _ e8_37
  have d8_38 := HeatV.sub_nn K O _ _ e8_38
  have d8_39 := HeatV.sub_nn K O _ _ e8_39
  have d8_41 := HeatV.sub_nn K O _ _ e8_41
  have d8_42 := HeatV.sub_nn K O _ _ e8_42
  have d8_43 := HeatV.sub_nn K O _ _ e8_43
  have d8_44 := HeatV.sub_nn K O _ _ e8_44
  have d8_45 := HeatV.sub_nn K O _ _ e8_45
  have d8_46 := HeatV.sub_nn K O _ _ e8_46
  have d8_47 := HeatV.sub_nn K O _ _ e8_47
  have d8_48 := HeatV.sub_nn K O _ _ e8_48
  have d8_49 := HeatV.sub_nn K O _ _ e8_49
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d9_34 := HeatV.sub_nn K O _ _ e9_34
  have d9_35 := HeatV.sub_nn K O _ _ e9_35
  have d9_36 := HeatV.sub_nn K O _ _ e9_36
  have d9_37 := HeatV.sub_nn K O _ _ e9_37
  have d9_38 := HeatV.sub_nn K O _ _ e9_38
  have d9_40 := HeatV.sub_nn K O _ _ e9_40
  have d9_41 := HeatV.sub_nn K O _ _ e9_41
  have d9_42 := HeatV.sub_nn K O _ _ e9_42
  have d9_43 := HeatV.sub_nn K O _ _ e9_43
  have d9_44 := HeatV.sub_nn K O _ _ e9_44
  have d9_45 := HeatV.sub_nn K O _ _ e9_45
  have d9_46 := HeatV.sub_nn K O _ _ e9_46
  have d9_47 := HeatV.sub_nn K O _ _ e9_47
  have d9_48 := HeatV.sub_nn K O _ _ e9_48
  have d9_49 := HeatV.sub_nn K O _ _ e9_49
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_34 := HeatV.sub_nn K O _ _ e10_34
  have d10_35 := HeatV.sub_nn K O _ _ e10_35
  have d10_36 := HeatV.sub_nn K O _ _ e10_36
  have d10_37 := HeatV.sub_nn K O _ _ e10_37
  have d10_38 := HeatV.sub_nn K O _ _ e10_38
  have d10_39 := HeatV.sub_nn K O _ _ e10_39
  have d10_40 := HeatV.sub_nn K O _ _ e10_40
  have d10_41 := HeatV.sub_nn K O _ _ e10_41
  have d10_42 := HeatV.sub_nn K O _ _ e10_42
  have d10_43 := HeatV.sub_nn K O _ _ e10_43
  have d10_44 := HeatV.sub_nn K O _ _ e10_44
  have d10_45 := HeatV.sub_nn K O _ _ e10_45
  have d10_46 := HeatV.sub_nn K O _ _ e10_46
  have d10_47 := HeatV.sub_nn K O _ _ e10_47
  have d10_48 := HeatV.sub_nn K O _ _ e10_48
  have d10_49 := HeatV.sub_nn K O _ _ e10_49
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d11_33 := HeatV.sub_nn K O _ _ e11_33
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d11_35 := HeatV.sub_nn K O _ _ e11_35
  have d11_36 := HeatV.sub_nn K O _ _ e11_36
  have d11_38 := HeatV.sub_nn K O _ _ e11_38
  have d11_39 := HeatV.sub_nn K O _ _ e11_39
  have d11_40 := HeatV.sub_nn K O _ _ e11_40
  have d11_41 := HeatV.sub_nn K O _ _ e11_41
  have d11_42 := HeatV.sub_nn K O _ _ e11_42
  have d11_43 := HeatV.sub_nn K O _ _ e11_43
  have d11_44 := HeatV.sub_nn K O _ _ e11_44
  have d11_45 := HeatV.sub_nn K O _ _ e11_45
  have d11_46 := HeatV.sub_nn K O _ _ e11_46
  have d11_47 := HeatV.sub_nn K O _ _ e11_47
  have d11_48 := HeatV.sub_nn K O _ _ e11_48
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d12_34 := HeatV.sub_nn K O _ _ e12_34
  have d12_36 := HeatV.sub_nn K O _ _ e12_36
  have d12_37 := HeatV.sub_nn K O _ _ e12_37
  have d12_38 := HeatV.sub_nn K O _ _ e12_38
  have d12_39 := HeatV.sub_nn K O _ _ e12_39
  have d12_40 := HeatV.sub_nn K O _ _ e12_40
  have d12_41 := HeatV.sub_nn K O _ _ e12_41
  have d12_42 := HeatV.sub_nn K O _ _ e12_42
  have d12_43 := HeatV.sub_nn K O _ _ e12_43
  have d12_44 := HeatV.sub_nn K O _ _ e12_44
  have d12_45 := HeatV.sub_nn K O _ _ e12_45
  have d12_46 := HeatV.sub_nn K O _ _ e12_46
  have d12_48 := HeatV.sub_nn K O _ _ e12_48
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_33 := HeatV.sub_nn K O _ _ e13_33
  have d13_34 := HeatV.sub_nn K O _ _ e13_34
  have d13_36 := HeatV.sub_nn K O _ _ e13_36
  have d13_37 := HeatV.sub_nn K O _ _ e13_37
  have d13_38 := HeatV.sub_nn K O _ _ e13_38
  have d13_39 := HeatV.sub_nn K O _ _ e13_39
  have d13_40 := HeatV.sub_nn K O _ _ e13_40
  have d13_41 := HeatV.sub_nn K O _ _ e13_41
  have d13_42 := HeatV.sub_nn K O _ _ e13_42
  have d13_44 := HeatV.sub_nn K O _ _ e13_44
  have d13_45 := HeatV.sub_nn K O _ _ e13_45
  have d13_46 := HeatV.sub_nn K O _ _ e13_46
  have d13_47 := HeatV.sub_nn K O _ _ e13_47
  have d13_48 := HeatV.sub_nn K O _ _ e13_48
  have d13_49 := HeatV.sub_nn K O _ _ e13_49
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_32 := HeatV.sub_nn K O _ _ e14_32
  have d14_35 := HeatV.sub_nn K O _ _ e14_35
  have d14_36 := HeatV.sub_nn K O _ _ e14_36
  have d14_37 := HeatV.sub_nn K O _ _ e14_37
  have d14_38 := HeatV.sub_nn K O _ _ e14_38
  have d14_39 := HeatV.sub_nn K O _ _ e14_39
  have d14_40 := HeatV.sub_nn K O _ _ e14_40
  have d14_41 := HeatV.sub_nn K O _ _ e14_41
  have d14_42 := HeatV.sub_nn K O _ _ e14_42
  have d14_43 := HeatV.sub_nn K O _ _ e14_43
  have d14_44 := HeatV.sub_nn K O _ _ e14_44
  have d14_45 := HeatV.sub_nn K O _ _ e14_45
  have d14_46 := HeatV.sub_nn K O _ _ e14_46
  have d14_47 := HeatV.sub_nn K O _ _ e14_47
  have d14_48 := HeatV.sub_nn K O _ _ e14_48
  have d14_49 := HeatV.sub_nn K O _ _ e14_49
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_34 := HeatV.sub_nn K O _ _ e15_34
  have d15_35 := HeatV.sub_nn K O _ _ e15_35
  have d15_36 := HeatV.sub_nn K O _ _ e15_36
  have d15_37 := HeatV.sub_nn K O _ _ e15_37
  have d15_38 := HeatV.sub_nn K O _ _ e15_38
  have d15_39 := HeatV.sub_nn K O _ _ e15_39
  have d15_40 := HeatV.sub_nn K O _ _ e15_40
  have d15_41 := HeatV.sub_nn K O _ _ e15_41
  have d15_44 := HeatV.sub_nn K O _ _ e15_44
  have d15_45 := HeatV.sub_nn K O _ _ e15_45
  have d15_46 := HeatV.sub_nn K O _ _ e15_46
  have d15_47 := HeatV.sub_nn K O _ _ e15_47
  have d15_48 := HeatV.sub_nn K O _ _ e15_48
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d16_36 := HeatV.sub_nn K O _ _ e16_36
  have d16_37 := HeatV.sub_nn K O _ _ e16_37
  have d16_38 := HeatV.sub_nn K O _ _ e16_38
  have d16_39 := HeatV.sub_nn K O _ _ e16_39
  have d16_40 := HeatV.sub_nn K O _ _ e16_40
  have d16_41 := HeatV.sub_nn K O _ _ e16_41
  have d16_42 := HeatV.sub_nn K O _ _ e16_42
  have d16_43 := HeatV.sub_nn K O _ _ e16_43
  have d16_44 := HeatV.sub_nn K O _ _ e16_44
  have d16_45 := HeatV.sub_nn K O _ _ e16_45
  have d16_46 := HeatV.sub_nn K O _ _ e16_46
  have d16_47 := HeatV.sub_nn K O _ _ e16_47
  have d16_48 := HeatV.sub_nn K O _ _ e16_48
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d17_36 := HeatV.sub_nn K O _ _ e17_36
  have d17_37 := HeatV.sub_nn K O _ _ e17_37
  have d17_38 := HeatV.sub_nn K O _ _ e17_38
  have d17_39 := HeatV.sub_nn K O _ _ e17_39
  have d17_40 := HeatV.sub_nn K O _ _ e17_40
  have d17_41 := HeatV.sub_nn K O _ _ e17_41
  have d17_42 := HeatV.sub_nn K O _ _ e17_42
  have d17_43 := HeatV.sub_nn K O _ _ e17_43
  have d17_44 := HeatV.sub_nn K O _ _ e17_44
  have d17_45 := HeatV.sub_nn K O _ _ e17_45
  have d17_46 := HeatV.sub_nn K O _ _ e17_46
  have d17_47 := HeatV.sub_nn K O _ _ e17_47
  have d17_48 := HeatV.sub_nn K O _ _ e17_48
  have d17_49 := HeatV.sub_nn K O _ _ e17_49
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d18_34 := HeatV.sub_nn K O _ _ e18_34
  have d18_35 := HeatV.sub_nn K O _ _ e18_35
  have d18_36 := HeatV.sub_nn K O _ _ e18_36
  have d18_37 := HeatV.sub_nn K O _ _ e18_37
  have d18_38 := HeatV.sub_nn K O _ _ e18_38
  have d18_39 := HeatV.sub_nn K O _ _ e18_39
  have d18_40 := HeatV.sub_nn K O _ _ e18_40
  have d18_41 := HeatV.sub_nn K O _ _ e18_41
  have d18_42 := HeatV.sub_nn K O _ _ e18_42
  have d18_43 := HeatV.sub_nn K O _ _ e18_43
  have d18_44 := HeatV.sub_nn K O _ _ e18_44
  have d18_45 := HeatV.sub_nn K O _ _ e18_45
  have d18_46 := HeatV.sub_nn K O _ _ e18_46
  have d18_47 := HeatV.sub_nn K O _ _ e18_47
  have d18_48 := HeatV.sub_nn K O _ _ e18_48
  have d18_49 := HeatV.sub_nn K O _ _ e18_49
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d19_34 := HeatV.sub_nn K O _ _ e19_34
  have d19_35 := HeatV.sub_nn K O _ _ e19_35
  have d19_36 := HeatV.sub_nn K O _ _ e19_36
  have d19_37 := HeatV.sub_nn K O _ _ e19_37
  have d19_38 := HeatV.sub_nn K O _ _ e19_38
  have d19_39 := HeatV.sub_nn K O _ _ e19_39
  have d19_40 := HeatV.sub_nn K O _ _ e19_40
  have d19_41 := HeatV.sub_nn K O _ _ e19_41
  have d19_42 := HeatV.sub_nn K O _ _ e19_42
  have d19_43 := HeatV.sub_nn K O _ _ e19_43
  have d19_44 := HeatV.sub_nn K O _ _ e19_44
  have d19_45 := HeatV.sub_nn K O _ _ e19_45
  have d19_46 := HeatV.sub_nn K O _ _ e19_46
  have d19_47 := HeatV.sub_nn K O _ _ e19_47
  have d19_48 := HeatV.sub_nn K O _ _ e19_48
  have d19_49 := HeatV.sub_nn K O _ _ e19_49
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_34 := HeatV.sub_nn K O _ _ e20_34
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d20_36 := HeatV.sub_nn K O _ _ e20_36
  have d20_37 := HeatV.sub_nn K O _ _ e20_37
  have d20_38 := HeatV.sub_nn K O _ _ e20_38
  have d20_39 := HeatV.sub_nn K O _ _ e20_39
  have d20_40 := HeatV.sub_nn K O _ _ e20_40
  have d20_41 := HeatV.sub_nn K O _ _ e20_41
  have d20_42 := HeatV.sub_nn K O _ _ e20_42
  have d20_43 := HeatV.sub_nn K O _ _ e20_43
  have d20_44 := HeatV.sub_nn K O _ _ e20_44
  have d20_45 := HeatV.sub_nn K O _ _ e20_45
  have d20_46 := HeatV.sub_nn K O _ _ e20_46
  have d20_47 := HeatV.sub_nn K O _ _ e20_47
  have d20_48 := HeatV.sub_nn K O _ _ e20_48
  have d20_49 := HeatV.sub_nn K O _ _ e20_49
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d21_35 := HeatV.sub_nn K O _ _ e21_35
  have d21_36 := HeatV.sub_nn K O _ _ e21_36
  have d21_37 := HeatV.sub_nn K O _ _ e21_37
  have d21_38 := HeatV.sub_nn K O _ _ e21_38
  have d21_39 := HeatV.sub_nn K O _ _ e21_39
  have d21_40 := HeatV.sub_nn K O _ _ e21_40
  have d21_41 := HeatV.sub_nn K O _ _ e21_41
  have d21_42 := HeatV.sub_nn K O _ _ e21_42
  have d21_43 := HeatV.sub_nn K O _ _ e21_43
  have d21_44 := HeatV.sub_nn K O _ _ e21_44
  have d21_45 := HeatV.sub_nn K O _ _ e21_45
  have d21_46 := HeatV.sub_nn K O _ _ e21_46
  have d21_47 := HeatV.sub_nn K O _ _ e21_47
  have d21_48 := HeatV.sub_nn K O _ _ e21_48
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d22_36 := HeatV.sub_nn K O _ _ e22_36
  have d22_38 := HeatV.sub_nn K O _ _ e22_38
  have d22_40 := HeatV.sub_nn K O _ _ e22_40
  have d22_41 := HeatV.sub_nn K O _ _ e22_41
  have d22_43 := HeatV.sub_nn K O _ _ e22_43
  have d22_44 := HeatV.sub_nn K O _ _ e22_44
  have d22_45 := HeatV.sub_nn K O _ _ e22_45
  have d22_46 := HeatV.sub_nn K O _ _ e22_46
  have d22_47 := HeatV.sub_nn K O _ _ e22_47
  have d22_48 := HeatV.sub_nn K O _ _ e22_48
  have d22_49 := HeatV.sub_nn K O _ _ e22_49
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d23_36 := HeatV.sub_nn K O _ _ e23_36
  have d23_37 := HeatV.sub_nn K O _ _ e23_37
  have d23_38 := HeatV.sub_nn K O _ _ e23_38
  have d23_39 := HeatV.sub_nn K O _ _ e23_39
  have d23_40 := HeatV.sub_nn K O _ _ e23_40
  have d23_41 := HeatV.sub_nn K O _ _ e23_41
  have d23_42 := HeatV.sub_nn K O _ _ e23_42
  have d23_43 := HeatV.sub_nn K O _ _ e23_43
  have d23_44 := HeatV.sub_nn K O _ _ e23_44
  have d23_45 := HeatV.sub_nn K O _ _ e23_45
  have d23_46 := HeatV.sub_nn K O _ _ e23_46
  have d23_47 := HeatV.sub_nn K O _ _ e23_47
  have d23_48 := HeatV.sub_nn K O _ _ e23_48
  have d23_49 := HeatV.sub_nn K O _ _ e23_49
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d24_35 := HeatV.sub_nn K O _ _ e24_35
  have d24_36 := HeatV.sub_nn K O _ _ e24_36
  have d24_37 := HeatV.sub_nn K O _ _ e24_37
  have d24_38 := HeatV.sub_nn K O _ _ e24_38
  have d24_39 := HeatV.sub_nn K O _ _ e24_39
  have d24_40 := HeatV.sub_nn K O _ _ e24_40
  have d24_41 := HeatV.sub_nn K O _ _ e24_41
  have d24_42 := HeatV.sub_nn K O _ _ e24_42
  have d24_43 := HeatV.sub_nn K O _ _ e24_43
  have d24_44 := HeatV.sub_nn K O _ _ e24_44
  have d24_45 := HeatV.sub_nn K O _ _ e24_45
  have d24_46 := HeatV.sub_nn K O _ _ e24_46
  have d24_47 := HeatV.sub_nn K O _ _ e24_47
  have d24_48 := HeatV.sub_nn K O _ _ e24_48
  have d24_49 := HeatV.sub_nn K O _ _ e24_49
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d25_35 := HeatV.sub_nn K O _ _ e25_35
  have d25_36 := HeatV.sub_nn K O _ _ e25_36
  have d25_37 := HeatV.sub_nn K O _ _ e25_37
  have d25_38 := HeatV.sub_nn K O _ _ e25_38
  have d25_39 := HeatV.sub_nn K O _ _ e25_39
  have d25_40 := HeatV.sub_nn K O _ _ e25_40
  have d25_41 := HeatV.sub_nn K O _ _ e25_41
  have d25_42 := HeatV.sub_nn K O _ _ e25_42
  have d25_43 := HeatV.sub_nn K O _ _ e25_43
  have d25_44 := HeatV.sub_nn K O _ _ e25_44
  have d25_45 := HeatV.sub_nn K O _ _ e25_45
  have d25_46 := HeatV.sub_nn K O _ _ e25_46
  have d25_47 := HeatV.sub_nn K O _ _ e25_47
  have d25_48 := HeatV.sub_nn K O _ _ e25_48
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d26_36 := HeatV.sub_nn K O _ _ e26_36
  have d26_37 := HeatV.sub_nn K O _ _ e26_37
  have d26_38 := HeatV.sub_nn K O _ _ e26_38
  have d26_39 := HeatV.sub_nn K O _ _ e26_39
  have d26_40 := HeatV.sub_nn K O _ _ e26_40
  have d26_41 := HeatV.sub_nn K O _ _ e26_41
  have d26_42 := HeatV.sub_nn K O _ _ e26_42
  have d26_43 := HeatV.sub_nn K O _ _ e26_43
  have d26_44 := HeatV.sub_nn K O _ _ e26_44
  have d26_45 := HeatV.sub_nn K O _ _ e26_45
  have d26_46 := HeatV.sub_nn K O _ _ e26_46
  have d26_47 := HeatV.sub_nn K O _ _ e26_47
  have d26_48 := HeatV.sub_nn K O _ _ e26_48
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d27_35 := HeatV.sub_nn K O _ _ e27_35
  have d27_36 := HeatV.sub_nn K O _ _ e27_36
  have d27_37 := HeatV.sub_nn K O _ _ e27_37
  have d27_38 := HeatV.sub_nn K O _ _ e27_38
  have d27_39 := HeatV.sub_nn K O _ _ e27_39
  have d27_40 := HeatV.sub_nn K O _ _ e27_40
  have d27_41 := HeatV.sub_nn K O _ _ e27_41
  have d27_42 := HeatV.sub_nn K O _ _ e27_42
  have d27_43 := HeatV.sub_nn K O _ _ e27_43
  have d27_44 := HeatV.sub_nn K O _ _ e27_44
  have d27_45 := HeatV.sub_nn K O _ _ e27_45
  have d27_46 := HeatV.sub_nn K O _ _ e27_46
  have d27_47 := HeatV.sub_nn K O _ _ e27_47
  have d27_48 := HeatV.sub_nn K O _ _ e27_48
  have d27_49 := HeatV.sub_nn K O _ _ e27_49
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d28_35 := HeatV.sub_nn K O _ _ e28_35
  have d28_36 := HeatV.sub_nn K O _ _ e28_36
  have d28_37 := HeatV.sub_nn K O _ _ e28_37
  have d28_38 := HeatV.sub_nn K O _ _ e28_38
  have d28_39 := HeatV.sub_nn K O _ _ e28_39
  have d28_40 := HeatV.sub_nn K O _ _ e28_40
  have d28_41 := HeatV.sub_nn K O _ _ e28_41
  have d28_42 := HeatV.sub_nn K O _ _ e28_42
  have d28_43 := HeatV.sub_nn K O _ _ e28_43
  have d28_44 := HeatV.sub_nn K O _ _ e28_44
  have d28_45 := HeatV.sub_nn K O _ _ e28_45
  have d28_46 := HeatV.sub_nn K O _ _ e28_46
  have d28_47 := HeatV.sub_nn K O _ _ e28_47
  have d28_48 := HeatV.sub_nn K O _ _ e28_48
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d29_36 := HeatV.sub_nn K O _ _ e29_36
  have d29_37 := HeatV.sub_nn K O _ _ e29_37
  have d29_38 := HeatV.sub_nn K O _ _ e29_38
  have d29_39 := HeatV.sub_nn K O _ _ e29_39
  have d29_40 := HeatV.sub_nn K O _ _ e29_40
  have d29_42 := HeatV.sub_nn K O _ _ e29_42
  have d29_43 := HeatV.sub_nn K O _ _ e29_43
  have d29_44 := HeatV.sub_nn K O _ _ e29_44
  have d29_45 := HeatV.sub_nn K O _ _ e29_45
  have d29_46 := HeatV.sub_nn K O _ _ e29_46
  have d29_47 := HeatV.sub_nn K O _ _ e29_47
  have d29_48 := HeatV.sub_nn K O _ _ e29_48
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d30_35 := HeatV.sub_nn K O _ _ e30_35
  have d30_36 := HeatV.sub_nn K O _ _ e30_36
  have d30_37 := HeatV.sub_nn K O _ _ e30_37
  have d30_38 := HeatV.sub_nn K O _ _ e30_38
  have d30_39 := HeatV.sub_nn K O _ _ e30_39
  have d30_40 := HeatV.sub_nn K O _ _ e30_40
  have d30_41 := HeatV.sub_nn K O _ _ e30_41
  have d30_42 := HeatV.sub_nn K O _ _ e30_42
  have d30_43 := HeatV.sub_nn K O _ _ e30_43
  have d30_44 := HeatV.sub_nn K O _ _ e30_44
  have d30_45 := HeatV.sub_nn K O _ _ e30_45
  have d30_46 := HeatV.sub_nn K O _ _ e30_46
  have d30_47 := HeatV.sub_nn K O _ _ e30_47
  have d30_48 := HeatV.sub_nn K O _ _ e30_48
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d31_35 := HeatV.sub_nn K O _ _ e31_35
  have d31_36 := HeatV.sub_nn K O _ _ e31_36
  have d31_37 := HeatV.sub_nn K O _ _ e31_37
  have d31_38 := HeatV.sub_nn K O _ _ e31_38
  have d31_39 := HeatV.sub_nn K O _ _ e31_39
  have d31_40 := HeatV.sub_nn K O _ _ e31_40
  have d31_41 := HeatV.sub_nn K O _ _ e31_41
  have d31_42 := HeatV.sub_nn K O _ _ e31_42
  have d31_43 := HeatV.sub_nn K O _ _ e31_43
  have d31_44 := HeatV.sub_nn K O _ _ e31_44
  have d31_45 := HeatV.sub_nn K O _ _ e31_45
  have d31_46 := HeatV.sub_nn K O _ _ e31_46
  have d31_47 := HeatV.sub_nn K O _ _ e31_47
  have d31_48 := HeatV.sub_nn K O _ _ e31_48
  have d31_49 := HeatV.sub_nn K O _ _ e31_49
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d32_36 := HeatV.sub_nn K O _ _ e32_36
  have d32_37 := HeatV.sub_nn K O _ _ e32_37
  have d32_38 := HeatV.sub_nn K O _ _ e32_38
  have d32_39 := HeatV.sub_nn K O _ _ e32_39
  have d32_40 := HeatV.sub_nn K O _ _ e32_40
  have d32_41 := HeatV.sub_nn K O _ _ e32_41
  have d32_42 := HeatV.sub_nn K O _ _ e32_42
  have d32_43 := HeatV.sub_nn K O _ _ e32_43
  have d32_44 := HeatV.sub_nn K O _ _ e32_44
  have d32_45 := HeatV.sub_nn K O _ _ e32_45
  have d32_46 := HeatV.sub_nn K O _ _ e32_46
  have d32_47 := HeatV.sub_nn K O _ _ e32_47
  have d32_48 := HeatV.sub_nn K O _ _ e32_48
  have d32_49 := HeatV.sub_nn K O _ _ e32_49
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d33_36 := HeatV.sub_nn K O _ _ e33_36
  have d33_37 := HeatV.sub_nn K O _ _ e33_37
  have d33_38 := HeatV.sub_nn K O _ _ e33_38
  have d33_39 := HeatV.sub_nn K O _ _ e33_39
  have d33_40 := HeatV.sub_nn K O _ _ e33_40
  have d33_41 := HeatV.sub_nn K O _ _ e33_41
  have d33_42 := HeatV.sub_nn K O _ _ e33_42
  have d33_43 := HeatV.sub_nn K O _ _ e33_43
  have d33_44 := HeatV.sub_nn K O _ _ e33_44
  have d33_45 := HeatV.sub_nn K O _ _ e33_45
  have d33_46 := HeatV.sub_nn K O _ _ e33_46
  have d33_47 := HeatV.sub_nn K O _ _ e33_47
  have d33_48 := HeatV.sub_nn K O _ _ e33_48
  have d33_49 := HeatV.sub_nn K O _ _ e33_49
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have d34_36 := HeatV.sub_nn K O _ _ e34_36
  have d34_37 := HeatV.sub_nn K O _ _ e34_37
  have d34_38 := HeatV.sub_nn K O _ _ e34_38
  have d34_39 := HeatV.sub_nn K O _ _ e34_39
  have d34_40 := HeatV.sub_nn K O _ _ e34_40
  have d34_41 := HeatV.sub_nn K O _ _ e34_41
  have d34_42 := HeatV.sub_nn K O _ _ e34_42
  have d34_43 := HeatV.sub_nn K O _ _ e34_43
  have d34_44 := HeatV.sub_nn K O _ _ e34_44
  have d34_45 := HeatV.sub_nn K O _ _ e34_45
  have d34_46 := HeatV.sub_nn K O _ _ e34_46
  have d34_47 := HeatV.sub_nn K O _ _ e34_47
  have d34_48 := HeatV.sub_nn K O _ _ e34_48
  have d35_36 := HeatV.sub_nn K O _ _ e35_36
  have d35_37 := HeatV.sub_nn K O _ _ e35_37
  have d35_38 := HeatV.sub_nn K O _ _ e35_38
  have d35_39 := HeatV.sub_nn K O _ _ e35_39
  have d35_40 := HeatV.sub_nn K O _ _ e35_40
  have d35_41 := HeatV.sub_nn K O _ _ e35_41
  have d35_42 := HeatV.sub_nn K O _ _ e35_42
  have d35_43 := HeatV.sub_nn K O _ _ e35_43
  have d35_44 := HeatV.sub_nn K O _ _ e35_44
  have d35_45 := HeatV.sub_nn K O _ _ e35_45
  have d35_46 := HeatV.sub_nn K O _ _ e35_46
  have d35_47 := HeatV.sub_nn K O _ _ e35_47
  have d35_48 := HeatV.sub_nn K O _ _ e35_48
  have d35_49 := HeatV.sub_nn K O _ _ e35_49
  have d36_37 := HeatV.sub_nn K O _ _ e36_37
  have d36_38 := HeatV.sub_nn K O _ _ e36_38
  have d36_39 := HeatV.sub_nn K O _ _ e36_39
  have d36_40 := HeatV.sub_nn K O _ _ e36_40
  have d36_41 := HeatV.sub_nn K O _ _ e36_41
  have d36_42 := HeatV.sub_nn K O _ _ e36_42
  have d36_43 := HeatV.sub_nn K O _ _ e36_43
  have d36_44 := HeatV.sub_nn K O _ _ e36_44
  have d36_45 := HeatV.sub_nn K O _ _ e36_45
  have d36_46 := HeatV.sub_nn K O _ _ e36_46
  have d36_47 := HeatV.sub_nn K O _ _ e36_47
  have d36_48 := HeatV.sub_nn K O _ _ e36_48
  have d36_49 := HeatV.sub_nn K O _ _ e36_49
  have d37_38 := HeatV.sub_nn K O _ _ e37_38
  have d37_39 := HeatV.sub_nn K O _ _ e37_39
  have d37_40 := HeatV.sub_nn K O _ _ e37_40
  have d37_41 := HeatV.sub_nn K O _ _ e37_41
  have d37_42 := HeatV.sub_nn K O _ _ e37_42
  have d37_43 := HeatV.sub_nn K O _ _ e37_43
  have d37_44 := HeatV.sub_nn K O _ _ e37_44
  have d37_45 := HeatV.sub_nn K O _ _ e37_45
  have d37_46 := HeatV.sub_nn K O _ _ e37_46
  have d37_47 := HeatV.sub_nn K O _ _ e37_47
  have d37_48 := HeatV.sub_nn K O _ _ e37_48
  have d37_49 := HeatV.sub_nn K O _ _ e37_49
  have d38_39 := HeatV.sub_nn K O _ _ e38_39
  have d38_40 := HeatV.sub_nn K O _ _ e38_40
  have d38_41 := HeatV.sub_nn K O _ _ e38_41
  have d38_42 := HeatV.sub_nn K O _ _ e38_42
  have d38_43 := HeatV.sub_nn K O _ _ e38_43
  have d38_44 := HeatV.sub_nn K O _ _ e38_44
  have d38_45 := HeatV.sub_nn K O _ _ e38_45
  have d38_46 := HeatV.sub_nn K O _ _ e38_46
  have d38_47 := HeatV.sub_nn K O _ _ e38_47
  have d38_48 := HeatV.sub_nn K O _ _ e38_48
  have d39_40 := HeatV.sub_nn K O _ _ e39_40
  have d39_41 := HeatV.sub_nn K O _ _ e39_41
  have d39_42 := HeatV.sub_nn K O _ _ e39_42
  have d39_43 := HeatV.sub_nn K O _ _ e39_43
  have d39_44 := HeatV.sub_nn K O _ _ e39_44
  have d39_45 := HeatV.sub_nn K O _ _ e39_45
  have d39_46 := HeatV.sub_nn K O _ _ e39_46
  have d39_47 := HeatV.sub_nn K O _ _ e39_47
  have d39_48 := HeatV.sub_nn K O _ _ e39_48
  have d39_49 := HeatV.sub_nn K O _ _ e39_49
  have d40_41 := HeatV.sub_nn K O _ _ e40_41
  have d40_42 := HeatV.sub_nn K O _ _ e40_42
  have d40_43 := HeatV.sub_nn K O _ _ e40_43
  have d40_44 := HeatV.sub_nn K O _ _ e40_44
  have d40_45 := HeatV.sub_nn K O _ _ e40_45
  have d40_46 := HeatV.sub_nn K O _ _ e40_46
  have d40_47 := HeatV.sub_nn K O _ _ e40_47
  have d40_48 := HeatV.sub_nn K O _ _ e40_48
  have d40_49 := HeatV.sub_nn K O _ _ e40_49
  have d41_42 := HeatV.sub_nn K O _ _ e41_42
  have d41_43 := HeatV.sub_nn K O _ _ e41_43
  have d41_44 := HeatV.sub_nn K O _ _ e41_44
  have d41_45 := HeatV.sub_nn K O _ _ e41_45
  have d41_46 := HeatV.sub_nn K O _ _ e41_46
  have d41_47 := HeatV.sub_nn K O _ _ e41_47
  have d41_48 := HeatV.sub_nn K O _ _ e41_48
  have d42_43 := HeatV.sub_nn K O _ _ e42_43
  have d42_44 := HeatV.sub_nn K O _ _ e42_44
  have d42_45 := HeatV.sub_nn K O _ _ e42_45
  have d42_46 := HeatV.sub_nn K O _ _ e42_46
  have d42_47 := HeatV.sub_nn K O _ _ e42_47
  have d42_48 := HeatV.sub_nn K O _ _ e42_48
  have d42_49 := HeatV.sub_nn K O _ _ e42_49
  have d43_44 := HeatV.sub_nn K O _ _ e43_44
  have d43_45 := HeatV.sub_nn K O _ _ e43_45
  have d43_46 := HeatV.sub_nn K O _ _ e43_46
  have d43_47 := HeatV.sub_nn K O _ _ e43_47
  have d43_48 := HeatV.sub_nn K O _ _ e43_48
  have d43_49 := HeatV.sub_nn K O _ _ e43_49
  have d44_45 := HeatV.sub_nn K O _ _ e44_45
  have d44_46 := HeatV.sub_nn K O _ _ e44_46
  have d44_47 := HeatV.sub_nn K O _ _ e44_47
  have d44_48 := HeatV.sub_nn K O _ _ e44_48
  have d45_46 := HeatV.sub_nn K O _ _ e45_46
  have d45_47 := HeatV.sub_nn K O _ _ e45_47
  have d45_48 := HeatV.sub_nn K O _ _ e45_48
  have d45_49 := HeatV.sub_nn K O _ _ e45_49
  have d46_47 := HeatV.sub_nn K O _ _ e46_47
  have d46_48 := HeatV.sub_nn K O _ _ e46_48
  have d46_49 := HeatV.sub_nn K O _ _ e46_49
  have d47_48 := HeatV.sub_nn K O _ _ e47_48
  have d47_49 := HeatV.sub_nn K O _ _ e47_49
  have d48_49 := HeatV.sub_nn K O _ _ e48_49
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+212472 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 488410000) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (  -- (+5577 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..50, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 50 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 488410000) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (  -- (+6149 chars; full line in the Zenodo source)
      (K.mul (cN K 487846450) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K   -- (+6149 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (A 37) (A 38) (A 39) (A 40) (A 41) (A 42) (A 43) (A 44) (A 45) (A 46) (A 47) (A 48) (A 49) (A 50) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4  -- (+410 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 50 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 50 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 50 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 50 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 50 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 50 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 50 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+67313 chars; full line in the Zenodo source)

end G61Lv49

#print axioms G61Lv49.add_nn
#print axioms G61Lv49.level
#print axioms G61Lv49.level_fun

ym/G61Lv5.lean

lean_all/ym/G61Lv5.lean

/-
  ym/G61Lv5 — T45, G61a at level n = 5 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv5

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e1_2 : O.le (K.mul a1 a3) (K.mul a2 a2)) (e1_3 : O.le (K.mul a1 a4) (K.mul a2 a3)) (e1_4 : O.le (K.mul a1 a5) (K.mul a2 a4)) (e1_5 : O.le (K.mul a1 a6) (K.mul a2 a5)) (e2_3 : O.le (K.mu  -- (+235 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 3136) (K.mul (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 5) a4)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 4) a3))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 3) a2))) (K.mul (K.mul (cN K 4) a3) (K.mul (cN K 2) a1))) (K.mul (K.mul (cN K 5) a4) (K.mul (cN K 1) a0))) (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 7) a6)) (K.  -- (+292 chars; full line in the Zenodo source)
      (K.mul (cN K 2940) (K.mul (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 6) a5)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 5) a4))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 4) a3))) (K.mul (K.mul (cN K 4) a3) (K.mul (cN K 3) a2))) (K.mul (K.mul (cN K 5) a4) (K.mul (cN K 2) a1))) (K.mul (K.mul (cN K 6) a5) (K.mul (cN K 1) a0))) (K.add (K.add (K.add (K.add (K.add (K.mu  -- (+295 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (cN K 159936) (K.mul (K.mul a3 a4) (K.add (K.mul a1 a2) (K.neg (K.mul a0 a3))))) (K.mul (cN K 43904) (K.mul (K.mul a3 a3) (K.add (K.mul a1 a3) (K.neg (K.mul a0 a4)))))) (K.mul (cN K 15680) (K.mul (K.mul a0 a4) (K.add (K.mul a1 a5) (K.neg (K.mul a0 a6)))))) (K.mul (cN K 395136)   -- (+2325 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 3136) (K.mul (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 5) a4)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 4) a3))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 3) a2))) (K.mul (K.mul (cN K 4) a3) (K.mul (cN K 2) a1))) (K.mul (K.mul (cN K 5) a4) (K.mul (cN K 1) a0))) (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (  -- (+320 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..6, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 6 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 3136) (K.mul (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 5) (A 4))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 4) (A 3)))) (K.mul (K.mul (cN K 3) (A 2)) (K.mul (cN K 3) (A 2)))) (K.mul (K.mul (cN K 4) (A 3)) (K.mul (cN K 2) (A 1)))) (K.mul (K.mul (cN K 5) (A 4)) (K.mul (cN K 1) (A 0)))) (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1  -- (+364 chars; full line in the Zenodo source)
      (K.mul (cN K 2940) (K.mul (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 6) (A 5))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 5) (A 4)))) (K.mul (K.mul (cN K 3) (A 2)) (K.mul (cN K 4) (A 3)))) (K.mul (K.mul (cN K 4) (A 3)) (K.mul (cN K 3) (A 2)))) (K.mul (K.mul (cN K 5) (A 4)) (K.mul (cN K 2) (A 1)))) (K.mul (K.mul (cN K 6) (A 5)) (K.mul (cN K 1) (A 0)))) (K.a  -- (+364 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6)
    (G61Minor.minor K O A 6 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 6 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 6 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 6 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 6 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 6 hnn hne hlc 0 1 (by decide)) (G61Minor.minor K O A 6 hnn hne hlc 1 1 (by decide)) (G61Minor.minor K O A 6 h  -- (+398 chars; full line in the Zenodo source)

end G61Lv5

#print axioms G61Lv5.add_nn
#print axioms G61Lv5.level
#print axioms G61Lv5.level_fun

ym/G61Lv50.lean

lean_all/ym/G61Lv50.lean

/-
  ym/G61Lv50 — T45, G61a at level n = 50 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv50

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxHeartbeats 0 in
set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 a42 a43 a44 a45 a46 a47 a48 a49 a50 a51 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7  -- (+1070 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+59355 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 548777476) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN  -- (+5669 chars; full line in the Zenodo source)
      (K.mul (cN K 548168400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul  -- (+5672 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_29 := HeatV.sub_nn K O _ _ e0_29
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_34 := HeatV.sub_nn K O _ _ e0_34
  have d0_35 := HeatV.sub_nn K O _ _ e0_35
  have d0_36 := HeatV.sub_nn K O _ _ e0_36
  have d0_37 := HeatV.sub_nn K O _ _ e0_37
  have d0_38 := HeatV.sub_nn K O _ _ e0_38
  have d0_39 := HeatV.sub_nn K O _ _ e0_39
  have d0_40 := HeatV.sub_nn K O _ _ e0_40
  have d0_41 := HeatV.sub_nn K O _ _ e0_41
  have d0_42 := HeatV.sub_nn K O _ _ e0_42
  have d0_43 := HeatV.sub_nn K O _ _ e0_43
  have d0_44 := HeatV.sub_nn K O _ _ e0_44
  have d0_47 := HeatV.sub_nn K O _ _ e0_47
  have d0_50 := HeatV.sub_nn K O _ _ e0_50
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_29 := HeatV.sub_nn K O _ _ e1_29
  have d1_30 := HeatV.sub_nn K O _ _ e1_30
  have d1_31 := HeatV.sub_nn K O _ _ e1_31
  have d1_35 := HeatV.sub_nn K O _ _ e1_35
  have d1_36 := HeatV.sub_nn K O _ _ e1_36
  have d1_39 := HeatV.sub_nn K O _ _ e1_39
  have d1_40 := HeatV.sub_nn K O _ _ e1_40
  have d1_41 := HeatV.sub_nn K O _ _ e1_41
  have d1_43 := HeatV.sub_nn K O _ _ e1_43
  have d1_44 := HeatV.sub_nn K O _ _ e1_44
  have d1_45 := HeatV.sub_nn K O _ _ e1_45
  have d1_46 := HeatV.sub_nn K O _ _ e1_46
  have d1_47 := HeatV.sub_nn K O _ _ e1_47
  have d1_48 := HeatV.sub_nn K O _ _ e1_48
  have d1_49 := HeatV.sub_nn K O _ _ e1_49
  have d1_50 := HeatV.sub_nn K O _ _ e1_50
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_33 := HeatV.sub_nn K O _ _ e2_33
  have d2_34 := HeatV.sub_nn K O _ _ e2_34
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d2_36 := HeatV.sub_nn K O _ _ e2_36
  have d2_37 := HeatV.sub_nn K O _ _ e2_37
  have d2_38 := HeatV.sub_nn K O _ _ e2_38
  have d2_39 := HeatV.sub_nn K O _ _ e2_39
  have d2_40 := HeatV.sub_nn K O _ _ e2_40
  have d2_41 := HeatV.sub_nn K O _ _ e2_41
  have d2_43 := HeatV.sub_nn K O _ _ e2_43
  have d2_44 := HeatV.sub_nn K O _ _ e2_44
  have d2_46 := HeatV.sub_nn K O _ _ e2_46
  have d2_47 := HeatV.sub_nn K O _ _ e2_47
  have d2_48 := HeatV.sub_nn K O _ _ e2_48
  have d2_49 := HeatV.sub_nn K O _ _ e2_49
  have d2_50 := HeatV.sub_nn K O _ _ e2_50
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d3_35 := HeatV.sub_nn K O _ _ e3_35
  have d3_36 := HeatV.sub_nn K O _ _ e3_36
  have d3_39 := HeatV.sub_nn K O _ _ e3_39
  have d3_40 := HeatV.sub_nn K O _ _ e3_40
  have d3_41 := HeatV.sub_nn K O _ _ e3_41
  have d3_42 := HeatV.sub_nn K O _ _ e3_42
  have d3_43 := HeatV.sub_nn K O _ _ e3_43
  have d3_44 := HeatV.sub_nn K O _ _ e3_44
  have d3_47 := HeatV.sub_nn K O _ _ e3_47
  have d3_48 := HeatV.sub_nn K O _ _ e3_48
  have d3_50 := HeatV.sub_nn K O _ _ e3_50
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d4_34 := HeatV.sub_nn K O _ _ e4_34
  have d4_35 := HeatV.sub_nn K O _ _ e4_35
  have d4_36 := HeatV.sub_nn K O _ _ e4_36
  have d4_37 := HeatV.sub_nn K O _ _ e4_37
  have d4_38 := HeatV.sub_nn K O _ _ e4_38
  have d4_39 := HeatV.sub_nn K O _ _ e4_39
  have d4_40 := HeatV.sub_nn K O _ _ e4_40
  have d4_42 := HeatV.sub_nn K O _ _ e4_42
  have d4_43 := HeatV.sub_nn K O _ _ e4_43
  have d4_46 := HeatV.sub_nn K O _ _ e4_46
  have d4_47 := HeatV.sub_nn K O _ _ e4_47
  have d4_48 := HeatV.sub_nn K O _ _ e4_48
  have d4_49 := HeatV.sub_nn K O _ _ e4_49
  have d4_50 := HeatV.sub_nn K O _ _ e4_50
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d5_33 := HeatV.sub_nn K O _ _ e5_33
  have d5_34 := HeatV.sub_nn K O _ _ e5_34
  have d5_35 := HeatV.sub_nn K O _ _ e5_35
  have d5_36 := HeatV.sub_nn K O _ _ e5_36
  have d5_38 := HeatV.sub_nn K O _ _ e5_38
  have d5_40 := HeatV.sub_nn K O _ _ e5_40
  have d5_41 := HeatV.sub_nn K O _ _ e5_41
  have d5_42 := HeatV.sub_nn K O _ _ e5_42
  have d5_43 := HeatV.sub_nn K O _ _ e5_43
  have d5_45 := HeatV.sub_nn K O _ _ e5_45
  have d5_46 := HeatV.sub_nn K O _ _ e5_46
  have d5_47 := HeatV.sub_nn K O _ _ e5_47
  have d5_48 := HeatV.sub_nn K O _ _ e5_48
  have d5_49 := HeatV.sub_nn K O _ _ e5_49
  have d5_50 := HeatV.sub_nn K O _ _ e5_50
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d6_35 := HeatV.sub_nn K O _ _ e6_35
  have d6_36 := HeatV.sub_nn K O _ _ e6_36
  have d6_38 := HeatV.sub_nn K O _ _ e6_38
  have d6_40 := HeatV.sub_nn K O _ _ e6_40
  have d6_41 := HeatV.sub_nn K O _ _ e6_41
  have d6_42 := HeatV.sub_nn K O _ _ e6_42
  have d6_44 := HeatV.sub_nn K O _ _ e6_44
  have d6_45 := HeatV.sub_nn K O _ _ e6_45
  have d6_46 := HeatV.sub_nn K O _ _ e6_46
  have d6_47 := HeatV.sub_nn K O _ _ e6_47
  have d6_48 := HeatV.sub_nn K O _ _ e6_48
  have d6_49 := HeatV.sub_nn K O _ _ e6_49
  have d6_50 := HeatV.sub_nn K O _ _ e6_50
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d7_33 := HeatV.sub_nn K O _ _ e7_33
  have d7_34 := HeatV.sub_nn K O _ _ e7_34
  have d7_35 := HeatV.sub_nn K O _ _ e7_35
  have d7_36 := HeatV.sub_nn K O _ _ e7_36
  have d7_37 := HeatV.sub_nn K O _ _ e7_37
  have d7_38 := HeatV.sub_nn K O _ _ e7_38
  have d7_39 := HeatV.sub_nn K O _ _ e7_39
  have d7_40 := HeatV.sub_nn K O _ _ e7_40
  have d7_41 := HeatV.sub_nn K O _ _ e7_41
  have d7_43 := HeatV.sub_nn K O _ _ e7_43
  have d7_44 := HeatV.sub_nn K O _ _ e7_44
  have d7_45 := HeatV.sub_nn K O _ _ e7_45
  have d7_46 := HeatV.sub_nn K O _ _ e7_46
  have d7_47 := HeatV.sub_nn K O _ _ e7_47
  have d7_49 := HeatV.sub_nn K O _ _ e7_49
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_32 := HeatV.sub_nn K O _ _ e8_32
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_34 := HeatV.sub_nn K O _ _ e8_34
  have d8_35 := HeatV.sub_nn K O _ _ e8_35
  have d8_36 := HeatV.sub_nn K O _ _ e8_36
  have d8_37 := HeatV.sub_nn K O _ _ e8_37
  have d8_38 := HeatV.sub_nn K O _ _ e8_38
  have d8_40 := HeatV.sub_nn K O _ _ e8_40
  have d8_41 := HeatV.sub_nn K O _ _ e8_41
  have d8_42 := HeatV.sub_nn K O _ _ e8_42
  have d8_43 := HeatV.sub_nn K O _ _ e8_43
  have d8_44 := HeatV.sub_nn K O _ _ e8_44
  have d8_45 := HeatV.sub_nn K O _ _ e8_45
  have d8_46 := HeatV.sub_nn K O _ _ e8_46
  have d8_47 := HeatV.sub_nn K O _ _ e8_47
  have d8_48 := HeatV.sub_nn K O _ _ e8_48
  have d8_49 := HeatV.sub_nn K O _ _ e8_49
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d9_34 := HeatV.sub_nn K O _ _ e9_34
  have d9_35 := HeatV.sub_nn K O _ _ e9_35
  have d9_36 := HeatV.sub_nn K O _ _ e9_36
  have d9_39 := HeatV.sub_nn K O _ _ e9_39
  have d9_41 := HeatV.sub_nn K O _ _ e9_41
  have d9_42 := HeatV.sub_nn K O _ _ e9_42
  have d9_43 := HeatV.sub_nn K O _ _ e9_43
  have d9_44 := HeatV.sub_nn K O _ _ e9_44
  have d9_45 := HeatV.sub_nn K O _ _ e9_45
  have d9_46 := HeatV.sub_nn K O _ _ e9_46
  have d9_47 := HeatV.sub_nn K O _ _ e9_47
  have d9_48 := HeatV.sub_nn K O _ _ e9_48
  have d9_49 := HeatV.sub_nn K O _ _ e9_49
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_34 := HeatV.sub_nn K O _ _ e10_34
  have d10_35 := HeatV.sub_nn K O _ _ e10_35
  have d10_36 := HeatV.sub_nn K O _ _ e10_36
  have d10_37 := HeatV.sub_nn K O _ _ e10_37
  have d10_40 := HeatV.sub_nn K O _ _ e10_40
  have d10_41 := HeatV.sub_nn K O _ _ e10_41
  have d10_42 := HeatV.sub_nn K O _ _ e10_42
  have d10_45 := HeatV.sub_nn K O _ _ e10_45
  have d10_46 := HeatV.sub_nn K O _ _ e10_46
  have d10_47 := HeatV.sub_nn K O _ _ e10_47
  have d10_48 := HeatV.sub_nn K O _ _ e10_48
  have d10_49 := HeatV.sub_nn K O _ _ e10_49
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d11_33 := HeatV.sub_nn K O _ _ e11_33
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d11_35 := HeatV.sub_nn K O _ _ e11_35
  have d11_36 := HeatV.sub_nn K O _ _ e11_36
  have d11_37 := HeatV.sub_nn K O _ _ e11_37
  have d11_39 := HeatV.sub_nn K O _ _ e11_39
  have d11_40 := HeatV.sub_nn K O _ _ e11_40
  have d11_41 := HeatV.sub_nn K O _ _ e11_41
  have d11_42 := HeatV.sub_nn K O _ _ e11_42
  have d11_43 := HeatV.sub_nn K O _ _ e11_43
  have d11_44 := HeatV.sub_nn K O _ _ e11_44
  have d11_45 := HeatV.sub_nn K O _ _ e11_45
  have d11_46 := HeatV.sub_nn K O _ _ e11_46
  have d11_47 := HeatV.sub_nn K O _ _ e11_47
  have d11_49 := HeatV.sub_nn K O _ _ e11_49
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d12_34 := HeatV.sub_nn K O _ _ e12_34
  have d12_35 := HeatV.sub_nn K O _ _ e12_35
  have d12_36 := HeatV.sub_nn K O _ _ e12_36
  have d12_38 := HeatV.sub_nn K O _ _ e12_38
  have d12_39 := HeatV.sub_nn K O _ _ e12_39
  have d12_40 := HeatV.sub_nn K O _ _ e12_40
  have d12_41 := HeatV.sub_nn K O _ _ e12_41
  have d12_42 := HeatV.sub_nn K O _ _ e12_42
  have d12_43 := HeatV.sub_nn K O _ _ e12_43
  have d12_44 := HeatV.sub_nn K O _ _ e12_44
  have d12_45 := HeatV.sub_nn K O _ _ e12_45
  have d12_47 := HeatV.sub_nn K O _ _ e12_47
  have d12_49 := HeatV.sub_nn K O _ _ e12_49
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_35 := HeatV.sub_nn K O _ _ e13_35
  have d13_36 := HeatV.sub_nn K O _ _ e13_36
  have d13_37 := HeatV.sub_nn K O _ _ e13_37
  have d13_38 := HeatV.sub_nn K O _ _ e13_38
  have d13_39 := HeatV.sub_nn K O _ _ e13_39
  have d13_40 := HeatV.sub_nn K O _ _ e13_40
  have d13_41 := HeatV.sub_nn K O _ _ e13_41
  have d13_42 := HeatV.sub_nn K O _ _ e13_42
  have d13_43 := HeatV.sub_nn K O _ _ e13_43
  have d13_44 := HeatV.sub_nn K O _ _ e13_44
  have d13_45 := HeatV.sub_nn K O _ _ e13_45
  have d13_46 := HeatV.sub_nn K O _ _ e13_46
  have d13_47 := HeatV.sub_nn K O _ _ e13_47
  have d13_48 := HeatV.sub_nn K O _ _ e13_48
  have d13_49 := HeatV.sub_nn K O _ _ e13_49
  have d13_50 := HeatV.sub_nn K O _ _ e13_50
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d14_32 := HeatV.sub_nn K O _ _ e14_32
  have d14_33 := HeatV.sub_nn K O _ _ e14_33
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d14_35 := HeatV.sub_nn K O _ _ e14_35
  have d14_36 := HeatV.sub_nn K O _ _ e14_36
  have d14_37 := HeatV.sub_nn K O _ _ e14_37
  have d14_38 := HeatV.sub_nn K O _ _ e14_38
  have d14_39 := HeatV.sub_nn K O _ _ e14_39
  have d14_40 := HeatV.sub_nn K O _ _ e14_40
  have d14_41 := HeatV.sub_nn K O _ _ e14_41
  have d14_42 := HeatV.sub_nn K O _ _ e14_42
  have d14_43 := HeatV.sub_nn K O _ _ e14_43
  have d14_44 := HeatV.sub_nn K O _ _ e14_44
  have d14_45 := HeatV.sub_nn K O _ _ e14_45
  have d14_46 := HeatV.sub_nn K O _ _ e14_46
  have d14_47 := HeatV.sub_nn K O _ _ e14_47
  have d14_48 := HeatV.sub_nn K O _ _ e14_48
  have d14_49 := HeatV.sub_nn K O _ _ e14_49
  have d14_50 := HeatV.sub_nn K O _ _ e14_50
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_35 := HeatV.sub_nn K O _ _ e15_35
  have d15_36 := HeatV.sub_nn K O _ _ e15_36
  have d15_37 := HeatV.sub_nn K O _ _ e15_37
  have d15_38 := HeatV.sub_nn K O _ _ e15_38
  have d15_39 := HeatV.sub_nn K O _ _ e15_39
  have d15_40 := HeatV.sub_nn K O _ _ e15_40
  have d15_41 := HeatV.sub_nn K O _ _ e15_41
  have d15_42 := HeatV.sub_nn K O _ _ e15_42
  have d15_44 := HeatV.sub_nn K O _ _ e15_44
  have d15_45 := HeatV.sub_nn K O _ _ e15_45
  have d15_46 := HeatV.sub_nn K O _ _ e15_46
  have d15_47 := HeatV.sub_nn K O _ _ e15_47
  have d15_49 := HeatV.sub_nn K O _ _ e15_49
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d16_37 := HeatV.sub_nn K O _ _ e16_37
  have d16_38 := HeatV.sub_nn K O _ _ e16_38
  have d16_39 := HeatV.sub_nn K O _ _ e16_39
  have d16_40 := HeatV.sub_nn K O _ _ e16_40
  have d16_41 := HeatV.sub_nn K O _ _ e16_41
  have d16_42 := HeatV.sub_nn K O _ _ e16_42
  have d16_43 := HeatV.sub_nn K O _ _ e16_43
  have d16_44 := HeatV.sub_nn K O _ _ e16_44
  have d16_45 := HeatV.sub_nn K O _ _ e16_45
  have d16_46 := HeatV.sub_nn K O _ _ e16_46
  have d16_47 := HeatV.sub_nn K O _ _ e16_47
  have d16_49 := HeatV.sub_nn K O _ _ e16_49
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_34 := HeatV.sub_nn K O _ _ e17_34
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d17_36 := HeatV.sub_nn K O _ _ e17_36
  have d17_37 := HeatV.sub_nn K O _ _ e17_37
  have d17_38 := HeatV.sub_nn K O _ _ e17_38
  have d17_39 := HeatV.sub_nn K O _ _ e17_39
  have d17_40 := HeatV.sub_nn K O _ _ e17_40
  have d17_41 := HeatV.sub_nn K O _ _ e17_41
  have d17_42 := HeatV.sub_nn K O _ _ e17_42
  have d17_43 := HeatV.sub_nn K O _ _ e17_43
  have d17_44 := HeatV.sub_nn K O _ _ e17_44
  have d17_45 := HeatV.sub_nn K O _ _ e17_45
  have d17_46 := HeatV.sub_nn K O _ _ e17_46
  have d17_47 := HeatV.sub_nn K O _ _ e17_47
  have d17_48 := HeatV.sub_nn K O _ _ e17_48
  have d17_49 := HeatV.sub_nn K O _ _ e17_49
  have d17_50 := HeatV.sub_nn K O _ _ e17_50
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d18_34 := HeatV.sub_nn K O _ _ e18_34
  have d18_35 := HeatV.sub_nn K O _ _ e18_35
  have d18_36 := HeatV.sub_nn K O _ _ e18_36
  have d18_37 := HeatV.sub_nn K O _ _ e18_37
  have d18_38 := HeatV.sub_nn K O _ _ e18_38
  have d18_39 := HeatV.sub_nn K O _ _ e18_39
  have d18_40 := HeatV.sub_nn K O _ _ e18_40
  have d18_41 := HeatV.sub_nn K O _ _ e18_41
  have d18_42 := HeatV.sub_nn K O _ _ e18_42
  have d18_43 := HeatV.sub_nn K O _ _ e18_43
  have d18_44 := HeatV.sub_nn K O _ _ e18_44
  have d18_45 := HeatV.sub_nn K O _ _ e18_45
  have d18_46 := HeatV.sub_nn K O _ _ e18_46
  have d18_47 := HeatV.sub_nn K O _ _ e18_47
  have d18_48 := HeatV.sub_nn K O _ _ e18_48
  have d18_49 := HeatV.sub_nn K O _ _ e18_49
  have d18_50 := HeatV.sub_nn K O _ _ e18_50
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d19_34 := HeatV.sub_nn K O _ _ e19_34
  have d19_35 := HeatV.sub_nn K O _ _ e19_35
  have d19_36 := HeatV.sub_nn K O _ _ e19_36
  have d19_37 := HeatV.sub_nn K O _ _ e19_37
  have d19_38 := HeatV.sub_nn K O _ _ e19_38
  have d19_39 := HeatV.sub_nn K O _ _ e19_39
  have d19_40 := HeatV.sub_nn K O _ _ e19_40
  have d19_41 := HeatV.sub_nn K O _ _ e19_41
  have d19_42 := HeatV.sub_nn K O _ _ e19_42
  have d19_43 := HeatV.sub_nn K O _ _ e19_43
  have d19_44 := HeatV.sub_nn K O _ _ e19_44
  have d19_45 := HeatV.sub_nn K O _ _ e19_45
  have d19_46 := HeatV.sub_nn K O _ _ e19_46
  have d19_47 := HeatV.sub_nn K O _ _ e19_47
  have d19_48 := HeatV.sub_nn K O _ _ e19_48
  have d19_49 := HeatV.sub_nn K O _ _ e19_49
  have d19_50 := HeatV.sub_nn K O _ _ e19_50
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d20_36 := HeatV.sub_nn K O _ _ e20_36
  have d20_37 := HeatV.sub_nn K O _ _ e20_37
  have d20_38 := HeatV.sub_nn K O _ _ e20_38
  have d20_39 := HeatV.sub_nn K O _ _ e20_39
  have d20_40 := HeatV.sub_nn K O _ _ e20_40
  have d20_41 := HeatV.sub_nn K O _ _ e20_41
  have d20_42 := HeatV.sub_nn K O _ _ e20_42
  have d20_43 := HeatV.sub_nn K O _ _ e20_43
  have d20_44 := HeatV.sub_nn K O _ _ e20_44
  have d20_45 := HeatV.sub_nn K O _ _ e20_45
  have d20_46 := HeatV.sub_nn K O _ _ e20_46
  have d20_47 := HeatV.sub_nn K O _ _ e20_47
  have d20_48 := HeatV.sub_nn K O _ _ e20_48
  have d20_49 := HeatV.sub_nn K O _ _ e20_49
  have d20_50 := HeatV.sub_nn K O _ _ e20_50
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d21_35 := HeatV.sub_nn K O _ _ e21_35
  have d21_36 := HeatV.sub_nn K O _ _ e21_36
  have d21_37 := HeatV.sub_nn K O _ _ e21_37
  have d21_38 := HeatV.sub_nn K O _ _ e21_38
  have d21_39 := HeatV.sub_nn K O _ _ e21_39
  have d21_40 := HeatV.sub_nn K O _ _ e21_40
  have d21_41 := HeatV.sub_nn K O _ _ e21_41
  have d21_42 := HeatV.sub_nn K O _ _ e21_42
  have d21_43 := HeatV.sub_nn K O _ _ e21_43
  have d21_44 := HeatV.sub_nn K O _ _ e21_44
  have d21_45 := HeatV.sub_nn K O _ _ e21_45
  have d21_46 := HeatV.sub_nn K O _ _ e21_46
  have d21_47 := HeatV.sub_nn K O _ _ e21_47
  have d21_48 := HeatV.sub_nn K O _ _ e21_48
  have d21_49 := HeatV.sub_nn K O _ _ e21_49
  have d21_50 := HeatV.sub_nn K O _ _ e21_50
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_30 := HeatV.sub_nn K O _ _ e22_30
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d22_36 := HeatV.sub_nn K O _ _ e22_36
  have d22_37 := HeatV.sub_nn K O _ _ e22_37
  have d22_38 := HeatV.sub_nn K O _ _ e22_38
  have d22_39 := HeatV.sub_nn K O _ _ e22_39
  have d22_40 := HeatV.sub_nn K O _ _ e22_40
  have d22_41 := HeatV.sub_nn K O _ _ e22_41
  have d22_42 := HeatV.sub_nn K O _ _ e22_42
  have d22_43 := HeatV.sub_nn K O _ _ e22_43
  have d22_44 := HeatV.sub_nn K O _ _ e22_44
  have d22_45 := HeatV.sub_nn K O _ _ e22_45
  have d22_46 := HeatV.sub_nn K O _ _ e22_46
  have d22_47 := HeatV.sub_nn K O _ _ e22_47
  have d22_48 := HeatV.sub_nn K O _ _ e22_48
  have d22_49 := HeatV.sub_nn K O _ _ e22_49
  have d22_50 := HeatV.sub_nn K O _ _ e22_50
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d23_36 := HeatV.sub_nn K O _ _ e23_36
  have d23_37 := HeatV.sub_nn K O _ _ e23_37
  have d23_39 := HeatV.sub_nn K O _ _ e23_39
  have d23_40 := HeatV.sub_nn K O _ _ e23_40
  have d23_41 := HeatV.sub_nn K O _ _ e23_41
  have d23_42 := HeatV.sub_nn K O _ _ e23_42
  have d23_44 := HeatV.sub_nn K O _ _ e23_44
  have d23_45 := HeatV.sub_nn K O _ _ e23_45
  have d23_46 := HeatV.sub_nn K O _ _ e23_46
  have d23_48 := HeatV.sub_nn K O _ _ e23_48
  have d23_49 := HeatV.sub_nn K O _ _ e23_49
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d24_35 := HeatV.sub_nn K O _ _ e24_35
  have d24_36 := HeatV.sub_nn K O _ _ e24_36
  have d24_37 := HeatV.sub_nn K O _ _ e24_37
  have d24_38 := HeatV.sub_nn K O _ _ e24_38
  have d24_39 := HeatV.sub_nn K O _ _ e24_39
  have d24_40 := HeatV.sub_nn K O _ _ e24_40
  have d24_41 := HeatV.sub_nn K O _ _ e24_41
  have d24_42 := HeatV.sub_nn K O _ _ e24_42
  have d24_43 := HeatV.sub_nn K O _ _ e24_43
  have d24_44 := HeatV.sub_nn K O _ _ e24_44
  have d24_45 := HeatV.sub_nn K O _ _ e24_45
  have d24_46 := HeatV.sub_nn K O _ _ e24_46
  have d24_47 := HeatV.sub_nn K O _ _ e24_47
  have d24_48 := HeatV.sub_nn K O _ _ e24_48
  have d24_49 := HeatV.sub_nn K O _ _ e24_49
  have d24_50 := HeatV.sub_nn K O _ _ e24_50
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d25_35 := HeatV.sub_nn K O _ _ e25_35
  have d25_36 := HeatV.sub_nn K O _ _ e25_36
  have d25_37 := HeatV.sub_nn K O _ _ e25_37
  have d25_38 := HeatV.sub_nn K O _ _ e25_38
  have d25_39 := HeatV.sub_nn K O _ _ e25_39
  have d25_40 := HeatV.sub_nn K O _ _ e25_40
  have d25_41 := HeatV.sub_nn K O _ _ e25_41
  have d25_42 := HeatV.sub_nn K O _ _ e25_42
  have d25_43 := HeatV.sub_nn K O _ _ e25_43
  have d25_44 := HeatV.sub_nn K O _ _ e25_44
  have d25_45 := HeatV.sub_nn K O _ _ e25_45
  have d25_46 := HeatV.sub_nn K O _ _ e25_46
  have d25_47 := HeatV.sub_nn K O _ _ e25_47
  have d25_48 := HeatV.sub_nn K O _ _ e25_48
  have d25_49 := HeatV.sub_nn K O _ _ e25_49
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d26_36 := HeatV.sub_nn K O _ _ e26_36
  have d26_37 := HeatV.sub_nn K O _ _ e26_37
  have d26_38 := HeatV.sub_nn K O _ _ e26_38
  have d26_39 := HeatV.sub_nn K O _ _ e26_39
  have d26_40 := HeatV.sub_nn K O _ _ e26_40
  have d26_41 := HeatV.sub_nn K O _ _ e26_41
  have d26_42 := HeatV.sub_nn K O _ _ e26_42
  have d26_43 := HeatV.sub_nn K O _ _ e26_43
  have d26_44 := HeatV.sub_nn K O _ _ e26_44
  have d26_45 := HeatV.sub_nn K O _ _ e26_45
  have d26_46 := HeatV.sub_nn K O _ _ e26_46
  have d26_47 := HeatV.sub_nn K O _ _ e26_47
  have d26_48 := HeatV.sub_nn K O _ _ e26_48
  have d26_49 := HeatV.sub_nn K O _ _ e26_49
  have d26_50 := HeatV.sub_nn K O _ _ e26_50
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d27_35 := HeatV.sub_nn K O _ _ e27_35
  have d27_36 := HeatV.sub_nn K O _ _ e27_36
  have d27_38 := HeatV.sub_nn K O _ _ e27_38
  have d27_39 := HeatV.sub_nn K O _ _ e27_39
  have d27_40 := HeatV.sub_nn K O _ _ e27_40
  have d27_41 := HeatV.sub_nn K O _ _ e27_41
  have d27_43 := HeatV.sub_nn K O _ _ e27_43
  have d27_44 := HeatV.sub_nn K O _ _ e27_44
  have d27_45 := HeatV.sub_nn K O _ _ e27_45
  have d27_46 := HeatV.sub_nn K O _ _ e27_46
  have d27_47 := HeatV.sub_nn K O _ _ e27_47
  have d27_48 := HeatV.sub_nn K O _ _ e27_48
  have d27_49 := HeatV.sub_nn K O _ _ e27_49
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d28_35 := HeatV.sub_nn K O _ _ e28_35
  have d28_36 := HeatV.sub_nn K O _ _ e28_36
  have d28_37 := HeatV.sub_nn K O _ _ e28_37
  have d28_38 := HeatV.sub_nn K O _ _ e28_38
  have d28_39 := HeatV.sub_nn K O _ _ e28_39
  have d28_40 := HeatV.sub_nn K O _ _ e28_40
  have d28_41 := HeatV.sub_nn K O _ _ e28_41
  have d28_42 := HeatV.sub_nn K O _ _ e28_42
  have d28_43 := HeatV.sub_nn K O _ _ e28_43
  have d28_44 := HeatV.sub_nn K O _ _ e28_44
  have d28_45 := HeatV.sub_nn K O _ _ e28_45
  have d28_46 := HeatV.sub_nn K O _ _ e28_46
  have d28_47 := HeatV.sub_nn K O _ _ e28_47
  have d28_48 := HeatV.sub_nn K O _ _ e28_48
  have d28_49 := HeatV.sub_nn K O _ _ e28_49
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d29_36 := HeatV.sub_nn K O _ _ e29_36
  have d29_37 := HeatV.sub_nn K O _ _ e29_37
  have d29_38 := HeatV.sub_nn K O _ _ e29_38
  have d29_39 := HeatV.sub_nn K O _ _ e29_39
  have d29_40 := HeatV.sub_nn K O _ _ e29_40
  have d29_41 := HeatV.sub_nn K O _ _ e29_41
  have d29_42 := HeatV.sub_nn K O _ _ e29_42
  have d29_43 := HeatV.sub_nn K O _ _ e29_43
  have d29_44 := HeatV.sub_nn K O _ _ e29_44
  have d29_45 := HeatV.sub_nn K O _ _ e29_45
  have d29_46 := HeatV.sub_nn K O _ _ e29_46
  have d29_47 := HeatV.sub_nn K O _ _ e29_47
  have d29_48 := HeatV.sub_nn K O _ _ e29_48
  have d29_49 := HeatV.sub_nn K O _ _ e29_49
  have d29_50 := HeatV.sub_nn K O _ _ e29_50
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d30_35 := HeatV.sub_nn K O _ _ e30_35
  have d30_36 := HeatV.sub_nn K O _ _ e30_36
  have d30_37 := HeatV.sub_nn K O _ _ e30_37
  have d30_38 := HeatV.sub_nn K O _ _ e30_38
  have d30_39 := HeatV.sub_nn K O _ _ e30_39
  have d30_40 := HeatV.sub_nn K O _ _ e30_40
  have d30_41 := HeatV.sub_nn K O _ _ e30_41
  have d30_42 := HeatV.sub_nn K O _ _ e30_42
  have d30_43 := HeatV.sub_nn K O _ _ e30_43
  have d30_44 := HeatV.sub_nn K O _ _ e30_44
  have d30_45 := HeatV.sub_nn K O _ _ e30_45
  have d30_46 := HeatV.sub_nn K O _ _ e30_46
  have d30_47 := HeatV.sub_nn K O _ _ e30_47
  have d30_48 := HeatV.sub_nn K O _ _ e30_48
  have d30_49 := HeatV.sub_nn K O _ _ e30_49
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d31_35 := HeatV.sub_nn K O _ _ e31_35
  have d31_36 := HeatV.sub_nn K O _ _ e31_36
  have d31_37 := HeatV.sub_nn K O _ _ e31_37
  have d31_38 := HeatV.sub_nn K O _ _ e31_38
  have d31_39 := HeatV.sub_nn K O _ _ e31_39
  have d31_40 := HeatV.sub_nn K O _ _ e31_40
  have d31_41 := HeatV.sub_nn K O _ _ e31_41
  have d31_42 := HeatV.sub_nn K O _ _ e31_42
  have d31_43 := HeatV.sub_nn K O _ _ e31_43
  have d31_44 := HeatV.sub_nn K O _ _ e31_44
  have d31_45 := HeatV.sub_nn K O _ _ e31_45
  have d31_46 := HeatV.sub_nn K O _ _ e31_46
  have d31_47 := HeatV.sub_nn K O _ _ e31_47
  have d31_48 := HeatV.sub_nn K O _ _ e31_48
  have d31_49 := HeatV.sub_nn K O _ _ e31_49
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d32_36 := HeatV.sub_nn K O _ _ e32_36
  have d32_37 := HeatV.sub_nn K O _ _ e32_37
  have d32_38 := HeatV.sub_nn K O _ _ e32_38
  have d32_39 := HeatV.sub_nn K O _ _ e32_39
  have d32_40 := HeatV.sub_nn K O _ _ e32_40
  have d32_41 := HeatV.sub_nn K O _ _ e32_41
  have d32_42 := HeatV.sub_nn K O _ _ e32_42
  have d32_43 := HeatV.sub_nn K O _ _ e32_43
  have d32_44 := HeatV.sub_nn K O _ _ e32_44
  have d32_45 := HeatV.sub_nn K O _ _ e32_45
  have d32_46 := HeatV.sub_nn K O _ _ e32_46
  have d32_47 := HeatV.sub_nn K O _ _ e32_47
  have d32_48 := HeatV.sub_nn K O _ _ e32_48
  have d32_49 := HeatV.sub_nn K O _ _ e32_49
  have d32_50 := HeatV.sub_nn K O _ _ e32_50
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d33_36 := HeatV.sub_nn K O _ _ e33_36
  have d33_37 := HeatV.sub_nn K O _ _ e33_37
  have d33_38 := HeatV.sub_nn K O _ _ e33_38
  have d33_39 := HeatV.sub_nn K O _ _ e33_39
  have d33_40 := HeatV.sub_nn K O _ _ e33_40
  have d33_41 := HeatV.sub_nn K O _ _ e33_41
  have d33_42 := HeatV.sub_nn K O _ _ e33_42
  have d33_43 := HeatV.sub_nn K O _ _ e33_43
  have d33_44 := HeatV.sub_nn K O _ _ e33_44
  have d33_45 := HeatV.sub_nn K O _ _ e33_45
  have d33_46 := HeatV.sub_nn K O _ _ e33_46
  have d33_47 := HeatV.sub_nn K O _ _ e33_47
  have d33_48 := HeatV.sub_nn K O _ _ e33_48
  have d33_49 := HeatV.sub_nn K O _ _ e33_49
  have d33_50 := HeatV.sub_nn K O _ _ e33_50
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have d34_36 := HeatV.sub_nn K O _ _ e34_36
  have d34_37 := HeatV.sub_nn K O _ _ e34_37
  have d34_38 := HeatV.sub_nn K O _ _ e34_38
  have d34_39 := HeatV.sub_nn K O _ _ e34_39
  have d34_40 := HeatV.sub_nn K O _ _ e34_40
  have d34_41 := HeatV.sub_nn K O _ _ e34_41
  have d34_42 := HeatV.sub_nn K O _ _ e34_42
  have d34_43 := HeatV.sub_nn K O _ _ e34_43
  have d34_44 := HeatV.sub_nn K O _ _ e34_44
  have d34_45 := HeatV.sub_nn K O _ _ e34_45
  have d34_46 := HeatV.sub_nn K O _ _ e34_46
  have d34_47 := HeatV.sub_nn K O _ _ e34_47
  have d34_48 := HeatV.sub_nn K O _ _ e34_48
  have d34_49 := HeatV.sub_nn K O _ _ e34_49
  have d34_50 := HeatV.sub_nn K O _ _ e34_50
  have d35_36 := HeatV.sub_nn K O _ _ e35_36
  have d35_37 := HeatV.sub_nn K O _ _ e35_37
  have d35_38 := HeatV.sub_nn K O _ _ e35_38
  have d35_39 := HeatV.sub_nn K O _ _ e35_39
  have d35_40 := HeatV.sub_nn K O _ _ e35_40
  have d35_41 := HeatV.sub_nn K O _ _ e35_41
  have d35_42 := HeatV.sub_nn K O _ _ e35_42
  have d35_43 := HeatV.sub_nn K O _ _ e35_43
  have d35_44 := HeatV.sub_nn K O _ _ e35_44
  have d35_45 := HeatV.sub_nn K O _ _ e35_45
  have d35_46 := HeatV.sub_nn K O _ _ e35_46
  have d35_47 := HeatV.sub_nn K O _ _ e35_47
  have d35_48 := HeatV.sub_nn K O _ _ e35_48
  have d35_49 := HeatV.sub_nn K O _ _ e35_49
  have d35_50 := HeatV.sub_nn K O _ _ e35_50
  have d36_37 := HeatV.sub_nn K O _ _ e36_37
  have d36_38 := HeatV.sub_nn K O _ _ e36_38
  have d36_39 := HeatV.sub_nn K O _ _ e36_39
  have d36_40 := HeatV.sub_nn K O _ _ e36_40
  have d36_41 := HeatV.sub_nn K O _ _ e36_41
  have d36_42 := HeatV.sub_nn K O _ _ e36_42
  have d36_43 := HeatV.sub_nn K O _ _ e36_43
  have d36_44 := HeatV.sub_nn K O _ _ e36_44
  have d36_45 := HeatV.sub_nn K O _ _ e36_45
  have d36_46 := HeatV.sub_nn K O _ _ e36_46
  have d36_47 := HeatV.sub_nn K O _ _ e36_47
  have d36_48 := HeatV.sub_nn K O _ _ e36_48
  have d36_49 := HeatV.sub_nn K O _ _ e36_49
  have d37_38 := HeatV.sub_nn K O _ _ e37_38
  have d37_39 := HeatV.sub_nn K O _ _ e37_39
  have d37_40 := HeatV.sub_nn K O _ _ e37_40
  have d37_41 := HeatV.sub_nn K O _ _ e37_41
  have d37_42 := HeatV.sub_nn K O _ _ e37_42
  have d37_43 := HeatV.sub_nn K O _ _ e37_43
  have d37_44 := HeatV.sub_nn K O _ _ e37_44
  have d37_45 := HeatV.sub_nn K O _ _ e37_45
  have d37_46 := HeatV.sub_nn K O _ _ e37_46
  have d37_47 := HeatV.sub_nn K O _ _ e37_47
  have d37_48 := HeatV.sub_nn K O _ _ e37_48
  have d37_49 := HeatV.sub_nn K O _ _ e37_49
  have d37_50 := HeatV.sub_nn K O _ _ e37_50
  have d38_39 := HeatV.sub_nn K O _ _ e38_39
  have d38_40 := HeatV.sub_nn K O _ _ e38_40
  have d38_41 := HeatV.sub_nn K O _ _ e38_41
  have d38_42 := HeatV.sub_nn K O _ _ e38_42
  have d38_43 := HeatV.sub_nn K O _ _ e38_43
  have d38_44 := HeatV.sub_nn K O _ _ e38_44
  have d38_45 := HeatV.sub_nn K O _ _ e38_45
  have d38_46 := HeatV.sub_nn K O _ _ e38_46
  have d38_47 := HeatV.sub_nn K O _ _ e38_47
  have d38_48 := HeatV.sub_nn K O _ _ e38_48
  have d38_49 := HeatV.sub_nn K O _ _ e38_49
  have d38_50 := HeatV.sub_nn K O _ _ e38_50
  have d39_40 := HeatV.sub_nn K O _ _ e39_40
  have d39_41 := HeatV.sub_nn K O _ _ e39_41
  have d39_42 := HeatV.sub_nn K O _ _ e39_42
  have d39_43 := HeatV.sub_nn K O _ _ e39_43
  have d39_44 := HeatV.sub_nn K O _ _ e39_44
  have d39_45 := HeatV.sub_nn K O _ _ e39_45
  have d39_46 := HeatV.sub_nn K O _ _ e39_46
  have d39_47 := HeatV.sub_nn K O _ _ e39_47
  have d39_48 := HeatV.sub_nn K O _ _ e39_48
  have d39_49 := HeatV.sub_nn K O _ _ e39_49
  have d39_50 := HeatV.sub_nn K O _ _ e39_50
  have d40_41 := HeatV.sub_nn K O _ _ e40_41
  have d40_42 := HeatV.sub_nn K O _ _ e40_42
  have d40_43 := HeatV.sub_nn K O _ _ e40_43
  have d40_44 := HeatV.sub_nn K O _ _ e40_44
  have d40_45 := HeatV.sub_nn K O _ _ e40_45
  have d40_46 := HeatV.sub_nn K O _ _ e40_46
  have d40_47 := HeatV.sub_nn K O _ _ e40_47
  have d40_48 := HeatV.sub_nn K O _ _ e40_48
  have d40_49 := HeatV.sub_nn K O _ _ e40_49
  have d40_50 := HeatV.sub_nn K O _ _ e40_50
  have d41_42 := HeatV.sub_nn K O _ _ e41_42
  have d41_43 := HeatV.sub_nn K O _ _ e41_43
  have d41_44 := HeatV.sub_nn K O _ _ e41_44
  have d41_45 := HeatV.sub_nn K O _ _ e41_45
  have d41_46 := HeatV.sub_nn K O _ _ e41_46
  have d41_47 := HeatV.sub_nn K O _ _ e41_47
  have d41_48 := HeatV.sub_nn K O _ _ e41_48
  have d41_49 := HeatV.sub_nn K O _ _ e41_49
  have d41_50 := HeatV.sub_nn K O _ _ e41_50
  have d42_43 := HeatV.sub_nn K O _ _ e42_43
  have d42_44 := HeatV.sub_nn K O _ _ e42_44
  have d42_45 := HeatV.sub_nn K O _ _ e42_45
  have d42_46 := HeatV.sub_nn K O _ _ e42_46
  have d42_47 := HeatV.sub_nn K O _ _ e42_47
  have d42_48 := HeatV.sub_nn K O _ _ e42_48
  have d42_49 := HeatV.sub_nn K O _ _ e42_49
  have d42_50 := HeatV.sub_nn K O _ _ e42_50
  have d43_44 := HeatV.sub_nn K O _ _ e43_44
  have d43_45 := HeatV.sub_nn K O _ _ e43_45
  have d43_46 := HeatV.sub_nn K O _ _ e43_46
  have d43_47 := HeatV.sub_nn K O _ _ e43_47
  have d43_48 := HeatV.sub_nn K O _ _ e43_48
  have d43_49 := HeatV.sub_nn K O _ _ e43_49
  have d43_50 := HeatV.sub_nn K O _ _ e43_50
  have d44_45 := HeatV.sub_nn K O _ _ e44_45
  have d44_46 := HeatV.sub_nn K O _ _ e44_46
  have d44_47 := HeatV.sub_nn K O _ _ e44_47
  have d44_48 := HeatV.sub_nn K O _ _ e44_48
  have d44_49 := HeatV.sub_nn K O _ _ e44_49
  have d44_50 := HeatV.sub_nn K O _ _ e44_50
  have d45_46 := HeatV.sub_nn K O _ _ e45_46
  have d45_47 := HeatV.sub_nn K O _ _ e45_47
  have d45_48 := HeatV.sub_nn K O _ _ e45_48
  have d45_49 := HeatV.sub_nn K O _ _ e45_49
  have d45_50 := HeatV.sub_nn K O _ _ e45_50
  have d46_47 := HeatV.sub_nn K O _ _ e46_47
  have d46_48 := HeatV.sub_nn K O _ _ e46_48
  have d46_49 := HeatV.sub_nn K O _ _ e46_49
  have d46_50 := HeatV.sub_nn K O _ _ e46_50
  have d47_48 := HeatV.sub_nn K O _ _ e47_48
  have d47_49 := HeatV.sub_nn K O _ _ e47_49
  have d47_50 := HeatV.sub_nn K O _ _ e47_50
  have d48_49 := HeatV.sub_nn K O _ _ e48_49
  have d48_50 := HeatV.sub_nn K O _ _ e48_50
  have d49_50 := HeatV.sub_nn K O _ _ e49_50
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+218125 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 548777476) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (  -- (+5697 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..51, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 51 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 548777476) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN  -- (+6281 chars; full line in the Zenodo source)
      (K.mul (cN K 548168400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul  -- (+6281 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (A 37) (A 38) (A 39) (A 40) (A 41) (A 42) (A 43) (A 44) (A 45) (A 46) (A 47) (A 48) (A 49) (A 50) (A 51) (hnn 0) (hnn 1) (hnn 2) (hnn 3)  -- (+426 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 51 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 51 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 51 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 51 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 51 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 51 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 51 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+70093 chars; full line in the Zenodo source)

end G61Lv50

#print axioms G61Lv50.add_nn
#print axioms G61Lv50.level
#print axioms G61Lv50.level_fun

ym/G61Lv51.lean

lean_all/ym/G61Lv51.lean

/-
  ym/G61Lv51 — T45, G61a at level n = 51 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv51

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxHeartbeats 0 in
set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 a42 a43 a44 a45 a46 a47 a48 a49 a50 a51 a52 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6)  -- (+1098 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+61774 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 615238416) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.  -- (+5789 chars; full line in the Zenodo source)
      (K.mul (cN K 614581110) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul  -- (+5792 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_29 := HeatV.sub_nn K O _ _ e0_29
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_32 := HeatV.sub_nn K O _ _ e0_32
  have d0_33 := HeatV.sub_nn K O _ _ e0_33
  have d0_34 := HeatV.sub_nn K O _ _ e0_34
  have d0_35 := HeatV.sub_nn K O _ _ e0_35
  have d0_36 := HeatV.sub_nn K O _ _ e0_36
  have d0_37 := HeatV.sub_nn K O _ _ e0_37
  have d0_38 := HeatV.sub_nn K O _ _ e0_38
  have d0_39 := HeatV.sub_nn K O _ _ e0_39
  have d0_40 := HeatV.sub_nn K O _ _ e0_40
  have d0_41 := HeatV.sub_nn K O _ _ e0_41
  have d0_42 := HeatV.sub_nn K O _ _ e0_42
  have d0_43 := HeatV.sub_nn K O _ _ e0_43
  have d0_44 := HeatV.sub_nn K O _ _ e0_44
  have d0_45 := HeatV.sub_nn K O _ _ e0_45
  have d0_48 := HeatV.sub_nn K O _ _ e0_48
  have d0_49 := HeatV.sub_nn K O _ _ e0_49
  have d0_51 := HeatV.sub_nn K O _ _ e0_51
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_29 := HeatV.sub_nn K O _ _ e1_29
  have d1_30 := HeatV.sub_nn K O _ _ e1_30
  have d1_31 := HeatV.sub_nn K O _ _ e1_31
  have d1_32 := HeatV.sub_nn K O _ _ e1_32
  have d1_33 := HeatV.sub_nn K O _ _ e1_33
  have d1_37 := HeatV.sub_nn K O _ _ e1_37
  have d1_39 := HeatV.sub_nn K O _ _ e1_39
  have d1_40 := HeatV.sub_nn K O _ _ e1_40
  have d1_43 := HeatV.sub_nn K O _ _ e1_43
  have d1_44 := HeatV.sub_nn K O _ _ e1_44
  have d1_47 := HeatV.sub_nn K O _ _ e1_47
  have d1_48 := HeatV.sub_nn K O _ _ e1_48
  have d1_50 := HeatV.sub_nn K O _ _ e1_50
  have d1_51 := HeatV.sub_nn K O _ _ e1_51
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_33 := HeatV.sub_nn K O _ _ e2_33
  have d2_34 := HeatV.sub_nn K O _ _ e2_34
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d2_36 := HeatV.sub_nn K O _ _ e2_36
  have d2_37 := HeatV.sub_nn K O _ _ e2_37
  have d2_38 := HeatV.sub_nn K O _ _ e2_38
  have d2_39 := HeatV.sub_nn K O _ _ e2_39
  have d2_40 := HeatV.sub_nn K O _ _ e2_40
  have d2_41 := HeatV.sub_nn K O _ _ e2_41
  have d2_42 := HeatV.sub_nn K O _ _ e2_42
  have d2_43 := HeatV.sub_nn K O _ _ e2_43
  have d2_44 := HeatV.sub_nn K O _ _ e2_44
  have d2_45 := HeatV.sub_nn K O _ _ e2_45
  have d2_47 := HeatV.sub_nn K O _ _ e2_47
  have d2_48 := HeatV.sub_nn K O _ _ e2_48
  have d2_49 := HeatV.sub_nn K O _ _ e2_49
  have d2_50 := HeatV.sub_nn K O _ _ e2_50
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_34 := HeatV.sub_nn K O _ _ e3_34
  have d3_37 := HeatV.sub_nn K O _ _ e3_37
  have d3_38 := HeatV.sub_nn K O _ _ e3_38
  have d3_39 := HeatV.sub_nn K O _ _ e3_39
  have d3_40 := HeatV.sub_nn K O _ _ e3_40
  have d3_41 := HeatV.sub_nn K O _ _ e3_41
  have d3_42 := HeatV.sub_nn K O _ _ e3_42
  have d3_43 := HeatV.sub_nn K O _ _ e3_43
  have d3_44 := HeatV.sub_nn K O _ _ e3_44
  have d3_45 := HeatV.sub_nn K O _ _ e3_45
  have d3_46 := HeatV.sub_nn K O _ _ e3_46
  have d3_48 := HeatV.sub_nn K O _ _ e3_48
  have d3_49 := HeatV.sub_nn K O _ _ e3_49
  have d3_50 := HeatV.sub_nn K O _ _ e3_50
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d4_34 := HeatV.sub_nn K O _ _ e4_34
  have d4_35 := HeatV.sub_nn K O _ _ e4_35
  have d4_36 := HeatV.sub_nn K O _ _ e4_36
  have d4_37 := HeatV.sub_nn K O _ _ e4_37
  have d4_38 := HeatV.sub_nn K O _ _ e4_38
  have d4_39 := HeatV.sub_nn K O _ _ e4_39
  have d4_40 := HeatV.sub_nn K O _ _ e4_40
  have d4_41 := HeatV.sub_nn K O _ _ e4_41
  have d4_42 := HeatV.sub_nn K O _ _ e4_42
  have d4_43 := HeatV.sub_nn K O _ _ e4_43
  have d4_44 := HeatV.sub_nn K O _ _ e4_44
  have d4_45 := HeatV.sub_nn K O _ _ e4_45
  have d4_47 := HeatV.sub_nn K O _ _ e4_47
  have d4_48 := HeatV.sub_nn K O _ _ e4_48
  have d4_50 := HeatV.sub_nn K O _ _ e4_50
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d5_35 := HeatV.sub_nn K O _ _ e5_35
  have d5_37 := HeatV.sub_nn K O _ _ e5_37
  have d5_39 := HeatV.sub_nn K O _ _ e5_39
  have d5_40 := HeatV.sub_nn K O _ _ e5_40
  have d5_41 := HeatV.sub_nn K O _ _ e5_41
  have d5_42 := HeatV.sub_nn K O _ _ e5_42
  have d5_43 := HeatV.sub_nn K O _ _ e5_43
  have d5_44 := HeatV.sub_nn K O _ _ e5_44
  have d5_46 := HeatV.sub_nn K O _ _ e5_46
  have d5_47 := HeatV.sub_nn K O _ _ e5_47
  have d5_48 := HeatV.sub_nn K O _ _ e5_48
  have d5_49 := HeatV.sub_nn K O _ _ e5_49
  have d5_50 := HeatV.sub_nn K O _ _ e5_50
  have d5_51 := HeatV.sub_nn K O _ _ e5_51
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d6_33 := HeatV.sub_nn K O _ _ e6_33
  have d6_34 := HeatV.sub_nn K O _ _ e6_34
  have d6_35 := HeatV.sub_nn K O _ _ e6_35
  have d6_36 := HeatV.sub_nn K O _ _ e6_36
  have d6_37 := HeatV.sub_nn K O _ _ e6_37
  have d6_38 := HeatV.sub_nn K O _ _ e6_38
  have d6_39 := HeatV.sub_nn K O _ _ e6_39
  have d6_40 := HeatV.sub_nn K O _ _ e6_40
  have d6_41 := HeatV.sub_nn K O _ _ e6_41
  have d6_42 := HeatV.sub_nn K O _ _ e6_42
  have d6_43 := HeatV.sub_nn K O _ _ e6_43
  have d6_45 := HeatV.sub_nn K O _ _ e6_45
  have d6_46 := HeatV.sub_nn K O _ _ e6_46
  have d6_47 := HeatV.sub_nn K O _ _ e6_47
  have d6_48 := HeatV.sub_nn K O _ _ e6_48
  have d6_49 := HeatV.sub_nn K O _ _ e6_49
  have d6_50 := HeatV.sub_nn K O _ _ e6_50
  have d6_51 := HeatV.sub_nn K O _ _ e6_51
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d7_34 := HeatV.sub_nn K O _ _ e7_34
  have d7_35 := HeatV.sub_nn K O _ _ e7_35
  have d7_37 := HeatV.sub_nn K O _ _ e7_37
  have d7_38 := HeatV.sub_nn K O _ _ e7_38
  have d7_39 := HeatV.sub_nn K O _ _ e7_39
  have d7_40 := HeatV.sub_nn K O _ _ e7_40
  have d7_41 := HeatV.sub_nn K O _ _ e7_41
  have d7_42 := HeatV.sub_nn K O _ _ e7_42
  have d7_43 := HeatV.sub_nn K O _ _ e7_43
  have d7_44 := HeatV.sub_nn K O _ _ e7_44
  have d7_45 := HeatV.sub_nn K O _ _ e7_45
  have d7_46 := HeatV.sub_nn K O _ _ e7_46
  have d7_47 := HeatV.sub_nn K O _ _ e7_47
  have d7_48 := HeatV.sub_nn K O _ _ e7_48
  have d7_49 := HeatV.sub_nn K O _ _ e7_49
  have d7_50 := HeatV.sub_nn K O _ _ e7_50
  have d7_51 := HeatV.sub_nn K O _ _ e7_51
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_32 := HeatV.sub_nn K O _ _ e8_32
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_34 := HeatV.sub_nn K O _ _ e8_34
  have d8_35 := HeatV.sub_nn K O _ _ e8_35
  have d8_36 := HeatV.sub_nn K O _ _ e8_36
  have d8_37 := HeatV.sub_nn K O _ _ e8_37
  have d8_38 := HeatV.sub_nn K O _ _ e8_38
  have d8_39 := HeatV.sub_nn K O _ _ e8_39
  have d8_40 := HeatV.sub_nn K O _ _ e8_40
  have d8_41 := HeatV.sub_nn K O _ _ e8_41
  have d8_43 := HeatV.sub_nn K O _ _ e8_43
  have d8_44 := HeatV.sub_nn K O _ _ e8_44
  have d8_45 := HeatV.sub_nn K O _ _ e8_45
  have d8_46 := HeatV.sub_nn K O _ _ e8_46
  have d8_47 := HeatV.sub_nn K O _ _ e8_47
  have d8_48 := HeatV.sub_nn K O _ _ e8_48
  have d8_50 := HeatV.sub_nn K O _ _ e8_50
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d9_34 := HeatV.sub_nn K O _ _ e9_34
  have d9_35 := HeatV.sub_nn K O _ _ e9_35
  have d9_36 := HeatV.sub_nn K O _ _ e9_36
  have d9_37 := HeatV.sub_nn K O _ _ e9_37
  have d9_38 := HeatV.sub_nn K O _ _ e9_38
  have d9_39 := HeatV.sub_nn K O _ _ e9_39
  have d9_40 := HeatV.sub_nn K O _ _ e9_40
  have d9_42 := HeatV.sub_nn K O _ _ e9_42
  have d9_43 := HeatV.sub_nn K O _ _ e9_43
  have d9_44 := HeatV.sub_nn K O _ _ e9_44
  have d9_45 := HeatV.sub_nn K O _ _ e9_45
  have d9_46 := HeatV.sub_nn K O _ _ e9_46
  have d9_47 := HeatV.sub_nn K O _ _ e9_47
  have d9_48 := HeatV.sub_nn K O _ _ e9_48
  have d9_50 := HeatV.sub_nn K O _ _ e9_50
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_34 := HeatV.sub_nn K O _ _ e10_34
  have d10_35 := HeatV.sub_nn K O _ _ e10_35
  have d10_37 := HeatV.sub_nn K O _ _ e10_37
  have d10_39 := HeatV.sub_nn K O _ _ e10_39
  have d10_41 := HeatV.sub_nn K O _ _ e10_41
  have d10_42 := HeatV.sub_nn K O _ _ e10_42
  have d10_43 := HeatV.sub_nn K O _ _ e10_43
  have d10_44 := HeatV.sub_nn K O _ _ e10_44
  have d10_45 := HeatV.sub_nn K O _ _ e10_45
  have d10_46 := HeatV.sub_nn K O _ _ e10_46
  have d10_47 := HeatV.sub_nn K O _ _ e10_47
  have d10_48 := HeatV.sub_nn K O _ _ e10_48
  have d10_49 := HeatV.sub_nn K O _ _ e10_49
  have d10_50 := HeatV.sub_nn K O _ _ e10_50
  have d10_51 := HeatV.sub_nn K O _ _ e10_51
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d11_33 := HeatV.sub_nn K O _ _ e11_33
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d11_35 := HeatV.sub_nn K O _ _ e11_35
  have d11_36 := HeatV.sub_nn K O _ _ e11_36
  have d11_37 := HeatV.sub_nn K O _ _ e11_37
  have d11_40 := HeatV.sub_nn K O _ _ e11_40
  have d11_41 := HeatV.sub_nn K O _ _ e11_41
  have d11_42 := HeatV.sub_nn K O _ _ e11_42
  have d11_43 := HeatV.sub_nn K O _ _ e11_43
  have d11_44 := HeatV.sub_nn K O _ _ e11_44
  have d11_45 := HeatV.sub_nn K O _ _ e11_45
  have d11_46 := HeatV.sub_nn K O _ _ e11_46
  have d11_47 := HeatV.sub_nn K O _ _ e11_47
  have d11_48 := HeatV.sub_nn K O _ _ e11_48
  have d11_49 := HeatV.sub_nn K O _ _ e11_49
  have d11_50 := HeatV.sub_nn K O _ _ e11_50
  have d11_51 := HeatV.sub_nn K O _ _ e11_51
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d12_36 := HeatV.sub_nn K O _ _ e12_36
  have d12_37 := HeatV.sub_nn K O _ _ e12_37
  have d12_39 := HeatV.sub_nn K O _ _ e12_39
  have d12_40 := HeatV.sub_nn K O _ _ e12_40
  have d12_41 := HeatV.sub_nn K O _ _ e12_41
  have d12_42 := HeatV.sub_nn K O _ _ e12_42
  have d12_43 := HeatV.sub_nn K O _ _ e12_43
  have d12_44 := HeatV.sub_nn K O _ _ e12_44
  have d12_46 := HeatV.sub_nn K O _ _ e12_46
  have d12_47 := HeatV.sub_nn K O _ _ e12_47
  have d12_48 := HeatV.sub_nn K O _ _ e12_48
  have d12_50 := HeatV.sub_nn K O _ _ e12_50
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_35 := HeatV.sub_nn K O _ _ e13_35
  have d13_36 := HeatV.sub_nn K O _ _ e13_36
  have d13_38 := HeatV.sub_nn K O _ _ e13_38
  have d13_39 := HeatV.sub_nn K O _ _ e13_39
  have d13_40 := HeatV.sub_nn K O _ _ e13_40
  have d13_41 := HeatV.sub_nn K O _ _ e13_41
  have d13_42 := HeatV.sub_nn K O _ _ e13_42
  have d13_43 := HeatV.sub_nn K O _ _ e13_43
  have d13_44 := HeatV.sub_nn K O _ _ e13_44
  have d13_45 := HeatV.sub_nn K O _ _ e13_45
  have d13_46 := HeatV.sub_nn K O _ _ e13_46
  have d13_47 := HeatV.sub_nn K O _ _ e13_47
  have d13_48 := HeatV.sub_nn K O _ _ e13_48
  have d13_49 := HeatV.sub_nn K O _ _ e13_49
  have d13_50 := HeatV.sub_nn K O _ _ e13_50
  have d13_51 := HeatV.sub_nn K O _ _ e13_51
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d14_35 := HeatV.sub_nn K O _ _ e14_35
  have d14_36 := HeatV.sub_nn K O _ _ e14_36
  have d14_37 := HeatV.sub_nn K O _ _ e14_37
  have d14_38 := HeatV.sub_nn K O _ _ e14_38
  have d14_39 := HeatV.sub_nn K O _ _ e14_39
  have d14_40 := HeatV.sub_nn K O _ _ e14_40
  have d14_41 := HeatV.sub_nn K O _ _ e14_41
  have d14_42 := HeatV.sub_nn K O _ _ e14_42
  have d14_43 := HeatV.sub_nn K O _ _ e14_43
  have d14_44 := HeatV.sub_nn K O _ _ e14_44
  have d14_46 := HeatV.sub_nn K O _ _ e14_46
  have d14_47 := HeatV.sub_nn K O _ _ e14_47
  have d14_48 := HeatV.sub_nn K O _ _ e14_48
  have d14_50 := HeatV.sub_nn K O _ _ e14_50
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_34 := HeatV.sub_nn K O _ _ e15_34
  have d15_36 := HeatV.sub_nn K O _ _ e15_36
  have d15_37 := HeatV.sub_nn K O _ _ e15_37
  have d15_38 := HeatV.sub_nn K O _ _ e15_38
  have d15_39 := HeatV.sub_nn K O _ _ e15_39
  have d15_40 := HeatV.sub_nn K O _ _ e15_40
  have d15_41 := HeatV.sub_nn K O _ _ e15_41
  have d15_42 := HeatV.sub_nn K O _ _ e15_42
  have d15_43 := HeatV.sub_nn K O _ _ e15_43
  have d15_44 := HeatV.sub_nn K O _ _ e15_44
  have d15_45 := HeatV.sub_nn K O _ _ e15_45
  have d15_46 := HeatV.sub_nn K O _ _ e15_46
  have d15_47 := HeatV.sub_nn K O _ _ e15_47
  have d15_48 := HeatV.sub_nn K O _ _ e15_48
  have d15_49 := HeatV.sub_nn K O _ _ e15_49
  have d15_50 := HeatV.sub_nn K O _ _ e15_50
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d16_36 := HeatV.sub_nn K O _ _ e16_36
  have d16_37 := HeatV.sub_nn K O _ _ e16_37
  have d16_38 := HeatV.sub_nn K O _ _ e16_38
  have d16_39 := HeatV.sub_nn K O _ _ e16_39
  have d16_40 := HeatV.sub_nn K O _ _ e16_40
  have d16_41 := HeatV.sub_nn K O _ _ e16_41
  have d16_42 := HeatV.sub_nn K O _ _ e16_42
  have d16_43 := HeatV.sub_nn K O _ _ e16_43
  have d16_44 := HeatV.sub_nn K O _ _ e16_44
  have d16_45 := HeatV.sub_nn K O _ _ e16_45
  have d16_46 := HeatV.sub_nn K O _ _ e16_46
  have d16_47 := HeatV.sub_nn K O _ _ e16_47
  have d16_48 := HeatV.sub_nn K O _ _ e16_48
  have d16_50 := HeatV.sub_nn K O _ _ e16_50
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_34 := HeatV.sub_nn K O _ _ e17_34
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d17_36 := HeatV.sub_nn K O _ _ e17_36
  have d17_38 := HeatV.sub_nn K O _ _ e17_38
  have d17_39 := HeatV.sub_nn K O _ _ e17_39
  have d17_40 := HeatV.sub_nn K O _ _ e17_40
  have d17_41 := HeatV.sub_nn K O _ _ e17_41
  have d17_42 := HeatV.sub_nn K O _ _ e17_42
  have d17_43 := HeatV.sub_nn K O _ _ e17_43
  have d17_44 := HeatV.sub_nn K O _ _ e17_44
  have d17_46 := HeatV.sub_nn K O _ _ e17_46
  have d17_48 := HeatV.sub_nn K O _ _ e17_48
  have d17_49 := HeatV.sub_nn K O _ _ e17_49
  have d17_50 := HeatV.sub_nn K O _ _ e17_50
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d18_35 := HeatV.sub_nn K O _ _ e18_35
  have d18_37 := HeatV.sub_nn K O _ _ e18_37
  have d18_38 := HeatV.sub_nn K O _ _ e18_38
  have d18_39 := HeatV.sub_nn K O _ _ e18_39
  have d18_40 := HeatV.sub_nn K O _ _ e18_40
  have d18_41 := HeatV.sub_nn K O _ _ e18_41
  have d18_42 := HeatV.sub_nn K O _ _ e18_42
  have d18_43 := HeatV.sub_nn K O _ _ e18_43
  have d18_44 := HeatV.sub_nn K O _ _ e18_44
  have d18_45 := HeatV.sub_nn K O _ _ e18_45
  have d18_46 := HeatV.sub_nn K O _ _ e18_46
  have d18_47 := HeatV.sub_nn K O _ _ e18_47
  have d18_48 := HeatV.sub_nn K O _ _ e18_48
  have d18_49 := HeatV.sub_nn K O _ _ e18_49
  have d18_50 := HeatV.sub_nn K O _ _ e18_50
  have d18_51 := HeatV.sub_nn K O _ _ e18_51
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d19_34 := HeatV.sub_nn K O _ _ e19_34
  have d19_35 := HeatV.sub_nn K O _ _ e19_35
  have d19_36 := HeatV.sub_nn K O _ _ e19_36
  have d19_37 := HeatV.sub_nn K O _ _ e19_37
  have d19_38 := HeatV.sub_nn K O _ _ e19_38
  have d19_39 := HeatV.sub_nn K O _ _ e19_39
  have d19_40 := HeatV.sub_nn K O _ _ e19_40
  have d19_41 := HeatV.sub_nn K O _ _ e19_41
  have d19_42 := HeatV.sub_nn K O _ _ e19_42
  have d19_44 := HeatV.sub_nn K O _ _ e19_44
  have d19_45 := HeatV.sub_nn K O _ _ e19_45
  have d19_46 := HeatV.sub_nn K O _ _ e19_46
  have d19_47 := HeatV.sub_nn K O _ _ e19_47
  have d19_48 := HeatV.sub_nn K O _ _ e19_48
  have d19_49 := HeatV.sub_nn K O _ _ e19_49
  have d19_50 := HeatV.sub_nn K O _ _ e19_50
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_34 := HeatV.sub_nn K O _ _ e20_34
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d20_36 := HeatV.sub_nn K O _ _ e20_36
  have d20_37 := HeatV.sub_nn K O _ _ e20_37
  have d20_38 := HeatV.sub_nn K O _ _ e20_38
  have d20_39 := HeatV.sub_nn K O _ _ e20_39
  have d20_40 := HeatV.sub_nn K O _ _ e20_40
  have d20_41 := HeatV.sub_nn K O _ _ e20_41
  have d20_42 := HeatV.sub_nn K O _ _ e20_42
  have d20_43 := HeatV.sub_nn K O _ _ e20_43
  have d20_44 := HeatV.sub_nn K O _ _ e20_44
  have d20_45 := HeatV.sub_nn K O _ _ e20_45
  have d20_46 := HeatV.sub_nn K O _ _ e20_46
  have d20_47 := HeatV.sub_nn K O _ _ e20_47
  have d20_48 := HeatV.sub_nn K O _ _ e20_48
  have d20_49 := HeatV.sub_nn K O _ _ e20_49
  have d20_50 := HeatV.sub_nn K O _ _ e20_50
  have d20_51 := HeatV.sub_nn K O _ _ e20_51
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d21_35 := HeatV.sub_nn K O _ _ e21_35
  have d21_36 := HeatV.sub_nn K O _ _ e21_36
  have d21_37 := HeatV.sub_nn K O _ _ e21_37
  have d21_38 := HeatV.sub_nn K O _ _ e21_38
  have d21_39 := HeatV.sub_nn K O _ _ e21_39
  have d21_40 := HeatV.sub_nn K O _ _ e21_40
  have d21_41 := HeatV.sub_nn K O _ _ e21_41
  have d21_42 := HeatV.sub_nn K O _ _ e21_42
  have d21_43 := HeatV.sub_nn K O _ _ e21_43
  have d21_44 := HeatV.sub_nn K O _ _ e21_44
  have d21_45 := HeatV.sub_nn K O _ _ e21_45
  have d21_46 := HeatV.sub_nn K O _ _ e21_46
  have d21_47 := HeatV.sub_nn K O _ _ e21_47
  have d21_48 := HeatV.sub_nn K O _ _ e21_48
  have d21_49 := HeatV.sub_nn K O _ _ e21_49
  have d21_50 := HeatV.sub_nn K O _ _ e21_50
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d22_36 := HeatV.sub_nn K O _ _ e22_36
  have d22_37 := HeatV.sub_nn K O _ _ e22_37
  have d22_38 := HeatV.sub_nn K O _ _ e22_38
  have d22_39 := HeatV.sub_nn K O _ _ e22_39
  have d22_40 := HeatV.sub_nn K O _ _ e22_40
  have d22_41 := HeatV.sub_nn K O _ _ e22_41
  have d22_42 := HeatV.sub_nn K O _ _ e22_42
  have d22_43 := HeatV.sub_nn K O _ _ e22_43
  have d22_44 := HeatV.sub_nn K O _ _ e22_44
  have d22_45 := HeatV.sub_nn K O _ _ e22_45
  have d22_46 := HeatV.sub_nn K O _ _ e22_46
  have d22_47 := HeatV.sub_nn K O _ _ e22_47
  have d22_48 := HeatV.sub_nn K O _ _ e22_48
  have d22_49 := HeatV.sub_nn K O _ _ e22_49
  have d22_50 := HeatV.sub_nn K O _ _ e22_50
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d23_36 := HeatV.sub_nn K O _ _ e23_36
  have d23_37 := HeatV.sub_nn K O _ _ e23_37
  have d23_38 := HeatV.sub_nn K O _ _ e23_38
  have d23_39 := HeatV.sub_nn K O _ _ e23_39
  have d23_40 := HeatV.sub_nn K O _ _ e23_40
  have d23_41 := HeatV.sub_nn K O _ _ e23_41
  have d23_42 := HeatV.sub_nn K O _ _ e23_42
  have d23_43 := HeatV.sub_nn K O _ _ e23_43
  have d23_44 := HeatV.sub_nn K O _ _ e23_44
  have d23_45 := HeatV.sub_nn K O _ _ e23_45
  have d23_46 := HeatV.sub_nn K O _ _ e23_46
  have d23_47 := HeatV.sub_nn K O _ _ e23_47
  have d23_48 := HeatV.sub_nn K O _ _ e23_48
  have d23_49 := HeatV.sub_nn K O _ _ e23_49
  have d23_50 := HeatV.sub_nn K O _ _ e23_50
  have d23_51 := HeatV.sub_nn K O _ _ e23_51
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d24_35 := HeatV.sub_nn K O _ _ e24_35
  have d24_36 := HeatV.sub_nn K O _ _ e24_36
  have d24_37 := HeatV.sub_nn K O _ _ e24_37
  have d24_38 := HeatV.sub_nn K O _ _ e24_38
  have d24_39 := HeatV.sub_nn K O _ _ e24_39
  have d24_40 := HeatV.sub_nn K O _ _ e24_40
  have d24_41 := HeatV.sub_nn K O _ _ e24_41
  have d24_42 := HeatV.sub_nn K O _ _ e24_42
  have d24_43 := HeatV.sub_nn K O _ _ e24_43
  have d24_44 := HeatV.sub_nn K O _ _ e24_44
  have d24_45 := HeatV.sub_nn K O _ _ e24_45
  have d24_46 := HeatV.sub_nn K O _ _ e24_46
  have d24_47 := HeatV.sub_nn K O _ _ e24_47
  have d24_48 := HeatV.sub_nn K O _ _ e24_48
  have d24_49 := HeatV.sub_nn K O _ _ e24_49
  have d24_50 := HeatV.sub_nn K O _ _ e24_50
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d25_35 := HeatV.sub_nn K O _ _ e25_35
  have d25_36 := HeatV.sub_nn K O _ _ e25_36
  have d25_37 := HeatV.sub_nn K O _ _ e25_37
  have d25_38 := HeatV.sub_nn K O _ _ e25_38
  have d25_39 := HeatV.sub_nn K O _ _ e25_39
  have d25_40 := HeatV.sub_nn K O _ _ e25_40
  have d25_41 := HeatV.sub_nn K O _ _ e25_41
  have d25_42 := HeatV.sub_nn K O _ _ e25_42
  have d25_43 := HeatV.sub_nn K O _ _ e25_43
  have d25_44 := HeatV.sub_nn K O _ _ e25_44
  have d25_45 := HeatV.sub_nn K O _ _ e25_45
  have d25_46 := HeatV.sub_nn K O _ _ e25_46
  have d25_47 := HeatV.sub_nn K O _ _ e25_47
  have d25_48 := HeatV.sub_nn K O _ _ e25_48
  have d25_49 := HeatV.sub_nn K O _ _ e25_49
  have d25_50 := HeatV.sub_nn K O _ _ e25_50
  have d25_51 := HeatV.sub_nn K O _ _ e25_51
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d26_36 := HeatV.sub_nn K O _ _ e26_36
  have d26_37 := HeatV.sub_nn K O _ _ e26_37
  have d26_38 := HeatV.sub_nn K O _ _ e26_38
  have d26_39 := HeatV.sub_nn K O _ _ e26_39
  have d26_40 := HeatV.sub_nn K O _ _ e26_40
  have d26_41 := HeatV.sub_nn K O _ _ e26_41
  have d26_42 := HeatV.sub_nn K O _ _ e26_42
  have d26_43 := HeatV.sub_nn K O _ _ e26_43
  have d26_44 := HeatV.sub_nn K O _ _ e26_44
  have d26_45 := HeatV.sub_nn K O _ _ e26_45
  have d26_46 := HeatV.sub_nn K O _ _ e26_46
  have d26_47 := HeatV.sub_nn K O _ _ e26_47
  have d26_48 := HeatV.sub_nn K O _ _ e26_48
  have d26_49 := HeatV.sub_nn K O _ _ e26_49
  have d26_50 := HeatV.sub_nn K O _ _ e26_50
  have d26_51 := HeatV.sub_nn K O _ _ e26_51
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d27_35 := HeatV.sub_nn K O _ _ e27_35
  have d27_37 := HeatV.sub_nn K O _ _ e27_37
  have d27_38 := HeatV.sub_nn K O _ _ e27_38
  have d27_39 := HeatV.sub_nn K O _ _ e27_39
  have d27_40 := HeatV.sub_nn K O _ _ e27_40
  have d27_41 := HeatV.sub_nn K O _ _ e27_41
  have d27_42 := HeatV.sub_nn K O _ _ e27_42
  have d27_43 := HeatV.sub_nn K O _ _ e27_43
  have d27_44 := HeatV.sub_nn K O _ _ e27_44
  have d27_45 := HeatV.sub_nn K O _ _ e27_45
  have d27_46 := HeatV.sub_nn K O _ _ e27_46
  have d27_47 := HeatV.sub_nn K O _ _ e27_47
  have d27_48 := HeatV.sub_nn K O _ _ e27_48
  have d27_49 := HeatV.sub_nn K O _ _ e27_49
  have d27_50 := HeatV.sub_nn K O _ _ e27_50
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d28_35 := HeatV.sub_nn K O _ _ e28_35
  have d28_36 := HeatV.sub_nn K O _ _ e28_36
  have d28_37 := HeatV.sub_nn K O _ _ e28_37
  have d28_38 := HeatV.sub_nn K O _ _ e28_38
  have d28_39 := HeatV.sub_nn K O _ _ e28_39
  have d28_40 := HeatV.sub_nn K O _ _ e28_40
  have d28_41 := HeatV.sub_nn K O _ _ e28_41
  have d28_42 := HeatV.sub_nn K O _ _ e28_42
  have d28_43 := HeatV.sub_nn K O _ _ e28_43
  have d28_44 := HeatV.sub_nn K O _ _ e28_44
  have d28_45 := HeatV.sub_nn K O _ _ e28_45
  have d28_46 := HeatV.sub_nn K O _ _ e28_46
  have d28_47 := HeatV.sub_nn K O _ _ e28_47
  have d28_48 := HeatV.sub_nn K O _ _ e28_48
  have d28_49 := HeatV.sub_nn K O _ _ e28_49
  have d28_50 := HeatV.sub_nn K O _ _ e28_50
  have d28_51 := HeatV.sub_nn K O _ _ e28_51
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d29_36 := HeatV.sub_nn K O _ _ e29_36
  have d29_37 := HeatV.sub_nn K O _ _ e29_37
  have d29_38 := HeatV.sub_nn K O _ _ e29_38
  have d29_39 := HeatV.sub_nn K O _ _ e29_39
  have d29_40 := HeatV.sub_nn K O _ _ e29_40
  have d29_41 := HeatV.sub_nn K O _ _ e29_41
  have d29_42 := HeatV.sub_nn K O _ _ e29_42
  have d29_43 := HeatV.sub_nn K O _ _ e29_43
  have d29_44 := HeatV.sub_nn K O _ _ e29_44
  have d29_45 := HeatV.sub_nn K O _ _ e29_45
  have d29_46 := HeatV.sub_nn K O _ _ e29_46
  have d29_47 := HeatV.sub_nn K O _ _ e29_47
  have d29_48 := HeatV.sub_nn K O _ _ e29_48
  have d29_49 := HeatV.sub_nn K O _ _ e29_49
  have d29_50 := HeatV.sub_nn K O _ _ e29_50
  have d29_51 := HeatV.sub_nn K O _ _ e29_51
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d30_35 := HeatV.sub_nn K O _ _ e30_35
  have d30_36 := HeatV.sub_nn K O _ _ e30_36
  have d30_37 := HeatV.sub_nn K O _ _ e30_37
  have d30_38 := HeatV.sub_nn K O _ _ e30_38
  have d30_39 := HeatV.sub_nn K O _ _ e30_39
  have d30_40 := HeatV.sub_nn K O _ _ e30_40
  have d30_41 := HeatV.sub_nn K O _ _ e30_41
  have d30_42 := HeatV.sub_nn K O _ _ e30_42
  have d30_43 := HeatV.sub_nn K O _ _ e30_43
  have d30_44 := HeatV.sub_nn K O _ _ e30_44
  have d30_45 := HeatV.sub_nn K O _ _ e30_45
  have d30_46 := HeatV.sub_nn K O _ _ e30_46
  have d30_47 := HeatV.sub_nn K O _ _ e30_47
  have d30_48 := HeatV.sub_nn K O _ _ e30_48
  have d30_49 := HeatV.sub_nn K O _ _ e30_49
  have d30_50 := HeatV.sub_nn K O _ _ e30_50
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d31_35 := HeatV.sub_nn K O _ _ e31_35
  have d31_36 := HeatV.sub_nn K O _ _ e31_36
  have d31_37 := HeatV.sub_nn K O _ _ e31_37
  have d31_38 := HeatV.sub_nn K O _ _ e31_38
  have d31_39 := HeatV.sub_nn K O _ _ e31_39
  have d31_40 := HeatV.sub_nn K O _ _ e31_40
  have d31_41 := HeatV.sub_nn K O _ _ e31_41
  have d31_42 := HeatV.sub_nn K O _ _ e31_42
  have d31_43 := HeatV.sub_nn K O _ _ e31_43
  have d31_44 := HeatV.sub_nn K O _ _ e31_44
  have d31_45 := HeatV.sub_nn K O _ _ e31_45
  have d31_46 := HeatV.sub_nn K O _ _ e31_46
  have d31_47 := HeatV.sub_nn K O _ _ e31_47
  have d31_48 := HeatV.sub_nn K O _ _ e31_48
  have d31_49 := HeatV.sub_nn K O _ _ e31_49
  have d31_50 := HeatV.sub_nn K O _ _ e31_50
  have d31_51 := HeatV.sub_nn K O _ _ e31_51
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d32_36 := HeatV.sub_nn K O _ _ e32_36
  have d32_37 := HeatV.sub_nn K O _ _ e32_37
  have d32_38 := HeatV.sub_nn K O _ _ e32_38
  have d32_39 := HeatV.sub_nn K O _ _ e32_39
  have d32_40 := HeatV.sub_nn K O _ _ e32_40
  have d32_41 := HeatV.sub_nn K O _ _ e32_41
  have d32_42 := HeatV.sub_nn K O _ _ e32_42
  have d32_43 := HeatV.sub_nn K O _ _ e32_43
  have d32_44 := HeatV.sub_nn K O _ _ e32_44
  have d32_45 := HeatV.sub_nn K O _ _ e32_45
  have d32_46 := HeatV.sub_nn K O _ _ e32_46
  have d32_47 := HeatV.sub_nn K O _ _ e32_47
  have d32_48 := HeatV.sub_nn K O _ _ e32_48
  have d32_49 := HeatV.sub_nn K O _ _ e32_49
  have d32_50 := HeatV.sub_nn K O _ _ e32_50
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d33_36 := HeatV.sub_nn K O _ _ e33_36
  have d33_37 := HeatV.sub_nn K O _ _ e33_37
  have d33_38 := HeatV.sub_nn K O _ _ e33_38
  have d33_39 := HeatV.sub_nn K O _ _ e33_39
  have d33_40 := HeatV.sub_nn K O _ _ e33_40
  have d33_41 := HeatV.sub_nn K O _ _ e33_41
  have d33_42 := HeatV.sub_nn K O _ _ e33_42
  have d33_43 := HeatV.sub_nn K O _ _ e33_43
  have d33_44 := HeatV.sub_nn K O _ _ e33_44
  have d33_45 := HeatV.sub_nn K O _ _ e33_45
  have d33_46 := HeatV.sub_nn K O _ _ e33_46
  have d33_47 := HeatV.sub_nn K O _ _ e33_47
  have d33_48 := HeatV.sub_nn K O _ _ e33_48
  have d33_49 := HeatV.sub_nn K O _ _ e33_49
  have d33_50 := HeatV.sub_nn K O _ _ e33_50
  have d33_51 := HeatV.sub_nn K O _ _ e33_51
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have d34_36 := HeatV.sub_nn K O _ _ e34_36
  have d34_37 := HeatV.sub_nn K O _ _ e34_37
  have d34_38 := HeatV.sub_nn K O _ _ e34_38
  have d34_39 := HeatV.sub_nn K O _ _ e34_39
  have d34_40 := HeatV.sub_nn K O _ _ e34_40
  have d34_41 := HeatV.sub_nn K O _ _ e34_41
  have d34_42 := HeatV.sub_nn K O _ _ e34_42
  have d34_43 := HeatV.sub_nn K O _ _ e34_43
  have d34_44 := HeatV.sub_nn K O _ _ e34_44
  have d34_45 := HeatV.sub_nn K O _ _ e34_45
  have d34_46 := HeatV.sub_nn K O _ _ e34_46
  have d34_47 := HeatV.sub_nn K O _ _ e34_47
  have d34_48 := HeatV.sub_nn K O _ _ e34_48
  have d34_49 := HeatV.sub_nn K O _ _ e34_49
  have d34_50 := HeatV.sub_nn K O _ _ e34_50
  have d34_51 := HeatV.sub_nn K O _ _ e34_51
  have d35_36 := HeatV.sub_nn K O _ _ e35_36
  have d35_37 := HeatV.sub_nn K O _ _ e35_37
  have d35_38 := HeatV.sub_nn K O _ _ e35_38
  have d35_39 := HeatV.sub_nn K O _ _ e35_39
  have d35_40 := HeatV.sub_nn K O _ _ e35_40
  have d35_41 := HeatV.sub_nn K O _ _ e35_41
  have d35_42 := HeatV.sub_nn K O _ _ e35_42
  have d35_43 := HeatV.sub_nn K O _ _ e35_43
  have d35_44 := HeatV.sub_nn K O _ _ e35_44
  have d35_45 := HeatV.sub_nn K O _ _ e35_45
  have d35_46 := HeatV.sub_nn K O _ _ e35_46
  have d35_47 := HeatV.sub_nn K O _ _ e35_47
  have d35_48 := HeatV.sub_nn K O _ _ e35_48
  have d35_49 := HeatV.sub_nn K O _ _ e35_49
  have d35_50 := HeatV.sub_nn K O _ _ e35_50
  have d35_51 := HeatV.sub_nn K O _ _ e35_51
  have d36_37 := HeatV.sub_nn K O _ _ e36_37
  have d36_38 := HeatV.sub_nn K O _ _ e36_38
  have d36_39 := HeatV.sub_nn K O _ _ e36_39
  have d36_40 := HeatV.sub_nn K O _ _ e36_40
  have d36_41 := HeatV.sub_nn K O _ _ e36_41
  have d36_42 := HeatV.sub_nn K O _ _ e36_42
  have d36_43 := HeatV.sub_nn K O _ _ e36_43
  have d36_44 := HeatV.sub_nn K O _ _ e36_44
  have d36_45 := HeatV.sub_nn K O _ _ e36_45
  have d36_46 := HeatV.sub_nn K O _ _ e36_46
  have d36_47 := HeatV.sub_nn K O _ _ e36_47
  have d36_48 := HeatV.sub_nn K O _ _ e36_48
  have d36_49 := HeatV.sub_nn K O _ _ e36_49
  have d36_50 := HeatV.sub_nn K O _ _ e36_50
  have d36_51 := HeatV.sub_nn K O _ _ e36_51
  have d37_38 := HeatV.sub_nn K O _ _ e37_38
  have d37_39 := HeatV.sub_nn K O _ _ e37_39
  have d37_40 := HeatV.sub_nn K O _ _ e37_40
  have d37_41 := HeatV.sub_nn K O _ _ e37_41
  have d37_42 := HeatV.sub_nn K O _ _ e37_42
  have d37_43 := HeatV.sub_nn K O _ _ e37_43
  have d37_44 := HeatV.sub_nn K O _ _ e37_44
  have d37_45 := HeatV.sub_nn K O _ _ e37_45
  have d37_46 := HeatV.sub_nn K O _ _ e37_46
  have d37_47 := HeatV.sub_nn K O _ _ e37_47
  have d37_48 := HeatV.sub_nn K O _ _ e37_48
  have d37_49 := HeatV.sub_nn K O _ _ e37_49
  have d37_50 := HeatV.sub_nn K O _ _ e37_50
  have d38_39 := HeatV.sub_nn K O _ _ e38_39
  have d38_40 := HeatV.sub_nn K O _ _ e38_40
  have d38_41 := HeatV.sub_nn K O _ _ e38_41
  have d38_42 := HeatV.sub_nn K O _ _ e38_42
  have d38_43 := HeatV.sub_nn K O _ _ e38_43
  have d38_44 := HeatV.sub_nn K O _ _ e38_44
  have d38_45 := HeatV.sub_nn K O _ _ e38_45
  have d38_46 := HeatV.sub_nn K O _ _ e38_46
  have d38_47 := HeatV.sub_nn K O _ _ e38_47
  have d38_48 := HeatV.sub_nn K O _ _ e38_48
  have d38_49 := HeatV.sub_nn K O _ _ e38_49
  have d38_50 := HeatV.sub_nn K O _ _ e38_50
  have d38_51 := HeatV.sub_nn K O _ _ e38_51
  have d39_40 := HeatV.sub_nn K O _ _ e39_40
  have d39_41 := HeatV.sub_nn K O _ _ e39_41
  have d39_42 := HeatV.sub_nn K O _ _ e39_42
  have d39_43 := HeatV.sub_nn K O _ _ e39_43
  have d39_44 := HeatV.sub_nn K O _ _ e39_44
  have d39_45 := HeatV.sub_nn K O _ _ e39_45
  have d39_46 := HeatV.sub_nn K O _ _ e39_46
  have d39_47 := HeatV.sub_nn K O _ _ e39_47
  have d39_48 := HeatV.sub_nn K O _ _ e39_48
  have d39_49 := HeatV.sub_nn K O _ _ e39_49
  have d39_50 := HeatV.sub_nn K O _ _ e39_50
  have d39_51 := HeatV.sub_nn K O _ _ e39_51
  have d40_41 := HeatV.sub_nn K O _ _ e40_41
  have d40_42 := HeatV.sub_nn K O _ _ e40_42
  have d40_43 := HeatV.sub_nn K O _ _ e40_43
  have d40_44 := HeatV.sub_nn K O _ _ e40_44
  have d40_45 := HeatV.sub_nn K O _ _ e40_45
  have d40_46 := HeatV.sub_nn K O _ _ e40_46
  have d40_47 := HeatV.sub_nn K O _ _ e40_47
  have d40_48 := HeatV.sub_nn K O _ _ e40_48
  have d40_49 := HeatV.sub_nn K O _ _ e40_49
  have d40_50 := HeatV.sub_nn K O _ _ e40_50
  have d41_42 := HeatV.sub_nn K O _ _ e41_42
  have d41_43 := HeatV.sub_nn K O _ _ e41_43
  have d41_44 := HeatV.sub_nn K O _ _ e41_44
  have d41_45 := HeatV.sub_nn K O _ _ e41_45
  have d41_46 := HeatV.sub_nn K O _ _ e41_46
  have d41_47 := HeatV.sub_nn K O _ _ e41_47
  have d41_48 := HeatV.sub_nn K O _ _ e41_48
  have d41_49 := HeatV.sub_nn K O _ _ e41_49
  have d41_50 := HeatV.sub_nn K O _ _ e41_50
  have d41_51 := HeatV.sub_nn K O _ _ e41_51
  have d42_43 := HeatV.sub_nn K O _ _ e42_43
  have d42_44 := HeatV.sub_nn K O _ _ e42_44
  have d42_45 := HeatV.sub_nn K O _ _ e42_45
  have d42_46 := HeatV.sub_nn K O _ _ e42_46
  have d42_47 := HeatV.sub_nn K O _ _ e42_47
  have d42_48 := HeatV.sub_nn K O _ _ e42_48
  have d42_49 := HeatV.sub_nn K O _ _ e42_49
  have d42_50 := HeatV.sub_nn K O _ _ e42_50
  have d42_51 := HeatV.sub_nn K O _ _ e42_51
  have d43_44 := HeatV.sub_nn K O _ _ e43_44
  have d43_45 := HeatV.sub_nn K O _ _ e43_45
  have d43_46 := HeatV.sub_nn K O _ _ e43_46
  have d43_47 := HeatV.sub_nn K O _ _ e43_47
  have d43_48 := HeatV.sub_nn K O _ _ e43_48
  have d43_49 := HeatV.sub_nn K O _ _ e43_49
  have d43_50 := HeatV.sub_nn K O _ _ e43_50
  have d43_51 := HeatV.sub_nn K O _ _ e43_51
  have d44_45 := HeatV.sub_nn K O _ _ e44_45
  have d44_46 := HeatV.sub_nn K O _ _ e44_46
  have d44_47 := HeatV.sub_nn K O _ _ e44_47
  have d44_48 := HeatV.sub_nn K O _ _ e44_48
  have d44_49 := HeatV.sub_nn K O _ _ e44_49
  have d44_50 := HeatV.sub_nn K O _ _ e44_50
  have d45_46 := HeatV.sub_nn K O _ _ e45_46
  have d45_47 := HeatV.sub_nn K O _ _ e45_47
  have d45_48 := HeatV.sub_nn K O _ _ e45_48
  have d45_49 := HeatV.sub_nn K O _ _ e45_49
  have d45_50 := HeatV.sub_nn K O _ _ e45_50
  have d45_51 := HeatV.sub_nn K O _ _ e45_51
  have d46_47 := HeatV.sub_nn K O _ _ e46_47
  have d46_48 := HeatV.sub_nn K O _ _ e46_48
  have d46_49 := HeatV.sub_nn K O _ _ e46_49
  have d46_50 := HeatV.sub_nn K O _ _ e46_50
  have d46_51 := HeatV.sub_nn K O _ _ e46_51
  have d47_48 := HeatV.sub_nn K O _ _ e47_48
  have d47_49 := HeatV.sub_nn K O _ _ e47_49
  have d47_50 := HeatV.sub_nn K O _ _ e47_50
  have d47_51 := HeatV.sub_nn K O _ _ e47_51
  have d48_49 := HeatV.sub_nn K O _ _ e48_49
  have d48_50 := HeatV.sub_nn K O _ _ e48_50
  have d48_51 := HeatV.sub_nn K O _ _ e48_51
  have d49_50 := HeatV.sub_nn K O _ _ e49_50
  have d49_51 := HeatV.sub_nn K O _ _ e49_51
  have d50_51 := HeatV.sub_nn K O _ _ e50_51
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+229719 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 615238416) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (  -- (+5817 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..52, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 52 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 615238416) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.  -- (+6413 chars; full line in the Zenodo source)
      (K.mul (cN K 614581110) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul  -- (+6413 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (A 37) (A 38) (A 39) (A 40) (A 41) (A 42) (A 43) (A 44) (A 45) (A 46) (A 47) (A 48) (A 49) (A 50) (A 51) (A 52) (hnn 0) (hnn 1) (hnn 2)   -- (+442 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 52 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 52 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 52 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 52 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 52 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 52 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 52 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+72929 chars; full line in the Zenodo source)

end G61Lv51

#print axioms G61Lv51.add_nn
#print axioms G61Lv51.level
#print axioms G61Lv51.level_fun

ym/G61Lv53.lean

lean_all/ym/G61Lv53.lean

/-
  ym/G61Lv53 — T45, G61a at level n = 53 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv53

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxHeartbeats 0 in
set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 a42 a43 a44 a45 a46 a47 a48 a49 a50 a51 a52 a53 a54 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.  -- (+1154 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+66756 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 768398400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.  -- (+6029 chars; full line in the Zenodo source)
      (K.mul (cN K 767636100) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add  -- (+6032 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_29 := HeatV.sub_nn K O _ _ e0_29
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_32 := HeatV.sub_nn K O _ _ e0_32
  have d0_33 := HeatV.sub_nn K O _ _ e0_33
  have d0_34 := HeatV.sub_nn K O _ _ e0_34
  have d0_36 := HeatV.sub_nn K O _ _ e0_36
  have d0_38 := HeatV.sub_nn K O _ _ e0_38
  have d0_39 := HeatV.sub_nn K O _ _ e0_39
  have d0_40 := HeatV.sub_nn K O _ _ e0_40
  have d0_41 := HeatV.sub_nn K O _ _ e0_41
  have d0_42 := HeatV.sub_nn K O _ _ e0_42
  have d0_43 := HeatV.sub_nn K O _ _ e0_43
  have d0_44 := HeatV.sub_nn K O _ _ e0_44
  have d0_45 := HeatV.sub_nn K O _ _ e0_45
  have d0_48 := HeatV.sub_nn K O _ _ e0_48
  have d0_49 := HeatV.sub_nn K O _ _ e0_49
  have d0_50 := HeatV.sub_nn K O _ _ e0_50
  have d0_53 := HeatV.sub_nn K O _ _ e0_53
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_29 := HeatV.sub_nn K O _ _ e1_29
  have d1_30 := HeatV.sub_nn K O _ _ e1_30
  have d1_31 := HeatV.sub_nn K O _ _ e1_31
  have d1_32 := HeatV.sub_nn K O _ _ e1_32
  have d1_33 := HeatV.sub_nn K O _ _ e1_33
  have d1_34 := HeatV.sub_nn K O _ _ e1_34
  have d1_35 := HeatV.sub_nn K O _ _ e1_35
  have d1_36 := HeatV.sub_nn K O _ _ e1_36
  have d1_37 := HeatV.sub_nn K O _ _ e1_37
  have d1_38 := HeatV.sub_nn K O _ _ e1_38
  have d1_39 := HeatV.sub_nn K O _ _ e1_39
  have d1_40 := HeatV.sub_nn K O _ _ e1_40
  have d1_41 := HeatV.sub_nn K O _ _ e1_41
  have d1_42 := HeatV.sub_nn K O _ _ e1_42
  have d1_43 := HeatV.sub_nn K O _ _ e1_43
  have d1_44 := HeatV.sub_nn K O _ _ e1_44
  have d1_45 := HeatV.sub_nn K O _ _ e1_45
  have d1_46 := HeatV.sub_nn K O _ _ e1_46
  have d1_47 := HeatV.sub_nn K O _ _ e1_47
  have d1_48 := HeatV.sub_nn K O _ _ e1_48
  have d1_49 := HeatV.sub_nn K O _ _ e1_49
  have d1_50 := HeatV.sub_nn K O _ _ e1_50
  have d1_52 := HeatV.sub_nn K O _ _ e1_52
  have d1_53 := HeatV.sub_nn K O _ _ e1_53
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_33 := HeatV.sub_nn K O _ _ e2_33
  have d2_34 := HeatV.sub_nn K O _ _ e2_34
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d2_36 := HeatV.sub_nn K O _ _ e2_36
  have d2_38 := HeatV.sub_nn K O _ _ e2_38
  have d2_39 := HeatV.sub_nn K O _ _ e2_39
  have d2_42 := HeatV.sub_nn K O _ _ e2_42
  have d2_45 := HeatV.sub_nn K O _ _ e2_45
  have d2_47 := HeatV.sub_nn K O _ _ e2_47
  have d2_48 := HeatV.sub_nn K O _ _ e2_48
  have d2_49 := HeatV.sub_nn K O _ _ e2_49
  have d2_50 := HeatV.sub_nn K O _ _ e2_50
  have d2_51 := HeatV.sub_nn K O _ _ e2_51
  have d2_52 := HeatV.sub_nn K O _ _ e2_52
  have d2_53 := HeatV.sub_nn K O _ _ e2_53
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d3_34 := HeatV.sub_nn K O _ _ e3_34
  have d3_35 := HeatV.sub_nn K O _ _ e3_35
  have d3_36 := HeatV.sub_nn K O _ _ e3_36
  have d3_37 := HeatV.sub_nn K O _ _ e3_37
  have d3_38 := HeatV.sub_nn K O _ _ e3_38
  have d3_39 := HeatV.sub_nn K O _ _ e3_39
  have d3_40 := HeatV.sub_nn K O _ _ e3_40
  have d3_41 := HeatV.sub_nn K O _ _ e3_41
  have d3_42 := HeatV.sub_nn K O _ _ e3_42
  have d3_43 := HeatV.sub_nn K O _ _ e3_43
  have d3_44 := HeatV.sub_nn K O _ _ e3_44
  have d3_45 := HeatV.sub_nn K O _ _ e3_45
  have d3_46 := HeatV.sub_nn K O _ _ e3_46
  have d3_47 := HeatV.sub_nn K O _ _ e3_47
  have d3_48 := HeatV.sub_nn K O _ _ e3_48
  have d3_50 := HeatV.sub_nn K O _ _ e3_50
  have d3_51 := HeatV.sub_nn K O _ _ e3_51
  have d3_52 := HeatV.sub_nn K O _ _ e3_52
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d4_34 := HeatV.sub_nn K O _ _ e4_34
  have d4_35 := HeatV.sub_nn K O _ _ e4_35
  have d4_36 := HeatV.sub_nn K O _ _ e4_36
  have d4_37 := HeatV.sub_nn K O _ _ e4_37
  have d4_38 := HeatV.sub_nn K O _ _ e4_38
  have d4_39 := HeatV.sub_nn K O _ _ e4_39
  have d4_40 := HeatV.sub_nn K O _ _ e4_40
  have d4_41 := HeatV.sub_nn K O _ _ e4_41
  have d4_42 := HeatV.sub_nn K O _ _ e4_42
  have d4_43 := HeatV.sub_nn K O _ _ e4_43
  have d4_44 := HeatV.sub_nn K O _ _ e4_44
  have d4_45 := HeatV.sub_nn K O _ _ e4_45
  have d4_46 := HeatV.sub_nn K O _ _ e4_46
  have d4_47 := HeatV.sub_nn K O _ _ e4_47
  have d4_48 := HeatV.sub_nn K O _ _ e4_48
  have d4_49 := HeatV.sub_nn K O _ _ e4_49
  have d4_50 := HeatV.sub_nn K O _ _ e4_50
  have d4_51 := HeatV.sub_nn K O _ _ e4_51
  have d4_52 := HeatV.sub_nn K O _ _ e4_52
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d5_33 := HeatV.sub_nn K O _ _ e5_33
  have d5_34 := HeatV.sub_nn K O _ _ e5_34
  have d5_35 := HeatV.sub_nn K O _ _ e5_35
  have d5_36 := HeatV.sub_nn K O _ _ e5_36
  have d5_37 := HeatV.sub_nn K O _ _ e5_37
  have d5_38 := HeatV.sub_nn K O _ _ e5_38
  have d5_39 := HeatV.sub_nn K O _ _ e5_39
  have d5_40 := HeatV.sub_nn K O _ _ e5_40
  have d5_41 := HeatV.sub_nn K O _ _ e5_41
  have d5_42 := HeatV.sub_nn K O _ _ e5_42
  have d5_43 := HeatV.sub_nn K O _ _ e5_43
  have d5_45 := HeatV.sub_nn K O _ _ e5_45
  have d5_46 := HeatV.sub_nn K O _ _ e5_46
  have d5_48 := HeatV.sub_nn K O _ _ e5_48
  have d5_49 := HeatV.sub_nn K O _ _ e5_49
  have d5_50 := HeatV.sub_nn K O _ _ e5_50
  have d5_51 := HeatV.sub_nn K O _ _ e5_51
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d6_33 := HeatV.sub_nn K O _ _ e6_33
  have d6_34 := HeatV.sub_nn K O _ _ e6_34
  have d6_35 := HeatV.sub_nn K O _ _ e6_35
  have d6_36 := HeatV.sub_nn K O _ _ e6_36
  have d6_38 := HeatV.sub_nn K O _ _ e6_38
  have d6_39 := HeatV.sub_nn K O _ _ e6_39
  have d6_40 := HeatV.sub_nn K O _ _ e6_40
  have d6_41 := HeatV.sub_nn K O _ _ e6_41
  have d6_42 := HeatV.sub_nn K O _ _ e6_42
  have d6_43 := HeatV.sub_nn K O _ _ e6_43
  have d6_45 := HeatV.sub_nn K O _ _ e6_45
  have d6_47 := HeatV.sub_nn K O _ _ e6_47
  have d6_48 := HeatV.sub_nn K O _ _ e6_48
  have d6_49 := HeatV.sub_nn K O _ _ e6_49
  have d6_50 := HeatV.sub_nn K O _ _ e6_50
  have d6_51 := HeatV.sub_nn K O _ _ e6_51
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d7_33 := HeatV.sub_nn K O _ _ e7_33
  have d7_34 := HeatV.sub_nn K O _ _ e7_34
  have d7_35 := HeatV.sub_nn K O _ _ e7_35
  have d7_36 := HeatV.sub_nn K O _ _ e7_36
  have d7_37 := HeatV.sub_nn K O _ _ e7_37
  have d7_38 := HeatV.sub_nn K O _ _ e7_38
  have d7_39 := HeatV.sub_nn K O _ _ e7_39
  have d7_40 := HeatV.sub_nn K O _ _ e7_40
  have d7_41 := HeatV.sub_nn K O _ _ e7_41
  have d7_42 := HeatV.sub_nn K O _ _ e7_42
  have d7_43 := HeatV.sub_nn K O _ _ e7_43
  have d7_44 := HeatV.sub_nn K O _ _ e7_44
  have d7_46 := HeatV.sub_nn K O _ _ e7_46
  have d7_47 := HeatV.sub_nn K O _ _ e7_47
  have d7_48 := HeatV.sub_nn K O _ _ e7_48
  have d7_49 := HeatV.sub_nn K O _ _ e7_49
  have d7_50 := HeatV.sub_nn K O _ _ e7_50
  have d7_51 := HeatV.sub_nn K O _ _ e7_51
  have d7_52 := HeatV.sub_nn K O _ _ e7_52
  have d7_53 := HeatV.sub_nn K O _ _ e7_53
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_32 := HeatV.sub_nn K O _ _ e8_32
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_34 := HeatV.sub_nn K O _ _ e8_34
  have d8_35 := HeatV.sub_nn K O _ _ e8_35
  have d8_36 := HeatV.sub_nn K O _ _ e8_36
  have d8_37 := HeatV.sub_nn K O _ _ e8_37
  have d8_38 := HeatV.sub_nn K O _ _ e8_38
  have d8_39 := HeatV.sub_nn K O _ _ e8_39
  have d8_40 := HeatV.sub_nn K O _ _ e8_40
  have d8_41 := HeatV.sub_nn K O _ _ e8_41
  have d8_42 := HeatV.sub_nn K O _ _ e8_42
  have d8_43 := HeatV.sub_nn K O _ _ e8_43
  have d8_45 := HeatV.sub_nn K O _ _ e8_45
  have d8_46 := HeatV.sub_nn K O _ _ e8_46
  have d8_47 := HeatV.sub_nn K O _ _ e8_47
  have d8_48 := HeatV.sub_nn K O _ _ e8_48
  have d8_49 := HeatV.sub_nn K O _ _ e8_49
  have d8_51 := HeatV.sub_nn K O _ _ e8_51
  have d8_52 := HeatV.sub_nn K O _ _ e8_52
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d9_34 := HeatV.sub_nn K O _ _ e9_34
  have d9_35 := HeatV.sub_nn K O _ _ e9_35
  have d9_36 := HeatV.sub_nn K O _ _ e9_36
  have d9_37 := HeatV.sub_nn K O _ _ e9_37
  have d9_38 := HeatV.sub_nn K O _ _ e9_38
  have d9_39 := HeatV.sub_nn K O _ _ e9_39
  have d9_40 := HeatV.sub_nn K O _ _ e9_40
  have d9_41 := HeatV.sub_nn K O _ _ e9_41
  have d9_42 := HeatV.sub_nn K O _ _ e9_42
  have d9_44 := HeatV.sub_nn K O _ _ e9_44
  have d9_45 := HeatV.sub_nn K O _ _ e9_45
  have d9_46 := HeatV.sub_nn K O _ _ e9_46
  have d9_47 := HeatV.sub_nn K O _ _ e9_47
  have d9_48 := HeatV.sub_nn K O _ _ e9_48
  have d9_49 := HeatV.sub_nn K O _ _ e9_49
  have d9_50 := HeatV.sub_nn K O _ _ e9_50
  have d9_51 := HeatV.sub_nn K O _ _ e9_51
  have d9_52 := HeatV.sub_nn K O _ _ e9_52
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_34 := HeatV.sub_nn K O _ _ e10_34
  have d10_35 := HeatV.sub_nn K O _ _ e10_35
  have d10_36 := HeatV.sub_nn K O _ _ e10_36
  have d10_37 := HeatV.sub_nn K O _ _ e10_37
  have d10_38 := HeatV.sub_nn K O _ _ e10_38
  have d10_39 := HeatV.sub_nn K O _ _ e10_39
  have d10_40 := HeatV.sub_nn K O _ _ e10_40
  have d10_41 := HeatV.sub_nn K O _ _ e10_41
  have d10_43 := HeatV.sub_nn K O _ _ e10_43
  have d10_44 := HeatV.sub_nn K O _ _ e10_44
  have d10_45 := HeatV.sub_nn K O _ _ e10_45
  have d10_46 := HeatV.sub_nn K O _ _ e10_46
  have d10_47 := HeatV.sub_nn K O _ _ e10_47
  have d10_48 := HeatV.sub_nn K O _ _ e10_48
  have d10_49 := HeatV.sub_nn K O _ _ e10_49
  have d10_50 := HeatV.sub_nn K O _ _ e10_50
  have d10_51 := HeatV.sub_nn K O _ _ e10_51
  have d10_52 := HeatV.sub_nn K O _ _ e10_52
  have d10_53 := HeatV.sub_nn K O _ _ e10_53
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d11_33 := HeatV.sub_nn K O _ _ e11_33
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d11_35 := HeatV.sub_nn K O _ _ e11_35
  have d11_36 := HeatV.sub_nn K O _ _ e11_36
  have d11_37 := HeatV.sub_nn K O _ _ e11_37
  have d11_38 := HeatV.sub_nn K O _ _ e11_38
  have d11_39 := HeatV.sub_nn K O _ _ e11_39
  have d11_40 := HeatV.sub_nn K O _ _ e11_40
  have d11_41 := HeatV.sub_nn K O _ _ e11_41
  have d11_42 := HeatV.sub_nn K O _ _ e11_42
  have d11_43 := HeatV.sub_nn K O _ _ e11_43
  have d11_44 := HeatV.sub_nn K O _ _ e11_44
  have d11_45 := HeatV.sub_nn K O _ _ e11_45
  have d11_46 := HeatV.sub_nn K O _ _ e11_46
  have d11_47 := HeatV.sub_nn K O _ _ e11_47
  have d11_48 := HeatV.sub_nn K O _ _ e11_48
  have d11_49 := HeatV.sub_nn K O _ _ e11_49
  have d11_50 := HeatV.sub_nn K O _ _ e11_50
  have d11_51 := HeatV.sub_nn K O _ _ e11_51
  have d11_52 := HeatV.sub_nn K O _ _ e11_52
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d12_34 := HeatV.sub_nn K O _ _ e12_34
  have d12_35 := HeatV.sub_nn K O _ _ e12_35
  have d12_36 := HeatV.sub_nn K O _ _ e12_36
  have d12_38 := HeatV.sub_nn K O _ _ e12_38
  have d12_39 := HeatV.sub_nn K O _ _ e12_39
  have d12_41 := HeatV.sub_nn K O _ _ e12_41
  have d12_42 := HeatV.sub_nn K O _ _ e12_42
  have d12_43 := HeatV.sub_nn K O _ _ e12_43
  have d12_44 := HeatV.sub_nn K O _ _ e12_44
  have d12_45 := HeatV.sub_nn K O _ _ e12_45
  have d12_46 := HeatV.sub_nn K O _ _ e12_46
  have d12_47 := HeatV.sub_nn K O _ _ e12_47
  have d12_48 := HeatV.sub_nn K O _ _ e12_48
  have d12_49 := HeatV.sub_nn K O _ _ e12_49
  have d12_51 := HeatV.sub_nn K O _ _ e12_51
  have d12_52 := HeatV.sub_nn K O _ _ e12_52
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_33 := HeatV.sub_nn K O _ _ e13_33
  have d13_34 := HeatV.sub_nn K O _ _ e13_34
  have d13_35 := HeatV.sub_nn K O _ _ e13_35
  have d13_36 := HeatV.sub_nn K O _ _ e13_36
  have d13_37 := HeatV.sub_nn K O _ _ e13_37
  have d13_38 := HeatV.sub_nn K O _ _ e13_38
  have d13_39 := HeatV.sub_nn K O _ _ e13_39
  have d13_40 := HeatV.sub_nn K O _ _ e13_40
  have d13_41 := HeatV.sub_nn K O _ _ e13_41
  have d13_42 := HeatV.sub_nn K O _ _ e13_42
  have d13_43 := HeatV.sub_nn K O _ _ e13_43
  have d13_44 := HeatV.sub_nn K O _ _ e13_44
  have d13_45 := HeatV.sub_nn K O _ _ e13_45
  have d13_46 := HeatV.sub_nn K O _ _ e13_46
  have d13_47 := HeatV.sub_nn K O _ _ e13_47
  have d13_48 := HeatV.sub_nn K O _ _ e13_48
  have d13_49 := HeatV.sub_nn K O _ _ e13_49
  have d13_50 := HeatV.sub_nn K O _ _ e13_50
  have d13_51 := HeatV.sub_nn K O _ _ e13_51
  have d13_52 := HeatV.sub_nn K O _ _ e13_52
  have d13_53 := HeatV.sub_nn K O _ _ e13_53
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d14_33 := HeatV.sub_nn K O _ _ e14_33
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d14_35 := HeatV.sub_nn K O _ _ e14_35
  have d14_36 := HeatV.sub_nn K O _ _ e14_36
  have d14_37 := HeatV.sub_nn K O _ _ e14_37
  have d14_38 := HeatV.sub_nn K O _ _ e14_38
  have d14_39 := HeatV.sub_nn K O _ _ e14_39
  have d14_40 := HeatV.sub_nn K O _ _ e14_40
  have d14_41 := HeatV.sub_nn K O _ _ e14_41
  have d14_42 := HeatV.sub_nn K O _ _ e14_42
  have d14_43 := HeatV.sub_nn K O _ _ e14_43
  have d14_44 := HeatV.sub_nn K O _ _ e14_44
  have d14_45 := HeatV.sub_nn K O _ _ e14_45
  have d14_46 := HeatV.sub_nn K O _ _ e14_46
  have d14_47 := HeatV.sub_nn K O _ _ e14_47
  have d14_48 := HeatV.sub_nn K O _ _ e14_48
  have d14_49 := HeatV.sub_nn K O _ _ e14_49
  have d14_50 := HeatV.sub_nn K O _ _ e14_50
  have d14_51 := HeatV.sub_nn K O _ _ e14_51
  have d14_52 := HeatV.sub_nn K O _ _ e14_52
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_35 := HeatV.sub_nn K O _ _ e15_35
  have d15_36 := HeatV.sub_nn K O _ _ e15_36
  have d15_38 := HeatV.sub_nn K O _ _ e15_38
  have d15_39 := HeatV.sub_nn K O _ _ e15_39
  have d15_41 := HeatV.sub_nn K O _ _ e15_41
  have d15_42 := HeatV.sub_nn K O _ _ e15_42
  have d15_43 := HeatV.sub_nn K O _ _ e15_43
  have d15_44 := HeatV.sub_nn K O _ _ e15_44
  have d15_45 := HeatV.sub_nn K O _ _ e15_45
  have d15_46 := HeatV.sub_nn K O _ _ e15_46
  have d15_47 := HeatV.sub_nn K O _ _ e15_47
  have d15_48 := HeatV.sub_nn K O _ _ e15_48
  have d15_49 := HeatV.sub_nn K O _ _ e15_49
  have d15_50 := HeatV.sub_nn K O _ _ e15_50
  have d15_51 := HeatV.sub_nn K O _ _ e15_51
  have d15_52 := HeatV.sub_nn K O _ _ e15_52
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d16_37 := HeatV.sub_nn K O _ _ e16_37
  have d16_38 := HeatV.sub_nn K O _ _ e16_38
  have d16_39 := HeatV.sub_nn K O _ _ e16_39
  have d16_40 := HeatV.sub_nn K O _ _ e16_40
  have d16_41 := HeatV.sub_nn K O _ _ e16_41
  have d16_42 := HeatV.sub_nn K O _ _ e16_42
  have d16_43 := HeatV.sub_nn K O _ _ e16_43
  have d16_44 := HeatV.sub_nn K O _ _ e16_44
  have d16_45 := HeatV.sub_nn K O _ _ e16_45
  have d16_46 := HeatV.sub_nn K O _ _ e16_46
  have d16_47 := HeatV.sub_nn K O _ _ e16_47
  have d16_48 := HeatV.sub_nn K O _ _ e16_48
  have d16_49 := HeatV.sub_nn K O _ _ e16_49
  have d16_50 := HeatV.sub_nn K O _ _ e16_50
  have d16_51 := HeatV.sub_nn K O _ _ e16_51
  have d16_52 := HeatV.sub_nn K O _ _ e16_52
  have d16_53 := HeatV.sub_nn K O _ _ e16_53
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_34 := HeatV.sub_nn K O _ _ e17_34
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d17_36 := HeatV.sub_nn K O _ _ e17_36
  have d17_37 := HeatV.sub_nn K O _ _ e17_37
  have d17_38 := HeatV.sub_nn K O _ _ e17_38
  have d17_39 := HeatV.sub_nn K O _ _ e17_39
  have d17_40 := HeatV.sub_nn K O _ _ e17_40
  have d17_41 := HeatV.sub_nn K O _ _ e17_41
  have d17_42 := HeatV.sub_nn K O _ _ e17_42
  have d17_43 := HeatV.sub_nn K O _ _ e17_43
  have d17_44 := HeatV.sub_nn K O _ _ e17_44
  have d17_45 := HeatV.sub_nn K O _ _ e17_45
  have d17_46 := HeatV.sub_nn K O _ _ e17_46
  have d17_47 := HeatV.sub_nn K O _ _ e17_47
  have d17_48 := HeatV.sub_nn K O _ _ e17_48
  have d17_49 := HeatV.sub_nn K O _ _ e17_49
  have d17_50 := HeatV.sub_nn K O _ _ e17_50
  have d17_51 := HeatV.sub_nn K O _ _ e17_51
  have d17_52 := HeatV.sub_nn K O _ _ e17_52
  have d17_53 := HeatV.sub_nn K O _ _ e17_53
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d18_35 := HeatV.sub_nn K O _ _ e18_35
  have d18_36 := HeatV.sub_nn K O _ _ e18_36
  have d18_37 := HeatV.sub_nn K O _ _ e18_37
  have d18_38 := HeatV.sub_nn K O _ _ e18_38
  have d18_39 := HeatV.sub_nn K O _ _ e18_39
  have d18_40 := HeatV.sub_nn K O _ _ e18_40
  have d18_41 := HeatV.sub_nn K O _ _ e18_41
  have d18_42 := HeatV.sub_nn K O _ _ e18_42
  have d18_43 := HeatV.sub_nn K O _ _ e18_43
  have d18_44 := HeatV.sub_nn K O _ _ e18_44
  have d18_45 := HeatV.sub_nn K O _ _ e18_45
  have d18_46 := HeatV.sub_nn K O _ _ e18_46
  have d18_47 := HeatV.sub_nn K O _ _ e18_47
  have d18_48 := HeatV.sub_nn K O _ _ e18_48
  have d18_49 := HeatV.sub_nn K O _ _ e18_49
  have d18_50 := HeatV.sub_nn K O _ _ e18_50
  have d18_51 := HeatV.sub_nn K O _ _ e18_51
  have d18_52 := HeatV.sub_nn K O _ _ e18_52
  have d18_53 := HeatV.sub_nn K O _ _ e18_53
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_30 := HeatV.sub_nn K O _ _ e19_30
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_34 := HeatV.sub_nn K O _ _ e19_34
  have d19_35 := HeatV.sub_nn K O _ _ e19_35
  have d19_36 := HeatV.sub_nn K O _ _ e19_36
  have d19_37 := HeatV.sub_nn K O _ _ e19_37
  have d19_38 := HeatV.sub_nn K O _ _ e19_38
  have d19_39 := HeatV.sub_nn K O _ _ e19_39
  have d19_40 := HeatV.sub_nn K O _ _ e19_40
  have d19_41 := HeatV.sub_nn K O _ _ e19_41
  have d19_42 := HeatV.sub_nn K O _ _ e19_42
  have d19_43 := HeatV.sub_nn K O _ _ e19_43
  have d19_44 := HeatV.sub_nn K O _ _ e19_44
  have d19_45 := HeatV.sub_nn K O _ _ e19_45
  have d19_46 := HeatV.sub_nn K O _ _ e19_46
  have d19_47 := HeatV.sub_nn K O _ _ e19_47
  have d19_48 := HeatV.sub_nn K O _ _ e19_48
  have d19_49 := HeatV.sub_nn K O _ _ e19_49
  have d19_50 := HeatV.sub_nn K O _ _ e19_50
  have d19_51 := HeatV.sub_nn K O _ _ e19_51
  have d19_52 := HeatV.sub_nn K O _ _ e19_52
  have d19_53 := HeatV.sub_nn K O _ _ e19_53
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_34 := HeatV.sub_nn K O _ _ e20_34
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d20_36 := HeatV.sub_nn K O _ _ e20_36
  have d20_37 := HeatV.sub_nn K O _ _ e20_37
  have d20_38 := HeatV.sub_nn K O _ _ e20_38
  have d20_39 := HeatV.sub_nn K O _ _ e20_39
  have d20_40 := HeatV.sub_nn K O _ _ e20_40
  have d20_41 := HeatV.sub_nn K O _ _ e20_41
  have d20_42 := HeatV.sub_nn K O _ _ e20_42
  have d20_43 := HeatV.sub_nn K O _ _ e20_43
  have d20_44 := HeatV.sub_nn K O _ _ e20_44
  have d20_45 := HeatV.sub_nn K O _ _ e20_45
  have d20_46 := HeatV.sub_nn K O _ _ e20_46
  have d20_47 := HeatV.sub_nn K O _ _ e20_47
  have d20_48 := HeatV.sub_nn K O _ _ e20_48
  have d20_49 := HeatV.sub_nn K O _ _ e20_49
  have d20_50 := HeatV.sub_nn K O _ _ e20_50
  have d20_51 := HeatV.sub_nn K O _ _ e20_51
  have d20_52 := HeatV.sub_nn K O _ _ e20_52
  have d20_53 := HeatV.sub_nn K O _ _ e20_53
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d21_35 := HeatV.sub_nn K O _ _ e21_35
  have d21_36 := HeatV.sub_nn K O _ _ e21_36
  have d21_37 := HeatV.sub_nn K O _ _ e21_37
  have d21_38 := HeatV.sub_nn K O _ _ e21_38
  have d21_39 := HeatV.sub_nn K O _ _ e21_39
  have d21_40 := HeatV.sub_nn K O _ _ e21_40
  have d21_41 := HeatV.sub_nn K O _ _ e21_41
  have d21_42 := HeatV.sub_nn K O _ _ e21_42
  have d21_43 := HeatV.sub_nn K O _ _ e21_43
  have d21_44 := HeatV.sub_nn K O _ _ e21_44
  have d21_45 := HeatV.sub_nn K O _ _ e21_45
  have d21_46 := HeatV.sub_nn K O _ _ e21_46
  have d21_47 := HeatV.sub_nn K O _ _ e21_47
  have d21_48 := HeatV.sub_nn K O _ _ e21_48
  have d21_49 := HeatV.sub_nn K O _ _ e21_49
  have d21_50 := HeatV.sub_nn K O _ _ e21_50
  have d21_51 := HeatV.sub_nn K O _ _ e21_51
  have d21_52 := HeatV.sub_nn K O _ _ e21_52
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d22_36 := HeatV.sub_nn K O _ _ e22_36
  have d22_37 := HeatV.sub_nn K O _ _ e22_37
  have d22_38 := HeatV.sub_nn K O _ _ e22_38
  have d22_39 := HeatV.sub_nn K O _ _ e22_39
  have d22_40 := HeatV.sub_nn K O _ _ e22_40
  have d22_41 := HeatV.sub_nn K O _ _ e22_41
  have d22_42 := HeatV.sub_nn K O _ _ e22_42
  have d22_43 := HeatV.sub_nn K O _ _ e22_43
  have d22_44 := HeatV.sub_nn K O _ _ e22_44
  have d22_45 := HeatV.sub_nn K O _ _ e22_45
  have d22_46 := HeatV.sub_nn K O _ _ e22_46
  have d22_47 := HeatV.sub_nn K O _ _ e22_47
  have d22_48 := HeatV.sub_nn K O _ _ e22_48
  have d22_49 := HeatV.sub_nn K O _ _ e22_49
  have d22_50 := HeatV.sub_nn K O _ _ e22_50
  have d22_51 := HeatV.sub_nn K O _ _ e22_51
  have d22_52 := HeatV.sub_nn K O _ _ e22_52
  have d22_53 := HeatV.sub_nn K O _ _ e22_53
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d23_36 := HeatV.sub_nn K O _ _ e23_36
  have d23_37 := HeatV.sub_nn K O _ _ e23_37
  have d23_38 := HeatV.sub_nn K O _ _ e23_38
  have d23_39 := HeatV.sub_nn K O _ _ e23_39
  have d23_40 := HeatV.sub_nn K O _ _ e23_40
  have d23_41 := HeatV.sub_nn K O _ _ e23_41
  have d23_42 := HeatV.sub_nn K O _ _ e23_42
  have d23_43 := HeatV.sub_nn K O _ _ e23_43
  have d23_44 := HeatV.sub_nn K O _ _ e23_44
  have d23_45 := HeatV.sub_nn K O _ _ e23_45
  have d23_46 := HeatV.sub_nn K O _ _ e23_46
  have d23_47 := HeatV.sub_nn K O _ _ e23_47
  have d23_48 := HeatV.sub_nn K O _ _ e23_48
  have d23_49 := HeatV.sub_nn K O _ _ e23_49
  have d23_50 := HeatV.sub_nn K O _ _ e23_50
  have d23_51 := HeatV.sub_nn K O _ _ e23_51
  have d23_52 := HeatV.sub_nn K O _ _ e23_52
  have d23_53 := HeatV.sub_nn K O _ _ e23_53
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d24_35 := HeatV.sub_nn K O _ _ e24_35
  have d24_36 := HeatV.sub_nn K O _ _ e24_36
  have d24_37 := HeatV.sub_nn K O _ _ e24_37
  have d24_38 := HeatV.sub_nn K O _ _ e24_38
  have d24_39 := HeatV.sub_nn K O _ _ e24_39
  have d24_40 := HeatV.sub_nn K O _ _ e24_40
  have d24_41 := HeatV.sub_nn K O _ _ e24_41
  have d24_42 := HeatV.sub_nn K O _ _ e24_42
  have d24_43 := HeatV.sub_nn K O _ _ e24_43
  have d24_45 := HeatV.sub_nn K O _ _ e24_45
  have d24_46 := HeatV.sub_nn K O _ _ e24_46
  have d24_47 := HeatV.sub_nn K O _ _ e24_47
  have d24_48 := HeatV.sub_nn K O _ _ e24_48
  have d24_49 := HeatV.sub_nn K O _ _ e24_49
  have d24_50 := HeatV.sub_nn K O _ _ e24_50
  have d24_51 := HeatV.sub_nn K O _ _ e24_51
  have d24_52 := HeatV.sub_nn K O _ _ e24_52
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d25_35 := HeatV.sub_nn K O _ _ e25_35
  have d25_36 := HeatV.sub_nn K O _ _ e25_36
  have d25_37 := HeatV.sub_nn K O _ _ e25_37
  have d25_38 := HeatV.sub_nn K O _ _ e25_38
  have d25_39 := HeatV.sub_nn K O _ _ e25_39
  have d25_40 := HeatV.sub_nn K O _ _ e25_40
  have d25_41 := HeatV.sub_nn K O _ _ e25_41
  have d25_42 := HeatV.sub_nn K O _ _ e25_42
  have d25_43 := HeatV.sub_nn K O _ _ e25_43
  have d25_45 := HeatV.sub_nn K O _ _ e25_45
  have d25_47 := HeatV.sub_nn K O _ _ e25_47
  have d25_48 := HeatV.sub_nn K O _ _ e25_48
  have d25_49 := HeatV.sub_nn K O _ _ e25_49
  have d25_50 := HeatV.sub_nn K O _ _ e25_50
  have d25_51 := HeatV.sub_nn K O _ _ e25_51
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d26_36 := HeatV.sub_nn K O _ _ e26_36
  have d26_37 := HeatV.sub_nn K O _ _ e26_37
  have d26_38 := HeatV.sub_nn K O _ _ e26_38
  have d26_39 := HeatV.sub_nn K O _ _ e26_39
  have d26_40 := HeatV.sub_nn K O _ _ e26_40
  have d26_41 := HeatV.sub_nn K O _ _ e26_41
  have d26_42 := HeatV.sub_nn K O _ _ e26_42
  have d26_43 := HeatV.sub_nn K O _ _ e26_43
  have d26_44 := HeatV.sub_nn K O _ _ e26_44
  have d26_45 := HeatV.sub_nn K O _ _ e26_45
  have d26_46 := HeatV.sub_nn K O _ _ e26_46
  have d26_47 := HeatV.sub_nn K O _ _ e26_47
  have d26_48 := HeatV.sub_nn K O _ _ e26_48
  have d26_49 := HeatV.sub_nn K O _ _ e26_49
  have d26_50 := HeatV.sub_nn K O _ _ e26_50
  have d26_51 := HeatV.sub_nn K O _ _ e26_51
  have d26_52 := HeatV.sub_nn K O _ _ e26_52
  have d26_53 := HeatV.sub_nn K O _ _ e26_53
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d27_35 := HeatV.sub_nn K O _ _ e27_35
  have d27_36 := HeatV.sub_nn K O _ _ e27_36
  have d27_37 := HeatV.sub_nn K O _ _ e27_37
  have d27_38 := HeatV.sub_nn K O _ _ e27_38
  have d27_39 := HeatV.sub_nn K O _ _ e27_39
  have d27_40 := HeatV.sub_nn K O _ _ e27_40
  have d27_41 := HeatV.sub_nn K O _ _ e27_41
  have d27_42 := HeatV.sub_nn K O _ _ e27_42
  have d27_43 := HeatV.sub_nn K O _ _ e27_43
  have d27_44 := HeatV.sub_nn K O _ _ e27_44
  have d27_45 := HeatV.sub_nn K O _ _ e27_45
  have d27_46 := HeatV.sub_nn K O _ _ e27_46
  have d27_47 := HeatV.sub_nn K O _ _ e27_47
  have d27_48 := HeatV.sub_nn K O _ _ e27_48
  have d27_49 := HeatV.sub_nn K O _ _ e27_49
  have d27_50 := HeatV.sub_nn K O _ _ e27_50
  have d27_51 := HeatV.sub_nn K O _ _ e27_51
  have d27_52 := HeatV.sub_nn K O _ _ e27_52
  have d27_53 := HeatV.sub_nn K O _ _ e27_53
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d28_35 := HeatV.sub_nn K O _ _ e28_35
  have d28_36 := HeatV.sub_nn K O _ _ e28_36
  have d28_37 := HeatV.sub_nn K O _ _ e28_37
  have d28_38 := HeatV.sub_nn K O _ _ e28_38
  have d28_39 := HeatV.sub_nn K O _ _ e28_39
  have d28_40 := HeatV.sub_nn K O _ _ e28_40
  have d28_41 := HeatV.sub_nn K O _ _ e28_41
  have d28_42 := HeatV.sub_nn K O _ _ e28_42
  have d28_43 := HeatV.sub_nn K O _ _ e28_43
  have d28_44 := HeatV.sub_nn K O _ _ e28_44
  have d28_45 := HeatV.sub_nn K O _ _ e28_45
  have d28_46 := HeatV.sub_nn K O _ _ e28_46
  have d28_47 := HeatV.sub_nn K O _ _ e28_47
  have d28_48 := HeatV.sub_nn K O _ _ e28_48
  have d28_49 := HeatV.sub_nn K O _ _ e28_49
  have d28_50 := HeatV.sub_nn K O _ _ e28_50
  have d28_51 := HeatV.sub_nn K O _ _ e28_51
  have d28_52 := HeatV.sub_nn K O _ _ e28_52
  have d28_53 := HeatV.sub_nn K O _ _ e28_53
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d29_36 := HeatV.sub_nn K O _ _ e29_36
  have d29_37 := HeatV.sub_nn K O _ _ e29_37
  have d29_38 := HeatV.sub_nn K O _ _ e29_38
  have d29_39 := HeatV.sub_nn K O _ _ e29_39
  have d29_40 := HeatV.sub_nn K O _ _ e29_40
  have d29_41 := HeatV.sub_nn K O _ _ e29_41
  have d29_42 := HeatV.sub_nn K O _ _ e29_42
  have d29_43 := HeatV.sub_nn K O _ _ e29_43
  have d29_44 := HeatV.sub_nn K O _ _ e29_44
  have d29_45 := HeatV.sub_nn K O _ _ e29_45
  have d29_46 := HeatV.sub_nn K O _ _ e29_46
  have d29_47 := HeatV.sub_nn K O _ _ e29_47
  have d29_48 := HeatV.sub_nn K O _ _ e29_48
  have d29_49 := HeatV.sub_nn K O _ _ e29_49
  have d29_50 := HeatV.sub_nn K O _ _ e29_50
  have d29_51 := HeatV.sub_nn K O _ _ e29_51
  have d29_52 := HeatV.sub_nn K O _ _ e29_52
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d30_35 := HeatV.sub_nn K O _ _ e30_35
  have d30_36 := HeatV.sub_nn K O _ _ e30_36
  have d30_37 := HeatV.sub_nn K O _ _ e30_37
  have d30_38 := HeatV.sub_nn K O _ _ e30_38
  have d30_39 := HeatV.sub_nn K O _ _ e30_39
  have d30_40 := HeatV.sub_nn K O _ _ e30_40
  have d30_41 := HeatV.sub_nn K O _ _ e30_41
  have d30_42 := HeatV.sub_nn K O _ _ e30_42
  have d30_43 := HeatV.sub_nn K O _ _ e30_43
  have d30_44 := HeatV.sub_nn K O _ _ e30_44
  have d30_45 := HeatV.sub_nn K O _ _ e30_45
  have d30_46 := HeatV.sub_nn K O _ _ e30_46
  have d30_47 := HeatV.sub_nn K O _ _ e30_47
  have d30_48 := HeatV.sub_nn K O _ _ e30_48
  have d30_50 := HeatV.sub_nn K O _ _ e30_50
  have d30_51 := HeatV.sub_nn K O _ _ e30_51
  have d30_52 := HeatV.sub_nn K O _ _ e30_52
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d31_35 := HeatV.sub_nn K O _ _ e31_35
  have d31_36 := HeatV.sub_nn K O _ _ e31_36
  have d31_37 := HeatV.sub_nn K O _ _ e31_37
  have d31_38 := HeatV.sub_nn K O _ _ e31_38
  have d31_39 := HeatV.sub_nn K O _ _ e31_39
  have d31_40 := HeatV.sub_nn K O _ _ e31_40
  have d31_41 := HeatV.sub_nn K O _ _ e31_41
  have d31_42 := HeatV.sub_nn K O _ _ e31_42
  have d31_43 := HeatV.sub_nn K O _ _ e31_43
  have d31_44 := HeatV.sub_nn K O _ _ e31_44
  have d31_45 := HeatV.sub_nn K O _ _ e31_45
  have d31_46 := HeatV.sub_nn K O _ _ e31_46
  have d31_47 := HeatV.sub_nn K O _ _ e31_47
  have d31_48 := HeatV.sub_nn K O _ _ e31_48
  have d31_49 := HeatV.sub_nn K O _ _ e31_49
  have d31_50 := HeatV.sub_nn K O _ _ e31_50
  have d31_51 := HeatV.sub_nn K O _ _ e31_51
  have d31_52 := HeatV.sub_nn K O _ _ e31_52
  have d31_53 := HeatV.sub_nn K O _ _ e31_53
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d32_36 := HeatV.sub_nn K O _ _ e32_36
  have d32_37 := HeatV.sub_nn K O _ _ e32_37
  have d32_38 := HeatV.sub_nn K O _ _ e32_38
  have d32_39 := HeatV.sub_nn K O _ _ e32_39
  have d32_40 := HeatV.sub_nn K O _ _ e32_40
  have d32_41 := HeatV.sub_nn K O _ _ e32_41
  have d32_42 := HeatV.sub_nn K O _ _ e32_42
  have d32_43 := HeatV.sub_nn K O _ _ e32_43
  have d32_44 := HeatV.sub_nn K O _ _ e32_44
  have d32_45 := HeatV.sub_nn K O _ _ e32_45
  have d32_46 := HeatV.sub_nn K O _ _ e32_46
  have d32_47 := HeatV.sub_nn K O _ _ e32_47
  have d32_48 := HeatV.sub_nn K O _ _ e32_48
  have d32_49 := HeatV.sub_nn K O _ _ e32_49
  have d32_50 := HeatV.sub_nn K O _ _ e32_50
  have d32_51 := HeatV.sub_nn K O _ _ e32_51
  have d32_52 := HeatV.sub_nn K O _ _ e32_52
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d33_36 := HeatV.sub_nn K O _ _ e33_36
  have d33_37 := HeatV.sub_nn K O _ _ e33_37
  have d33_38 := HeatV.sub_nn K O _ _ e33_38
  have d33_39 := HeatV.sub_nn K O _ _ e33_39
  have d33_40 := HeatV.sub_nn K O _ _ e33_40
  have d33_41 := HeatV.sub_nn K O _ _ e33_41
  have d33_42 := HeatV.sub_nn K O _ _ e33_42
  have d33_43 := HeatV.sub_nn K O _ _ e33_43
  have d33_44 := HeatV.sub_nn K O _ _ e33_44
  have d33_45 := HeatV.sub_nn K O _ _ e33_45
  have d33_46 := HeatV.sub_nn K O _ _ e33_46
  have d33_47 := HeatV.sub_nn K O _ _ e33_47
  have d33_48 := HeatV.sub_nn K O _ _ e33_48
  have d33_49 := HeatV.sub_nn K O _ _ e33_49
  have d33_50 := HeatV.sub_nn K O _ _ e33_50
  have d33_51 := HeatV.sub_nn K O _ _ e33_51
  have d33_52 := HeatV.sub_nn K O _ _ e33_52
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have d34_36 := HeatV.sub_nn K O _ _ e34_36
  have d34_37 := HeatV.sub_nn K O _ _ e34_37
  have d34_38 := HeatV.sub_nn K O _ _ e34_38
  have d34_39 := HeatV.sub_nn K O _ _ e34_39
  have d34_40 := HeatV.sub_nn K O _ _ e34_40
  have d34_41 := HeatV.sub_nn K O _ _ e34_41
  have d34_42 := HeatV.sub_nn K O _ _ e34_42
  have d34_43 := HeatV.sub_nn K O _ _ e34_43
  have d34_44 := HeatV.sub_nn K O _ _ e34_44
  have d34_45 := HeatV.sub_nn K O _ _ e34_45
  have d34_46 := HeatV.sub_nn K O _ _ e34_46
  have d34_47 := HeatV.sub_nn K O _ _ e34_47
  have d34_48 := HeatV.sub_nn K O _ _ e34_48
  have d34_49 := HeatV.sub_nn K O _ _ e34_49
  have d34_50 := HeatV.sub_nn K O _ _ e34_50
  have d34_51 := HeatV.sub_nn K O _ _ e34_51
  have d34_52 := HeatV.sub_nn K O _ _ e34_52
  have d35_36 := HeatV.sub_nn K O _ _ e35_36
  have d35_37 := HeatV.sub_nn K O _ _ e35_37
  have d35_38 := HeatV.sub_nn K O _ _ e35_38
  have d35_39 := HeatV.sub_nn K O _ _ e35_39
  have d35_40 := HeatV.sub_nn K O _ _ e35_40
  have d35_41 := HeatV.sub_nn K O _ _ e35_41
  have d35_42 := HeatV.sub_nn K O _ _ e35_42
  have d35_43 := HeatV.sub_nn K O _ _ e35_43
  have d35_44 := HeatV.sub_nn K O _ _ e35_44
  have d35_45 := HeatV.sub_nn K O _ _ e35_45
  have d35_46 := HeatV.sub_nn K O _ _ e35_46
  have d35_47 := HeatV.sub_nn K O _ _ e35_47
  have d35_48 := HeatV.sub_nn K O _ _ e35_48
  have d35_49 := HeatV.sub_nn K O _ _ e35_49
  have d35_50 := HeatV.sub_nn K O _ _ e35_50
  have d35_51 := HeatV.sub_nn K O _ _ e35_51
  have d35_52 := HeatV.sub_nn K O _ _ e35_52
  have d35_53 := HeatV.sub_nn K O _ _ e35_53
  have d36_37 := HeatV.sub_nn K O _ _ e36_37
  have d36_38 := HeatV.sub_nn K O _ _ e36_38
  have d36_39 := HeatV.sub_nn K O _ _ e36_39
  have d36_40 := HeatV.sub_nn K O _ _ e36_40
  have d36_41 := HeatV.sub_nn K O _ _ e36_41
  have d36_42 := HeatV.sub_nn K O _ _ e36_42
  have d36_43 := HeatV.sub_nn K O _ _ e36_43
  have d36_44 := HeatV.sub_nn K O _ _ e36_44
  have d36_45 := HeatV.sub_nn K O _ _ e36_45
  have d36_46 := HeatV.sub_nn K O _ _ e36_46
  have d36_47 := HeatV.sub_nn K O _ _ e36_47
  have d36_48 := HeatV.sub_nn K O _ _ e36_48
  have d36_49 := HeatV.sub_nn K O _ _ e36_49
  have d36_50 := HeatV.sub_nn K O _ _ e36_50
  have d36_51 := HeatV.sub_nn K O _ _ e36_51
  have d36_52 := HeatV.sub_nn K O _ _ e36_52
  have d36_53 := HeatV.sub_nn K O _ _ e36_53
  have d37_38 := HeatV.sub_nn K O _ _ e37_38
  have d37_39 := HeatV.sub_nn K O _ _ e37_39
  have d37_40 := HeatV.sub_nn K O _ _ e37_40
  have d37_41 := HeatV.sub_nn K O _ _ e37_41
  have d37_42 := HeatV.sub_nn K O _ _ e37_42
  have d37_43 := HeatV.sub_nn K O _ _ e37_43
  have d37_44 := HeatV.sub_nn K O _ _ e37_44
  have d37_45 := HeatV.sub_nn K O _ _ e37_45
  have d37_46 := HeatV.sub_nn K O _ _ e37_46
  have d37_47 := HeatV.sub_nn K O _ _ e37_47
  have d37_48 := HeatV.sub_nn K O _ _ e37_48
  have d37_49 := HeatV.sub_nn K O _ _ e37_49
  have d37_50 := HeatV.sub_nn K O _ _ e37_50
  have d37_51 := HeatV.sub_nn K O _ _ e37_51
  have d37_52 := HeatV.sub_nn K O _ _ e37_52
  have d37_53 := HeatV.sub_nn K O _ _ e37_53
  have d38_39 := HeatV.sub_nn K O _ _ e38_39
  have d38_40 := HeatV.sub_nn K O _ _ e38_40
  have d38_41 := HeatV.sub_nn K O _ _ e38_41
  have d38_42 := HeatV.sub_nn K O _ _ e38_42
  have d38_43 := HeatV.sub_nn K O _ _ e38_43
  have d38_44 := HeatV.sub_nn K O _ _ e38_44
  have d38_45 := HeatV.sub_nn K O _ _ e38_45
  have d38_46 := HeatV.sub_nn K O _ _ e38_46
  have d38_47 := HeatV.sub_nn K O _ _ e38_47
  have d38_48 := HeatV.sub_nn K O _ _ e38_48
  have d38_49 := HeatV.sub_nn K O _ _ e38_49
  have d38_50 := HeatV.sub_nn K O _ _ e38_50
  have d38_51 := HeatV.sub_nn K O _ _ e38_51
  have d38_52 := HeatV.sub_nn K O _ _ e38_52
  have d38_53 := HeatV.sub_nn K O _ _ e38_53
  have d39_40 := HeatV.sub_nn K O _ _ e39_40
  have d39_41 := HeatV.sub_nn K O _ _ e39_41
  have d39_42 := HeatV.sub_nn K O _ _ e39_42
  have d39_43 := HeatV.sub_nn K O _ _ e39_43
  have d39_44 := HeatV.sub_nn K O _ _ e39_44
  have d39_45 := HeatV.sub_nn K O _ _ e39_45
  have d39_46 := HeatV.sub_nn K O _ _ e39_46
  have d39_47 := HeatV.sub_nn K O _ _ e39_47
  have d39_48 := HeatV.sub_nn K O _ _ e39_48
  have d39_49 := HeatV.sub_nn K O _ _ e39_49
  have d39_50 := HeatV.sub_nn K O _ _ e39_50
  have d39_51 := HeatV.sub_nn K O _ _ e39_51
  have d39_52 := HeatV.sub_nn K O _ _ e39_52
  have d40_41 := HeatV.sub_nn K O _ _ e40_41
  have d40_42 := HeatV.sub_nn K O _ _ e40_42
  have d40_43 := HeatV.sub_nn K O _ _ e40_43
  have d40_44 := HeatV.sub_nn K O _ _ e40_44
  have d40_45 := HeatV.sub_nn K O _ _ e40_45
  have d40_46 := HeatV.sub_nn K O _ _ e40_46
  have d40_47 := HeatV.sub_nn K O _ _ e40_47
  have d40_48 := HeatV.sub_nn K O _ _ e40_48
  have d40_49 := HeatV.sub_nn K O _ _ e40_49
  have d40_50 := HeatV.sub_nn K O _ _ e40_50
  have d40_51 := HeatV.sub_nn K O _ _ e40_51
  have d40_52 := HeatV.sub_nn K O _ _ e40_52
  have d40_53 := HeatV.sub_nn K O _ _ e40_53
  have d41_42 := HeatV.sub_nn K O _ _ e41_42
  have d41_43 := HeatV.sub_nn K O _ _ e41_43
  have d41_44 := HeatV.sub_nn K O _ _ e41_44
  have d41_45 := HeatV.sub_nn K O _ _ e41_45
  have d41_46 := HeatV.sub_nn K O _ _ e41_46
  have d41_47 := HeatV.sub_nn K O _ _ e41_47
  have d41_48 := HeatV.sub_nn K O _ _ e41_48
  have d41_49 := HeatV.sub_nn K O _ _ e41_49
  have d41_50 := HeatV.sub_nn K O _ _ e41_50
  have d41_51 := HeatV.sub_nn K O _ _ e41_51
  have d41_52 := HeatV.sub_nn K O _ _ e41_52
  have d41_53 := HeatV.sub_nn K O _ _ e41_53
  have d42_43 := HeatV.sub_nn K O _ _ e42_43
  have d42_44 := HeatV.sub_nn K O _ _ e42_44
  have d42_45 := HeatV.sub_nn K O _ _ e42_45
  have d42_46 := HeatV.sub_nn K O _ _ e42_46
  have d42_47 := HeatV.sub_nn K O _ _ e42_47
  have d42_48 := HeatV.sub_nn K O _ _ e42_48
  have d42_49 := HeatV.sub_nn K O _ _ e42_49
  have d42_50 := HeatV.sub_nn K O _ _ e42_50
  have d42_51 := HeatV.sub_nn K O _ _ e42_51
  have d42_52 := HeatV.sub_nn K O _ _ e42_52
  have d42_53 := HeatV.sub_nn K O _ _ e42_53
  have d43_44 := HeatV.sub_nn K O _ _ e43_44
  have d43_45 := HeatV.sub_nn K O _ _ e43_45
  have d43_46 := HeatV.sub_nn K O _ _ e43_46
  have d43_47 := HeatV.sub_nn K O _ _ e43_47
  have d43_48 := HeatV.sub_nn K O _ _ e43_48
  have d43_49 := HeatV.sub_nn K O _ _ e43_49
  have d43_50 := HeatV.sub_nn K O _ _ e43_50
  have d43_51 := HeatV.sub_nn K O _ _ e43_51
  have d43_52 := HeatV.sub_nn K O _ _ e43_52
  have d43_53 := HeatV.sub_nn K O _ _ e43_53
  have d44_45 := HeatV.sub_nn K O _ _ e44_45
  have d44_46 := HeatV.sub_nn K O _ _ e44_46
  have d44_47 := HeatV.sub_nn K O _ _ e44_47
  have d44_48 := HeatV.sub_nn K O _ _ e44_48
  have d44_49 := HeatV.sub_nn K O _ _ e44_49
  have d44_50 := HeatV.sub_nn K O _ _ e44_50
  have d44_51 := HeatV.sub_nn K O _ _ e44_51
  have d44_52 := HeatV.sub_nn K O _ _ e44_52
  have d44_53 := HeatV.sub_nn K O _ _ e44_53
  have d45_46 := HeatV.sub_nn K O _ _ e45_46
  have d45_47 := HeatV.sub_nn K O _ _ e45_47
  have d45_48 := HeatV.sub_nn K O _ _ e45_48
  have d45_49 := HeatV.sub_nn K O _ _ e45_49
  have d45_50 := HeatV.sub_nn K O _ _ e45_50
  have d45_51 := HeatV.sub_nn K O _ _ e45_51
  have d45_52 := HeatV.sub_nn K O _ _ e45_52
  have d45_53 := HeatV.sub_nn K O _ _ e45_53
  have d46_47 := HeatV.sub_nn K O _ _ e46_47
  have d46_48 := HeatV.sub_nn K O _ _ e46_48
  have d46_49 := HeatV.sub_nn K O _ _ e46_49
  have d46_50 := HeatV.sub_nn K O _ _ e46_50
  have d46_51 := HeatV.sub_nn K O _ _ e46_51
  have d46_52 := HeatV.sub_nn K O _ _ e46_52
  have d46_53 := HeatV.sub_nn K O _ _ e46_53
  have d47_48 := HeatV.sub_nn K O _ _ e47_48
  have d47_49 := HeatV.sub_nn K O _ _ e47_49
  have d47_50 := HeatV.sub_nn K O _ _ e47_50
  have d47_51 := HeatV.sub_nn K O _ _ e47_51
  have d47_52 := HeatV.sub_nn K O _ _ e47_52
  have d47_53 := HeatV.sub_nn K O _ _ e47_53
  have d48_49 := HeatV.sub_nn K O _ _ e48_49
  have d48_50 := HeatV.sub_nn K O _ _ e48_50
  have d48_51 := HeatV.sub_nn K O _ _ e48_51
  have d48_52 := HeatV.sub_nn K O _ _ e48_52
  have d48_53 := HeatV.sub_nn K O _ _ e48_53
  have d49_50 := HeatV.sub_nn K O _ _ e49_50
  have d49_51 := HeatV.sub_nn K O _ _ e49_51
  have d49_52 := HeatV.sub_nn K O _ _ e49_52
  have d49_53 := HeatV.sub_nn K O _ _ e49_53
  have d50_51 := HeatV.sub_nn K O _ _ e50_51
  have d50_52 := HeatV.sub_nn K O _ _ e50_52
  have d50_53 := HeatV.sub_nn K O _ _ e50_53
  have d51_52 := HeatV.sub_nn K O _ _ e51_52
  have d51_53 := HeatV.sub_nn K O _ _ e51_53
  have d52_53 := HeatV.sub_nn K O _ _ e52_53
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+248459 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 768398400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (  -- (+6057 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..54, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 54 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 768398400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.  -- (+6677 chars; full line in the Zenodo source)
      (K.mul (cN K 767636100) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add  -- (+6677 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (A 37) (A 38) (A 39) (A 40) (A 41) (A 42) (A 43) (A 44) (A 45) (A 46) (A 47) (A 48) (A 49) (A 50) (A 51) (A 52) (A 53) (A 54) (hnn 0) (h  -- (+474 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 54 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 54 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 54 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 54 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 54 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 54 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 54 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+78769 chars; full line in the Zenodo source)

end G61Lv53

#print axioms G61Lv53.add_nn
#print axioms G61Lv53.level
#print axioms G61Lv53.level_fun

ym/G61Lv54.lean

lean_all/ym/G61Lv54.lean

/-
  ym/G61Lv54 — T45, G61a at level n = 54 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv54

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxHeartbeats 0 in
set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 a42 a43 a44 a45 a46 a47 a48 a49 a50 a51 a52 a53 a54 a55 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.l  -- (+1182 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+69319 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 856147600) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.  -- (+6149 chars; full line in the Zenodo source)
      (K.mul (cN K 855328320) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add  -- (+6152 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_29 := HeatV.sub_nn K O _ _ e0_29
  have d0_33 := HeatV.sub_nn K O _ _ e0_33
  have d0_34 := HeatV.sub_nn K O _ _ e0_34
  have d0_35 := HeatV.sub_nn K O _ _ e0_35
  have d0_36 := HeatV.sub_nn K O _ _ e0_36
  have d0_37 := HeatV.sub_nn K O _ _ e0_37
  have d0_38 := HeatV.sub_nn K O _ _ e0_38
  have d0_39 := HeatV.sub_nn K O _ _ e0_39
  have d0_40 := HeatV.sub_nn K O _ _ e0_40
  have d0_41 := HeatV.sub_nn K O _ _ e0_41
  have d0_42 := HeatV.sub_nn K O _ _ e0_42
  have d0_43 := HeatV.sub_nn K O _ _ e0_43
  have d0_44 := HeatV.sub_nn K O _ _ e0_44
  have d0_46 := HeatV.sub_nn K O _ _ e0_46
  have d0_47 := HeatV.sub_nn K O _ _ e0_47
  have d0_48 := HeatV.sub_nn K O _ _ e0_48
  have d0_49 := HeatV.sub_nn K O _ _ e0_49
  have d0_52 := HeatV.sub_nn K O _ _ e0_52
  have d0_53 := HeatV.sub_nn K O _ _ e0_53
  have d0_54 := HeatV.sub_nn K O _ _ e0_54
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_29 := HeatV.sub_nn K O _ _ e1_29
  have d1_30 := HeatV.sub_nn K O _ _ e1_30
  have d1_31 := HeatV.sub_nn K O _ _ e1_31
  have d1_32 := HeatV.sub_nn K O _ _ e1_32
  have d1_33 := HeatV.sub_nn K O _ _ e1_33
  have d1_34 := HeatV.sub_nn K O _ _ e1_34
  have d1_35 := HeatV.sub_nn K O _ _ e1_35
  have d1_36 := HeatV.sub_nn K O _ _ e1_36
  have d1_37 := HeatV.sub_nn K O _ _ e1_37
  have d1_38 := HeatV.sub_nn K O _ _ e1_38
  have d1_39 := HeatV.sub_nn K O _ _ e1_39
  have d1_40 := HeatV.sub_nn K O _ _ e1_40
  have d1_41 := HeatV.sub_nn K O _ _ e1_41
  have d1_42 := HeatV.sub_nn K O _ _ e1_42
  have d1_44 := HeatV.sub_nn K O _ _ e1_44
  have d1_45 := HeatV.sub_nn K O _ _ e1_45
  have d1_47 := HeatV.sub_nn K O _ _ e1_47
  have d1_51 := HeatV.sub_nn K O _ _ e1_51
  have d1_53 := HeatV.sub_nn K O _ _ e1_53
  have d1_54 := HeatV.sub_nn K O _ _ e1_54
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_33 := HeatV.sub_nn K O _ _ e2_33
  have d2_34 := HeatV.sub_nn K O _ _ e2_34
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d2_36 := HeatV.sub_nn K O _ _ e2_36
  have d2_37 := HeatV.sub_nn K O _ _ e2_37
  have d2_38 := HeatV.sub_nn K O _ _ e2_38
  have d2_39 := HeatV.sub_nn K O _ _ e2_39
  have d2_40 := HeatV.sub_nn K O _ _ e2_40
  have d2_41 := HeatV.sub_nn K O _ _ e2_41
  have d2_42 := HeatV.sub_nn K O _ _ e2_42
  have d2_44 := HeatV.sub_nn K O _ _ e2_44
  have d2_45 := HeatV.sub_nn K O _ _ e2_45
  have d2_46 := HeatV.sub_nn K O _ _ e2_46
  have d2_47 := HeatV.sub_nn K O _ _ e2_47
  have d2_49 := HeatV.sub_nn K O _ _ e2_49
  have d2_52 := HeatV.sub_nn K O _ _ e2_52
  have d2_53 := HeatV.sub_nn K O _ _ e2_53
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d3_34 := HeatV.sub_nn K O _ _ e3_34
  have d3_35 := HeatV.sub_nn K O _ _ e3_35
  have d3_36 := HeatV.sub_nn K O _ _ e3_36
  have d3_37 := HeatV.sub_nn K O _ _ e3_37
  have d3_38 := HeatV.sub_nn K O _ _ e3_38
  have d3_39 := HeatV.sub_nn K O _ _ e3_39
  have d3_40 := HeatV.sub_nn K O _ _ e3_40
  have d3_41 := HeatV.sub_nn K O _ _ e3_41
  have d3_42 := HeatV.sub_nn K O _ _ e3_42
  have d3_43 := HeatV.sub_nn K O _ _ e3_43
  have d3_44 := HeatV.sub_nn K O _ _ e3_44
  have d3_45 := HeatV.sub_nn K O _ _ e3_45
  have d3_46 := HeatV.sub_nn K O _ _ e3_46
  have d3_47 := HeatV.sub_nn K O _ _ e3_47
  have d3_48 := HeatV.sub_nn K O _ _ e3_48
  have d3_49 := HeatV.sub_nn K O _ _ e3_49
  have d3_50 := HeatV.sub_nn K O _ _ e3_50
  have d3_51 := HeatV.sub_nn K O _ _ e3_51
  have d3_52 := HeatV.sub_nn K O _ _ e3_52
  have d3_54 := HeatV.sub_nn K O _ _ e3_54
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d4_34 := HeatV.sub_nn K O _ _ e4_34
  have d4_35 := HeatV.sub_nn K O _ _ e4_35
  have d4_36 := HeatV.sub_nn K O _ _ e4_36
  have d4_37 := HeatV.sub_nn K O _ _ e4_37
  have d4_38 := HeatV.sub_nn K O _ _ e4_38
  have d4_39 := HeatV.sub_nn K O _ _ e4_39
  have d4_40 := HeatV.sub_nn K O _ _ e4_40
  have d4_41 := HeatV.sub_nn K O _ _ e4_41
  have d4_42 := HeatV.sub_nn K O _ _ e4_42
  have d4_43 := HeatV.sub_nn K O _ _ e4_43
  have d4_44 := HeatV.sub_nn K O _ _ e4_44
  have d4_45 := HeatV.sub_nn K O _ _ e4_45
  have d4_46 := HeatV.sub_nn K O _ _ e4_46
  have d4_50 := HeatV.sub_nn K O _ _ e4_50
  have d4_51 := HeatV.sub_nn K O _ _ e4_51
  have d4_52 := HeatV.sub_nn K O _ _ e4_52
  have d4_53 := HeatV.sub_nn K O _ _ e4_53
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_17 := HeatV.sub_nn K O _ _ e5_17
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d5_33 := HeatV.sub_nn K O _ _ e5_33
  have d5_34 := HeatV.sub_nn K O _ _ e5_34
  have d5_35 := HeatV.sub_nn K O _ _ e5_35
  have d5_36 := HeatV.sub_nn K O _ _ e5_36
  have d5_37 := HeatV.sub_nn K O _ _ e5_37
  have d5_38 := HeatV.sub_nn K O _ _ e5_38
  have d5_39 := HeatV.sub_nn K O _ _ e5_39
  have d5_40 := HeatV.sub_nn K O _ _ e5_40
  have d5_41 := HeatV.sub_nn K O _ _ e5_41
  have d5_42 := HeatV.sub_nn K O _ _ e5_42
  have d5_44 := HeatV.sub_nn K O _ _ e5_44
  have d5_45 := HeatV.sub_nn K O _ _ e5_45
  have d5_47 := HeatV.sub_nn K O _ _ e5_47
  have d5_49 := HeatV.sub_nn K O _ _ e5_49
  have d5_50 := HeatV.sub_nn K O _ _ e5_50
  have d5_53 := HeatV.sub_nn K O _ _ e5_53
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_32 := HeatV.sub_nn K O _ _ e6_32
  have d6_33 := HeatV.sub_nn K O _ _ e6_33
  have d6_34 := HeatV.sub_nn K O _ _ e6_34
  have d6_35 := HeatV.sub_nn K O _ _ e6_35
  have d6_36 := HeatV.sub_nn K O _ _ e6_36
  have d6_37 := HeatV.sub_nn K O _ _ e6_37
  have d6_38 := HeatV.sub_nn K O _ _ e6_38
  have d6_39 := HeatV.sub_nn K O _ _ e6_39
  have d6_40 := HeatV.sub_nn K O _ _ e6_40
  have d6_41 := HeatV.sub_nn K O _ _ e6_41
  have d6_42 := HeatV.sub_nn K O _ _ e6_42
  have d6_43 := HeatV.sub_nn K O _ _ e6_43
  have d6_44 := HeatV.sub_nn K O _ _ e6_44
  have d6_45 := HeatV.sub_nn K O _ _ e6_45
  have d6_46 := HeatV.sub_nn K O _ _ e6_46
  have d6_48 := HeatV.sub_nn K O _ _ e6_48
  have d6_49 := HeatV.sub_nn K O _ _ e6_49
  have d6_50 := HeatV.sub_nn K O _ _ e6_50
  have d6_51 := HeatV.sub_nn K O _ _ e6_51
  have d6_52 := HeatV.sub_nn K O _ _ e6_52
  have d6_53 := HeatV.sub_nn K O _ _ e6_53
  have d6_54 := HeatV.sub_nn K O _ _ e6_54
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_23 := HeatV.sub_nn K O _ _ e7_23
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d7_33 := HeatV.sub_nn K O _ _ e7_33
  have d7_34 := HeatV.sub_nn K O _ _ e7_34
  have d7_35 := HeatV.sub_nn K O _ _ e7_35
  have d7_36 := HeatV.sub_nn K O _ _ e7_36
  have d7_37 := HeatV.sub_nn K O _ _ e7_37
  have d7_38 := HeatV.sub_nn K O _ _ e7_38
  have d7_39 := HeatV.sub_nn K O _ _ e7_39
  have d7_40 := HeatV.sub_nn K O _ _ e7_40
  have d7_42 := HeatV.sub_nn K O _ _ e7_42
  have d7_43 := HeatV.sub_nn K O _ _ e7_43
  have d7_44 := HeatV.sub_nn K O _ _ e7_44
  have d7_45 := HeatV.sub_nn K O _ _ e7_45
  have d7_47 := HeatV.sub_nn K O _ _ e7_47
  have d7_48 := HeatV.sub_nn K O _ _ e7_48
  have d7_49 := HeatV.sub_nn K O _ _ e7_49
  have d7_50 := HeatV.sub_nn K O _ _ e7_50
  have d7_51 := HeatV.sub_nn K O _ _ e7_51
  have d7_53 := HeatV.sub_nn K O _ _ e7_53
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_32 := HeatV.sub_nn K O _ _ e8_32
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_34 := HeatV.sub_nn K O _ _ e8_34
  have d8_35 := HeatV.sub_nn K O _ _ e8_35
  have d8_36 := HeatV.sub_nn K O _ _ e8_36
  have d8_37 := HeatV.sub_nn K O _ _ e8_37
  have d8_38 := HeatV.sub_nn K O _ _ e8_38
  have d8_39 := HeatV.sub_nn K O _ _ e8_39
  have d8_40 := HeatV.sub_nn K O _ _ e8_40
  have d8_41 := HeatV.sub_nn K O _ _ e8_41
  have d8_42 := HeatV.sub_nn K O _ _ e8_42
  have d8_43 := HeatV.sub_nn K O _ _ e8_43
  have d8_44 := HeatV.sub_nn K O _ _ e8_44
  have d8_46 := HeatV.sub_nn K O _ _ e8_46
  have d8_47 := HeatV.sub_nn K O _ _ e8_47
  have d8_48 := HeatV.sub_nn K O _ _ e8_48
  have d8_49 := HeatV.sub_nn K O _ _ e8_49
  have d8_50 := HeatV.sub_nn K O _ _ e8_50
  have d8_51 := HeatV.sub_nn K O _ _ e8_51
  have d8_52 := HeatV.sub_nn K O _ _ e8_52
  have d8_53 := HeatV.sub_nn K O _ _ e8_53
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d9_34 := HeatV.sub_nn K O _ _ e9_34
  have d9_35 := HeatV.sub_nn K O _ _ e9_35
  have d9_36 := HeatV.sub_nn K O _ _ e9_36
  have d9_37 := HeatV.sub_nn K O _ _ e9_37
  have d9_38 := HeatV.sub_nn K O _ _ e9_38
  have d9_39 := HeatV.sub_nn K O _ _ e9_39
  have d9_40 := HeatV.sub_nn K O _ _ e9_40
  have d9_41 := HeatV.sub_nn K O _ _ e9_41
  have d9_42 := HeatV.sub_nn K O _ _ e9_42
  have d9_43 := HeatV.sub_nn K O _ _ e9_43
  have d9_45 := HeatV.sub_nn K O _ _ e9_45
  have d9_46 := HeatV.sub_nn K O _ _ e9_46
  have d9_47 := HeatV.sub_nn K O _ _ e9_47
  have d9_48 := HeatV.sub_nn K O _ _ e9_48
  have d9_49 := HeatV.sub_nn K O _ _ e9_49
  have d9_50 := HeatV.sub_nn K O _ _ e9_50
  have d9_51 := HeatV.sub_nn K O _ _ e9_51
  have d9_52 := HeatV.sub_nn K O _ _ e9_52
  have d9_53 := HeatV.sub_nn K O _ _ e9_53
  have d9_54 := HeatV.sub_nn K O _ _ e9_54
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_34 := HeatV.sub_nn K O _ _ e10_34
  have d10_35 := HeatV.sub_nn K O _ _ e10_35
  have d10_36 := HeatV.sub_nn K O _ _ e10_36
  have d10_37 := HeatV.sub_nn K O _ _ e10_37
  have d10_38 := HeatV.sub_nn K O _ _ e10_38
  have d10_39 := HeatV.sub_nn K O _ _ e10_39
  have d10_40 := HeatV.sub_nn K O _ _ e10_40
  have d10_41 := HeatV.sub_nn K O _ _ e10_41
  have d10_42 := HeatV.sub_nn K O _ _ e10_42
  have d10_44 := HeatV.sub_nn K O _ _ e10_44
  have d10_45 := HeatV.sub_nn K O _ _ e10_45
  have d10_46 := HeatV.sub_nn K O _ _ e10_46
  have d10_47 := HeatV.sub_nn K O _ _ e10_47
  have d10_49 := HeatV.sub_nn K O _ _ e10_49
  have d10_50 := HeatV.sub_nn K O _ _ e10_50
  have d10_51 := HeatV.sub_nn K O _ _ e10_51
  have d10_53 := HeatV.sub_nn K O _ _ e10_53
  have d10_54 := HeatV.sub_nn K O _ _ e10_54
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d11_33 := HeatV.sub_nn K O _ _ e11_33
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d11_35 := HeatV.sub_nn K O _ _ e11_35
  have d11_36 := HeatV.sub_nn K O _ _ e11_36
  have d11_37 := HeatV.sub_nn K O _ _ e11_37
  have d11_38 := HeatV.sub_nn K O _ _ e11_38
  have d11_39 := HeatV.sub_nn K O _ _ e11_39
  have d11_40 := HeatV.sub_nn K O _ _ e11_40
  have d11_41 := HeatV.sub_nn K O _ _ e11_41
  have d11_42 := HeatV.sub_nn K O _ _ e11_42
  have d11_43 := HeatV.sub_nn K O _ _ e11_43
  have d11_44 := HeatV.sub_nn K O _ _ e11_44
  have d11_45 := HeatV.sub_nn K O _ _ e11_45
  have d11_46 := HeatV.sub_nn K O _ _ e11_46
  have d11_47 := HeatV.sub_nn K O _ _ e11_47
  have d11_48 := HeatV.sub_nn K O _ _ e11_48
  have d11_49 := HeatV.sub_nn K O _ _ e11_49
  have d11_50 := HeatV.sub_nn K O _ _ e11_50
  have d11_51 := HeatV.sub_nn K O _ _ e11_51
  have d11_52 := HeatV.sub_nn K O _ _ e11_52
  have d11_53 := HeatV.sub_nn K O _ _ e11_53
  have d11_54 := HeatV.sub_nn K O _ _ e11_54
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d12_34 := HeatV.sub_nn K O _ _ e12_34
  have d12_35 := HeatV.sub_nn K O _ _ e12_35
  have d12_36 := HeatV.sub_nn K O _ _ e12_36
  have d12_37 := HeatV.sub_nn K O _ _ e12_37
  have d12_38 := HeatV.sub_nn K O _ _ e12_38
  have d12_39 := HeatV.sub_nn K O _ _ e12_39
  have d12_40 := HeatV.sub_nn K O _ _ e12_40
  have d12_42 := HeatV.sub_nn K O _ _ e12_42
  have d12_43 := HeatV.sub_nn K O _ _ e12_43
  have d12_44 := HeatV.sub_nn K O _ _ e12_44
  have d12_45 := HeatV.sub_nn K O _ _ e12_45
  have d12_46 := HeatV.sub_nn K O _ _ e12_46
  have d12_47 := HeatV.sub_nn K O _ _ e12_47
  have d12_48 := HeatV.sub_nn K O _ _ e12_48
  have d12_49 := HeatV.sub_nn K O _ _ e12_49
  have d12_50 := HeatV.sub_nn K O _ _ e12_50
  have d12_51 := HeatV.sub_nn K O _ _ e12_51
  have d12_52 := HeatV.sub_nn K O _ _ e12_52
  have d12_53 := HeatV.sub_nn K O _ _ e12_53
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_33 := HeatV.sub_nn K O _ _ e13_33
  have d13_34 := HeatV.sub_nn K O _ _ e13_34
  have d13_35 := HeatV.sub_nn K O _ _ e13_35
  have d13_36 := HeatV.sub_nn K O _ _ e13_36
  have d13_37 := HeatV.sub_nn K O _ _ e13_37
  have d13_38 := HeatV.sub_nn K O _ _ e13_38
  have d13_39 := HeatV.sub_nn K O _ _ e13_39
  have d13_40 := HeatV.sub_nn K O _ _ e13_40
  have d13_41 := HeatV.sub_nn K O _ _ e13_41
  have d13_42 := HeatV.sub_nn K O _ _ e13_42
  have d13_43 := HeatV.sub_nn K O _ _ e13_43
  have d13_44 := HeatV.sub_nn K O _ _ e13_44
  have d13_45 := HeatV.sub_nn K O _ _ e13_45
  have d13_46 := HeatV.sub_nn K O _ _ e13_46
  have d13_47 := HeatV.sub_nn K O _ _ e13_47
  have d13_48 := HeatV.sub_nn K O _ _ e13_48
  have d13_49 := HeatV.sub_nn K O _ _ e13_49
  have d13_50 := HeatV.sub_nn K O _ _ e13_50
  have d13_51 := HeatV.sub_nn K O _ _ e13_51
  have d13_52 := HeatV.sub_nn K O _ _ e13_52
  have d13_53 := HeatV.sub_nn K O _ _ e13_53
  have d13_54 := HeatV.sub_nn K O _ _ e13_54
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d14_32 := HeatV.sub_nn K O _ _ e14_32
  have d14_33 := HeatV.sub_nn K O _ _ e14_33
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d14_35 := HeatV.sub_nn K O _ _ e14_35
  have d14_36 := HeatV.sub_nn K O _ _ e14_36
  have d14_37 := HeatV.sub_nn K O _ _ e14_37
  have d14_38 := HeatV.sub_nn K O _ _ e14_38
  have d14_40 := HeatV.sub_nn K O _ _ e14_40
  have d14_41 := HeatV.sub_nn K O _ _ e14_41
  have d14_42 := HeatV.sub_nn K O _ _ e14_42
  have d14_43 := HeatV.sub_nn K O _ _ e14_43
  have d14_44 := HeatV.sub_nn K O _ _ e14_44
  have d14_45 := HeatV.sub_nn K O _ _ e14_45
  have d14_46 := HeatV.sub_nn K O _ _ e14_46
  have d14_47 := HeatV.sub_nn K O _ _ e14_47
  have d14_48 := HeatV.sub_nn K O _ _ e14_48
  have d14_49 := HeatV.sub_nn K O _ _ e14_49
  have d14_50 := HeatV.sub_nn K O _ _ e14_50
  have d14_51 := HeatV.sub_nn K O _ _ e14_51
  have d14_52 := HeatV.sub_nn K O _ _ e14_52
  have d14_53 := HeatV.sub_nn K O _ _ e14_53
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_30 := HeatV.sub_nn K O _ _ e15_30
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_34 := HeatV.sub_nn K O _ _ e15_34
  have d15_35 := HeatV.sub_nn K O _ _ e15_35
  have d15_36 := HeatV.sub_nn K O _ _ e15_36
  have d15_37 := HeatV.sub_nn K O _ _ e15_37
  have d15_38 := HeatV.sub_nn K O _ _ e15_38
  have d15_39 := HeatV.sub_nn K O _ _ e15_39
  have d15_40 := HeatV.sub_nn K O _ _ e15_40
  have d15_41 := HeatV.sub_nn K O _ _ e15_41
  have d15_42 := HeatV.sub_nn K O _ _ e15_42
  have d15_43 := HeatV.sub_nn K O _ _ e15_43
  have d15_44 := HeatV.sub_nn K O _ _ e15_44
  have d15_45 := HeatV.sub_nn K O _ _ e15_45
  have d15_46 := HeatV.sub_nn K O _ _ e15_46
  have d15_47 := HeatV.sub_nn K O _ _ e15_47
  have d15_48 := HeatV.sub_nn K O _ _ e15_48
  have d15_49 := HeatV.sub_nn K O _ _ e15_49
  have d15_50 := HeatV.sub_nn K O _ _ e15_50
  have d15_51 := HeatV.sub_nn K O _ _ e15_51
  have d15_52 := HeatV.sub_nn K O _ _ e15_52
  have d15_53 := HeatV.sub_nn K O _ _ e15_53
  have d15_54 := HeatV.sub_nn K O _ _ e15_54
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d16_36 := HeatV.sub_nn K O _ _ e16_36
  have d16_38 := HeatV.sub_nn K O _ _ e16_38
  have d16_39 := HeatV.sub_nn K O _ _ e16_39
  have d16_40 := HeatV.sub_nn K O _ _ e16_40
  have d16_41 := HeatV.sub_nn K O _ _ e16_41
  have d16_42 := HeatV.sub_nn K O _ _ e16_42
  have d16_43 := HeatV.sub_nn K O _ _ e16_43
  have d16_44 := HeatV.sub_nn K O _ _ e16_44
  have d16_45 := HeatV.sub_nn K O _ _ e16_45
  have d16_46 := HeatV.sub_nn K O _ _ e16_46
  have d16_47 := HeatV.sub_nn K O _ _ e16_47
  have d16_48 := HeatV.sub_nn K O _ _ e16_48
  have d16_49 := HeatV.sub_nn K O _ _ e16_49
  have d16_50 := HeatV.sub_nn K O _ _ e16_50
  have d16_51 := HeatV.sub_nn K O _ _ e16_51
  have d16_52 := HeatV.sub_nn K O _ _ e16_52
  have d16_53 := HeatV.sub_nn K O _ _ e16_53
  have d16_54 := HeatV.sub_nn K O _ _ e16_54
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_34 := HeatV.sub_nn K O _ _ e17_34
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d17_37 := HeatV.sub_nn K O _ _ e17_37
  have d17_38 := HeatV.sub_nn K O _ _ e17_38
  have d17_39 := HeatV.sub_nn K O _ _ e17_39
  have d17_40 := HeatV.sub_nn K O _ _ e17_40
  have d17_41 := HeatV.sub_nn K O _ _ e17_41
  have d17_42 := HeatV.sub_nn K O _ _ e17_42
  have d17_43 := HeatV.sub_nn K O _ _ e17_43
  have d17_44 := HeatV.sub_nn K O _ _ e17_44
  have d17_45 := HeatV.sub_nn K O _ _ e17_45
  have d17_46 := HeatV.sub_nn K O _ _ e17_46
  have d17_47 := HeatV.sub_nn K O _ _ e17_47
  have d17_48 := HeatV.sub_nn K O _ _ e17_48
  have d17_49 := HeatV.sub_nn K O _ _ e17_49
  have d17_50 := HeatV.sub_nn K O _ _ e17_50
  have d17_51 := HeatV.sub_nn K O _ _ e17_51
  have d17_52 := HeatV.sub_nn K O _ _ e17_52
  have d17_53 := HeatV.sub_nn K O _ _ e17_53
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d18_33 := HeatV.sub_nn K O _ _ e18_33
  have d18_34 := HeatV.sub_nn K O _ _ e18_34
  have d18_36 := HeatV.sub_nn K O _ _ e18_36
  have d18_37 := HeatV.sub_nn K O _ _ e18_37
  have d18_38 := HeatV.sub_nn K O _ _ e18_38
  have d18_39 := HeatV.sub_nn K O _ _ e18_39
  have d18_40 := HeatV.sub_nn K O _ _ e18_40
  have d18_41 := HeatV.sub_nn K O _ _ e18_41
  have d18_42 := HeatV.sub_nn K O _ _ e18_42
  have d18_43 := HeatV.sub_nn K O _ _ e18_43
  have d18_44 := HeatV.sub_nn K O _ _ e18_44
  have d18_45 := HeatV.sub_nn K O _ _ e18_45
  have d18_46 := HeatV.sub_nn K O _ _ e18_46
  have d18_47 := HeatV.sub_nn K O _ _ e18_47
  have d18_48 := HeatV.sub_nn K O _ _ e18_48
  have d18_49 := HeatV.sub_nn K O _ _ e18_49
  have d18_50 := HeatV.sub_nn K O _ _ e18_50
  have d18_51 := HeatV.sub_nn K O _ _ e18_51
  have d18_52 := HeatV.sub_nn K O _ _ e18_52
  have d18_53 := HeatV.sub_nn K O _ _ e18_53
  have d18_54 := HeatV.sub_nn K O _ _ e18_54
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d19_35 := HeatV.sub_nn K O _ _ e19_35
  have d19_36 := HeatV.sub_nn K O _ _ e19_36
  have d19_37 := HeatV.sub_nn K O _ _ e19_37
  have d19_38 := HeatV.sub_nn K O _ _ e19_38
  have d19_39 := HeatV.sub_nn K O _ _ e19_39
  have d19_40 := HeatV.sub_nn K O _ _ e19_40
  have d19_41 := HeatV.sub_nn K O _ _ e19_41
  have d19_42 := HeatV.sub_nn K O _ _ e19_42
  have d19_43 := HeatV.sub_nn K O _ _ e19_43
  have d19_44 := HeatV.sub_nn K O _ _ e19_44
  have d19_45 := HeatV.sub_nn K O _ _ e19_45
  have d19_46 := HeatV.sub_nn K O _ _ e19_46
  have d19_47 := HeatV.sub_nn K O _ _ e19_47
  have d19_48 := HeatV.sub_nn K O _ _ e19_48
  have d19_49 := HeatV.sub_nn K O _ _ e19_49
  have d19_50 := HeatV.sub_nn K O _ _ e19_50
  have d19_51 := HeatV.sub_nn K O _ _ e19_51
  have d19_52 := HeatV.sub_nn K O _ _ e19_52
  have d19_53 := HeatV.sub_nn K O _ _ e19_53
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_33 := HeatV.sub_nn K O _ _ e20_33
  have d20_34 := HeatV.sub_nn K O _ _ e20_34
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d20_36 := HeatV.sub_nn K O _ _ e20_36
  have d20_37 := HeatV.sub_nn K O _ _ e20_37
  have d20_38 := HeatV.sub_nn K O _ _ e20_38
  have d20_39 := HeatV.sub_nn K O _ _ e20_39
  have d20_40 := HeatV.sub_nn K O _ _ e20_40
  have d20_41 := HeatV.sub_nn K O _ _ e20_41
  have d20_42 := HeatV.sub_nn K O _ _ e20_42
  have d20_43 := HeatV.sub_nn K O _ _ e20_43
  have d20_44 := HeatV.sub_nn K O _ _ e20_44
  have d20_45 := HeatV.sub_nn K O _ _ e20_45
  have d20_46 := HeatV.sub_nn K O _ _ e20_46
  have d20_47 := HeatV.sub_nn K O _ _ e20_47
  have d20_48 := HeatV.sub_nn K O _ _ e20_48
  have d20_49 := HeatV.sub_nn K O _ _ e20_49
  have d20_50 := HeatV.sub_nn K O _ _ e20_50
  have d20_51 := HeatV.sub_nn K O _ _ e20_51
  have d20_52 := HeatV.sub_nn K O _ _ e20_52
  have d20_53 := HeatV.sub_nn K O _ _ e20_53
  have d20_54 := HeatV.sub_nn K O _ _ e20_54
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d21_35 := HeatV.sub_nn K O _ _ e21_35
  have d21_36 := HeatV.sub_nn K O _ _ e21_36
  have d21_37 := HeatV.sub_nn K O _ _ e21_37
  have d21_38 := HeatV.sub_nn K O _ _ e21_38
  have d21_39 := HeatV.sub_nn K O _ _ e21_39
  have d21_40 := HeatV.sub_nn K O _ _ e21_40
  have d21_41 := HeatV.sub_nn K O _ _ e21_41
  have d21_42 := HeatV.sub_nn K O _ _ e21_42
  have d21_43 := HeatV.sub_nn K O _ _ e21_43
  have d21_44 := HeatV.sub_nn K O _ _ e21_44
  have d21_45 := HeatV.sub_nn K O _ _ e21_45
  have d21_46 := HeatV.sub_nn K O _ _ e21_46
  have d21_47 := HeatV.sub_nn K O _ _ e21_47
  have d21_48 := HeatV.sub_nn K O _ _ e21_48
  have d21_49 := HeatV.sub_nn K O _ _ e21_49
  have d21_50 := HeatV.sub_nn K O _ _ e21_50
  have d21_51 := HeatV.sub_nn K O _ _ e21_51
  have d21_52 := HeatV.sub_nn K O _ _ e21_52
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_32 := HeatV.sub_nn K O _ _ e22_32
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d22_36 := HeatV.sub_nn K O _ _ e22_36
  have d22_37 := HeatV.sub_nn K O _ _ e22_37
  have d22_38 := HeatV.sub_nn K O _ _ e22_38
  have d22_39 := HeatV.sub_nn K O _ _ e22_39
  have d22_40 := HeatV.sub_nn K O _ _ e22_40
  have d22_41 := HeatV.sub_nn K O _ _ e22_41
  have d22_42 := HeatV.sub_nn K O _ _ e22_42
  have d22_43 := HeatV.sub_nn K O _ _ e22_43
  have d22_44 := HeatV.sub_nn K O _ _ e22_44
  have d22_45 := HeatV.sub_nn K O _ _ e22_45
  have d22_46 := HeatV.sub_nn K O _ _ e22_46
  have d22_47 := HeatV.sub_nn K O _ _ e22_47
  have d22_48 := HeatV.sub_nn K O _ _ e22_48
  have d22_49 := HeatV.sub_nn K O _ _ e22_49
  have d22_50 := HeatV.sub_nn K O _ _ e22_50
  have d22_51 := HeatV.sub_nn K O _ _ e22_51
  have d22_52 := HeatV.sub_nn K O _ _ e22_52
  have d22_54 := HeatV.sub_nn K O _ _ e22_54
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d23_36 := HeatV.sub_nn K O _ _ e23_36
  have d23_37 := HeatV.sub_nn K O _ _ e23_37
  have d23_38 := HeatV.sub_nn K O _ _ e23_38
  have d23_39 := HeatV.sub_nn K O _ _ e23_39
  have d23_40 := HeatV.sub_nn K O _ _ e23_40
  have d23_41 := HeatV.sub_nn K O _ _ e23_41
  have d23_42 := HeatV.sub_nn K O _ _ e23_42
  have d23_43 := HeatV.sub_nn K O _ _ e23_43
  have d23_44 := HeatV.sub_nn K O _ _ e23_44
  have d23_45 := HeatV.sub_nn K O _ _ e23_45
  have d23_46 := HeatV.sub_nn K O _ _ e23_46
  have d23_47 := HeatV.sub_nn K O _ _ e23_47
  have d23_48 := HeatV.sub_nn K O _ _ e23_48
  have d23_49 := HeatV.sub_nn K O _ _ e23_49
  have d23_50 := HeatV.sub_nn K O _ _ e23_50
  have d23_51 := HeatV.sub_nn K O _ _ e23_51
  have d23_52 := HeatV.sub_nn K O _ _ e23_52
  have d23_53 := HeatV.sub_nn K O _ _ e23_53
  have d23_54 := HeatV.sub_nn K O _ _ e23_54
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_32 := HeatV.sub_nn K O _ _ e24_32
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d24_35 := HeatV.sub_nn K O _ _ e24_35
  have d24_36 := HeatV.sub_nn K O _ _ e24_36
  have d24_37 := HeatV.sub_nn K O _ _ e24_37
  have d24_38 := HeatV.sub_nn K O _ _ e24_38
  have d24_39 := HeatV.sub_nn K O _ _ e24_39
  have d24_40 := HeatV.sub_nn K O _ _ e24_40
  have d24_41 := HeatV.sub_nn K O _ _ e24_41
  have d24_42 := HeatV.sub_nn K O _ _ e24_42
  have d24_43 := HeatV.sub_nn K O _ _ e24_43
  have d24_44 := HeatV.sub_nn K O _ _ e24_44
  have d24_45 := HeatV.sub_nn K O _ _ e24_45
  have d24_46 := HeatV.sub_nn K O _ _ e24_46
  have d24_47 := HeatV.sub_nn K O _ _ e24_47
  have d24_48 := HeatV.sub_nn K O _ _ e24_48
  have d24_49 := HeatV.sub_nn K O _ _ e24_49
  have d24_50 := HeatV.sub_nn K O _ _ e24_50
  have d24_51 := HeatV.sub_nn K O _ _ e24_51
  have d24_52 := HeatV.sub_nn K O _ _ e24_52
  have d24_53 := HeatV.sub_nn K O _ _ e24_53
  have d24_54 := HeatV.sub_nn K O _ _ e24_54
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d25_35 := HeatV.sub_nn K O _ _ e25_35
  have d25_36 := HeatV.sub_nn K O _ _ e25_36
  have d25_37 := HeatV.sub_nn K O _ _ e25_37
  have d25_38 := HeatV.sub_nn K O _ _ e25_38
  have d25_39 := HeatV.sub_nn K O _ _ e25_39
  have d25_40 := HeatV.sub_nn K O _ _ e25_40
  have d25_41 := HeatV.sub_nn K O _ _ e25_41
  have d25_42 := HeatV.sub_nn K O _ _ e25_42
  have d25_43 := HeatV.sub_nn K O _ _ e25_43
  have d25_44 := HeatV.sub_nn K O _ _ e25_44
  have d25_45 := HeatV.sub_nn K O _ _ e25_45
  have d25_46 := HeatV.sub_nn K O _ _ e25_46
  have d25_47 := HeatV.sub_nn K O _ _ e25_47
  have d25_48 := HeatV.sub_nn K O _ _ e25_48
  have d25_49 := HeatV.sub_nn K O _ _ e25_49
  have d25_50 := HeatV.sub_nn K O _ _ e25_50
  have d25_51 := HeatV.sub_nn K O _ _ e25_51
  have d25_52 := HeatV.sub_nn K O _ _ e25_52
  have d25_53 := HeatV.sub_nn K O _ _ e25_53
  have d25_54 := HeatV.sub_nn K O _ _ e25_54
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d26_36 := HeatV.sub_nn K O _ _ e26_36
  have d26_37 := HeatV.sub_nn K O _ _ e26_37
  have d26_38 := HeatV.sub_nn K O _ _ e26_38
  have d26_39 := HeatV.sub_nn K O _ _ e26_39
  have d26_40 := HeatV.sub_nn K O _ _ e26_40
  have d26_41 := HeatV.sub_nn K O _ _ e26_41
  have d26_42 := HeatV.sub_nn K O _ _ e26_42
  have d26_43 := HeatV.sub_nn K O _ _ e26_43
  have d26_44 := HeatV.sub_nn K O _ _ e26_44
  have d26_45 := HeatV.sub_nn K O _ _ e26_45
  have d26_46 := HeatV.sub_nn K O _ _ e26_46
  have d26_47 := HeatV.sub_nn K O _ _ e26_47
  have d26_48 := HeatV.sub_nn K O _ _ e26_48
  have d26_49 := HeatV.sub_nn K O _ _ e26_49
  have d26_50 := HeatV.sub_nn K O _ _ e26_50
  have d26_51 := HeatV.sub_nn K O _ _ e26_51
  have d26_52 := HeatV.sub_nn K O _ _ e26_52
  have d26_53 := HeatV.sub_nn K O _ _ e26_53
  have d26_54 := HeatV.sub_nn K O _ _ e26_54
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d27_35 := HeatV.sub_nn K O _ _ e27_35
  have d27_36 := HeatV.sub_nn K O _ _ e27_36
  have d27_37 := HeatV.sub_nn K O _ _ e27_37
  have d27_38 := HeatV.sub_nn K O _ _ e27_38
  have d27_39 := HeatV.sub_nn K O _ _ e27_39
  have d27_40 := HeatV.sub_nn K O _ _ e27_40
  have d27_41 := HeatV.sub_nn K O _ _ e27_41
  have d27_42 := HeatV.sub_nn K O _ _ e27_42
  have d27_43 := HeatV.sub_nn K O _ _ e27_43
  have d27_44 := HeatV.sub_nn K O _ _ e27_44
  have d27_45 := HeatV.sub_nn K O _ _ e27_45
  have d27_46 := HeatV.sub_nn K O _ _ e27_46
  have d27_47 := HeatV.sub_nn K O _ _ e27_47
  have d27_48 := HeatV.sub_nn K O _ _ e27_48
  have d27_49 := HeatV.sub_nn K O _ _ e27_49
  have d27_50 := HeatV.sub_nn K O _ _ e27_50
  have d27_51 := HeatV.sub_nn K O _ _ e27_51
  have d27_52 := HeatV.sub_nn K O _ _ e27_52
  have d27_53 := HeatV.sub_nn K O _ _ e27_53
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d28_35 := HeatV.sub_nn K O _ _ e28_35
  have d28_36 := HeatV.sub_nn K O _ _ e28_36
  have d28_37 := HeatV.sub_nn K O _ _ e28_37
  have d28_38 := HeatV.sub_nn K O _ _ e28_38
  have d28_39 := HeatV.sub_nn K O _ _ e28_39
  have d28_40 := HeatV.sub_nn K O _ _ e28_40
  have d28_41 := HeatV.sub_nn K O _ _ e28_41
  have d28_43 := HeatV.sub_nn K O _ _ e28_43
  have d28_44 := HeatV.sub_nn K O _ _ e28_44
  have d28_45 := HeatV.sub_nn K O _ _ e28_45
  have d28_46 := HeatV.sub_nn K O _ _ e28_46
  have d28_47 := HeatV.sub_nn K O _ _ e28_47
  have d28_48 := HeatV.sub_nn K O _ _ e28_48
  have d28_49 := HeatV.sub_nn K O _ _ e28_49
  have d28_50 := HeatV.sub_nn K O _ _ e28_50
  have d28_51 := HeatV.sub_nn K O _ _ e28_51
  have d28_52 := HeatV.sub_nn K O _ _ e28_52
  have d28_53 := HeatV.sub_nn K O _ _ e28_53
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d29_36 := HeatV.sub_nn K O _ _ e29_36
  have d29_37 := HeatV.sub_nn K O _ _ e29_37
  have d29_38 := HeatV.sub_nn K O _ _ e29_38
  have d29_39 := HeatV.sub_nn K O _ _ e29_39
  have d29_40 := HeatV.sub_nn K O _ _ e29_40
  have d29_41 := HeatV.sub_nn K O _ _ e29_41
  have d29_43 := HeatV.sub_nn K O _ _ e29_43
  have d29_44 := HeatV.sub_nn K O _ _ e29_44
  have d29_45 := HeatV.sub_nn K O _ _ e29_45
  have d29_46 := HeatV.sub_nn K O _ _ e29_46
  have d29_47 := HeatV.sub_nn K O _ _ e29_47
  have d29_48 := HeatV.sub_nn K O _ _ e29_48
  have d29_49 := HeatV.sub_nn K O _ _ e29_49
  have d29_50 := HeatV.sub_nn K O _ _ e29_50
  have d29_51 := HeatV.sub_nn K O _ _ e29_51
  have d29_52 := HeatV.sub_nn K O _ _ e29_52
  have d29_53 := HeatV.sub_nn K O _ _ e29_53
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d30_35 := HeatV.sub_nn K O _ _ e30_35
  have d30_36 := HeatV.sub_nn K O _ _ e30_36
  have d30_37 := HeatV.sub_nn K O _ _ e30_37
  have d30_38 := HeatV.sub_nn K O _ _ e30_38
  have d30_39 := HeatV.sub_nn K O _ _ e30_39
  have d30_40 := HeatV.sub_nn K O _ _ e30_40
  have d30_41 := HeatV.sub_nn K O _ _ e30_41
  have d30_42 := HeatV.sub_nn K O _ _ e30_42
  have d30_43 := HeatV.sub_nn K O _ _ e30_43
  have d30_44 := HeatV.sub_nn K O _ _ e30_44
  have d30_45 := HeatV.sub_nn K O _ _ e30_45
  have d30_46 := HeatV.sub_nn K O _ _ e30_46
  have d30_47 := HeatV.sub_nn K O _ _ e30_47
  have d30_48 := HeatV.sub_nn K O _ _ e30_48
  have d30_49 := HeatV.sub_nn K O _ _ e30_49
  have d30_50 := HeatV.sub_nn K O _ _ e30_50
  have d30_51 := HeatV.sub_nn K O _ _ e30_51
  have d30_52 := HeatV.sub_nn K O _ _ e30_52
  have d30_53 := HeatV.sub_nn K O _ _ e30_53
  have d30_54 := HeatV.sub_nn K O _ _ e30_54
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d31_35 := HeatV.sub_nn K O _ _ e31_35
  have d31_36 := HeatV.sub_nn K O _ _ e31_36
  have d31_37 := HeatV.sub_nn K O _ _ e31_37
  have d31_38 := HeatV.sub_nn K O _ _ e31_38
  have d31_39 := HeatV.sub_nn K O _ _ e31_39
  have d31_40 := HeatV.sub_nn K O _ _ e31_40
  have d31_41 := HeatV.sub_nn K O _ _ e31_41
  have d31_42 := HeatV.sub_nn K O _ _ e31_42
  have d31_43 := HeatV.sub_nn K O _ _ e31_43
  have d31_44 := HeatV.sub_nn K O _ _ e31_44
  have d31_45 := HeatV.sub_nn K O _ _ e31_45
  have d31_46 := HeatV.sub_nn K O _ _ e31_46
  have d31_47 := HeatV.sub_nn K O _ _ e31_47
  have d31_48 := HeatV.sub_nn K O _ _ e31_48
  have d31_49 := HeatV.sub_nn K O _ _ e31_49
  have d31_50 := HeatV.sub_nn K O _ _ e31_50
  have d31_51 := HeatV.sub_nn K O _ _ e31_51
  have d31_52 := HeatV.sub_nn K O _ _ e31_52
  have d31_53 := HeatV.sub_nn K O _ _ e31_53
  have d31_54 := HeatV.sub_nn K O _ _ e31_54
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d32_36 := HeatV.sub_nn K O _ _ e32_36
  have d32_37 := HeatV.sub_nn K O _ _ e32_37
  have d32_38 := HeatV.sub_nn K O _ _ e32_38
  have d32_39 := HeatV.sub_nn K O _ _ e32_39
  have d32_40 := HeatV.sub_nn K O _ _ e32_40
  have d32_41 := HeatV.sub_nn K O _ _ e32_41
  have d32_42 := HeatV.sub_nn K O _ _ e32_42
  have d32_43 := HeatV.sub_nn K O _ _ e32_43
  have d32_44 := HeatV.sub_nn K O _ _ e32_44
  have d32_45 := HeatV.sub_nn K O _ _ e32_45
  have d32_46 := HeatV.sub_nn K O _ _ e32_46
  have d32_47 := HeatV.sub_nn K O _ _ e32_47
  have d32_48 := HeatV.sub_nn K O _ _ e32_48
  have d32_49 := HeatV.sub_nn K O _ _ e32_49
  have d32_50 := HeatV.sub_nn K O _ _ e32_50
  have d32_51 := HeatV.sub_nn K O _ _ e32_51
  have d32_52 := HeatV.sub_nn K O _ _ e32_52
  have d32_53 := HeatV.sub_nn K O _ _ e32_53
  have d32_54 := HeatV.sub_nn K O _ _ e32_54
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d33_36 := HeatV.sub_nn K O _ _ e33_36
  have d33_37 := HeatV.sub_nn K O _ _ e33_37
  have d33_38 := HeatV.sub_nn K O _ _ e33_38
  have d33_39 := HeatV.sub_nn K O _ _ e33_39
  have d33_40 := HeatV.sub_nn K O _ _ e33_40
  have d33_41 := HeatV.sub_nn K O _ _ e33_41
  have d33_42 := HeatV.sub_nn K O _ _ e33_42
  have d33_43 := HeatV.sub_nn K O _ _ e33_43
  have d33_44 := HeatV.sub_nn K O _ _ e33_44
  have d33_45 := HeatV.sub_nn K O _ _ e33_45
  have d33_46 := HeatV.sub_nn K O _ _ e33_46
  have d33_47 := HeatV.sub_nn K O _ _ e33_47
  have d33_48 := HeatV.sub_nn K O _ _ e33_48
  have d33_49 := HeatV.sub_nn K O _ _ e33_49
  have d33_50 := HeatV.sub_nn K O _ _ e33_50
  have d33_51 := HeatV.sub_nn K O _ _ e33_51
  have d33_52 := HeatV.sub_nn K O _ _ e33_52
  have d33_53 := HeatV.sub_nn K O _ _ e33_53
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have d34_36 := HeatV.sub_nn K O _ _ e34_36
  have d34_37 := HeatV.sub_nn K O _ _ e34_37
  have d34_38 := HeatV.sub_nn K O _ _ e34_38
  have d34_39 := HeatV.sub_nn K O _ _ e34_39
  have d34_40 := HeatV.sub_nn K O _ _ e34_40
  have d34_41 := HeatV.sub_nn K O _ _ e34_41
  have d34_42 := HeatV.sub_nn K O _ _ e34_42
  have d34_43 := HeatV.sub_nn K O _ _ e34_43
  have d34_44 := HeatV.sub_nn K O _ _ e34_44
  have d34_45 := HeatV.sub_nn K O _ _ e34_45
  have d34_46 := HeatV.sub_nn K O _ _ e34_46
  have d34_47 := HeatV.sub_nn K O _ _ e34_47
  have d34_48 := HeatV.sub_nn K O _ _ e34_48
  have d34_49 := HeatV.sub_nn K O _ _ e34_49
  have d34_50 := HeatV.sub_nn K O _ _ e34_50
  have d34_51 := HeatV.sub_nn K O _ _ e34_51
  have d34_52 := HeatV.sub_nn K O _ _ e34_52
  have d34_53 := HeatV.sub_nn K O _ _ e34_53
  have d34_54 := HeatV.sub_nn K O _ _ e34_54
  have d35_36 := HeatV.sub_nn K O _ _ e35_36
  have d35_37 := HeatV.sub_nn K O _ _ e35_37
  have d35_38 := HeatV.sub_nn K O _ _ e35_38
  have d35_39 := HeatV.sub_nn K O _ _ e35_39
  have d35_40 := HeatV.sub_nn K O _ _ e35_40
  have d35_41 := HeatV.sub_nn K O _ _ e35_41
  have d35_42 := HeatV.sub_nn K O _ _ e35_42
  have d35_43 := HeatV.sub_nn K O _ _ e35_43
  have d35_44 := HeatV.sub_nn K O _ _ e35_44
  have d35_45 := HeatV.sub_nn K O _ _ e35_45
  have d35_46 := HeatV.sub_nn K O _ _ e35_46
  have d35_47 := HeatV.sub_nn K O _ _ e35_47
  have d35_48 := HeatV.sub_nn K O _ _ e35_48
  have d35_49 := HeatV.sub_nn K O _ _ e35_49
  have d35_50 := HeatV.sub_nn K O _ _ e35_50
  have d35_51 := HeatV.sub_nn K O _ _ e35_51
  have d35_52 := HeatV.sub_nn K O _ _ e35_52
  have d35_53 := HeatV.sub_nn K O _ _ e35_53
  have d36_37 := HeatV.sub_nn K O _ _ e36_37
  have d36_38 := HeatV.sub_nn K O _ _ e36_38
  have d36_39 := HeatV.sub_nn K O _ _ e36_39
  have d36_40 := HeatV.sub_nn K O _ _ e36_40
  have d36_41 := HeatV.sub_nn K O _ _ e36_41
  have d36_42 := HeatV.sub_nn K O _ _ e36_42
  have d36_43 := HeatV.sub_nn K O _ _ e36_43
  have d36_44 := HeatV.sub_nn K O _ _ e36_44
  have d36_45 := HeatV.sub_nn K O _ _ e36_45
  have d36_46 := HeatV.sub_nn K O _ _ e36_46
  have d36_47 := HeatV.sub_nn K O _ _ e36_47
  have d36_48 := HeatV.sub_nn K O _ _ e36_48
  have d36_49 := HeatV.sub_nn K O _ _ e36_49
  have d36_50 := HeatV.sub_nn K O _ _ e36_50
  have d36_51 := HeatV.sub_nn K O _ _ e36_51
  have d36_52 := HeatV.sub_nn K O _ _ e36_52
  have d36_53 := HeatV.sub_nn K O _ _ e36_53
  have d36_54 := HeatV.sub_nn K O _ _ e36_54
  have d37_38 := HeatV.sub_nn K O _ _ e37_38
  have d37_39 := HeatV.sub_nn K O _ _ e37_39
  have d37_40 := HeatV.sub_nn K O _ _ e37_40
  have d37_41 := HeatV.sub_nn K O _ _ e37_41
  have d37_42 := HeatV.sub_nn K O _ _ e37_42
  have d37_43 := HeatV.sub_nn K O _ _ e37_43
  have d37_44 := HeatV.sub_nn K O _ _ e37_44
  have d37_45 := HeatV.sub_nn K O _ _ e37_45
  have d37_46 := HeatV.sub_nn K O _ _ e37_46
  have d37_47 := HeatV.sub_nn K O _ _ e37_47
  have d37_48 := HeatV.sub_nn K O _ _ e37_48
  have d37_49 := HeatV.sub_nn K O _ _ e37_49
  have d37_50 := HeatV.sub_nn K O _ _ e37_50
  have d37_51 := HeatV.sub_nn K O _ _ e37_51
  have d37_52 := HeatV.sub_nn K O _ _ e37_52
  have d37_53 := HeatV.sub_nn K O _ _ e37_53
  have d38_39 := HeatV.sub_nn K O _ _ e38_39
  have d38_40 := HeatV.sub_nn K O _ _ e38_40
  have d38_41 := HeatV.sub_nn K O _ _ e38_41
  have d38_42 := HeatV.sub_nn K O _ _ e38_42
  have d38_43 := HeatV.sub_nn K O _ _ e38_43
  have d38_44 := HeatV.sub_nn K O _ _ e38_44
  have d38_45 := HeatV.sub_nn K O _ _ e38_45
  have d38_46 := HeatV.sub_nn K O _ _ e38_46
  have d38_47 := HeatV.sub_nn K O _ _ e38_47
  have d38_48 := HeatV.sub_nn K O _ _ e38_48
  have d38_49 := HeatV.sub_nn K O _ _ e38_49
  have d38_50 := HeatV.sub_nn K O _ _ e38_50
  have d38_51 := HeatV.sub_nn K O _ _ e38_51
  have d38_52 := HeatV.sub_nn K O _ _ e38_52
  have d38_53 := HeatV.sub_nn K O _ _ e38_53
  have d39_40 := HeatV.sub_nn K O _ _ e39_40
  have d39_41 := HeatV.sub_nn K O _ _ e39_41
  have d39_42 := HeatV.sub_nn K O _ _ e39_42
  have d39_43 := HeatV.sub_nn K O _ _ e39_43
  have d39_44 := HeatV.sub_nn K O _ _ e39_44
  have d39_45 := HeatV.sub_nn K O _ _ e39_45
  have d39_46 := HeatV.sub_nn K O _ _ e39_46
  have d39_47 := HeatV.sub_nn K O _ _ e39_47
  have d39_48 := HeatV.sub_nn K O _ _ e39_48
  have d39_49 := HeatV.sub_nn K O _ _ e39_49
  have d39_50 := HeatV.sub_nn K O _ _ e39_50
  have d39_51 := HeatV.sub_nn K O _ _ e39_51
  have d39_52 := HeatV.sub_nn K O _ _ e39_52
  have d39_53 := HeatV.sub_nn K O _ _ e39_53
  have d39_54 := HeatV.sub_nn K O _ _ e39_54
  have d40_41 := HeatV.sub_nn K O _ _ e40_41
  have d40_42 := HeatV.sub_nn K O _ _ e40_42
  have d40_43 := HeatV.sub_nn K O _ _ e40_43
  have d40_44 := HeatV.sub_nn K O _ _ e40_44
  have d40_45 := HeatV.sub_nn K O _ _ e40_45
  have d40_46 := HeatV.sub_nn K O _ _ e40_46
  have d40_47 := HeatV.sub_nn K O _ _ e40_47
  have d40_48 := HeatV.sub_nn K O _ _ e40_48
  have d40_49 := HeatV.sub_nn K O _ _ e40_49
  have d40_50 := HeatV.sub_nn K O _ _ e40_50
  have d40_51 := HeatV.sub_nn K O _ _ e40_51
  have d40_52 := HeatV.sub_nn K O _ _ e40_52
  have d40_53 := HeatV.sub_nn K O _ _ e40_53
  have d41_42 := HeatV.sub_nn K O _ _ e41_42
  have d41_43 := HeatV.sub_nn K O _ _ e41_43
  have d41_44 := HeatV.sub_nn K O _ _ e41_44
  have d41_45 := HeatV.sub_nn K O _ _ e41_45
  have d41_46 := HeatV.sub_nn K O _ _ e41_46
  have d41_47 := HeatV.sub_nn K O _ _ e41_47
  have d41_48 := HeatV.sub_nn K O _ _ e41_48
  have d41_49 := HeatV.sub_nn K O _ _ e41_49
  have d41_50 := HeatV.sub_nn K O _ _ e41_50
  have d41_51 := HeatV.sub_nn K O _ _ e41_51
  have d41_52 := HeatV.sub_nn K O _ _ e41_52
  have d41_53 := HeatV.sub_nn K O _ _ e41_53
  have d41_54 := HeatV.sub_nn K O _ _ e41_54
  have d42_43 := HeatV.sub_nn K O _ _ e42_43
  have d42_44 := HeatV.sub_nn K O _ _ e42_44
  have d42_45 := HeatV.sub_nn K O _ _ e42_45
  have d42_46 := HeatV.sub_nn K O _ _ e42_46
  have d42_47 := HeatV.sub_nn K O _ _ e42_47
  have d42_48 := HeatV.sub_nn K O _ _ e42_48
  have d42_49 := HeatV.sub_nn K O _ _ e42_49
  have d42_50 := HeatV.sub_nn K O _ _ e42_50
  have d42_51 := HeatV.sub_nn K O _ _ e42_51
  have d42_52 := HeatV.sub_nn K O _ _ e42_52
  have d42_53 := HeatV.sub_nn K O _ _ e42_53
  have d43_44 := HeatV.sub_nn K O _ _ e43_44
  have d43_45 := HeatV.sub_nn K O _ _ e43_45
  have d43_46 := HeatV.sub_nn K O _ _ e43_46
  have d43_47 := HeatV.sub_nn K O _ _ e43_47
  have d43_48 := HeatV.sub_nn K O _ _ e43_48
  have d43_49 := HeatV.sub_nn K O _ _ e43_49
  have d43_50 := HeatV.sub_nn K O _ _ e43_50
  have d43_51 := HeatV.sub_nn K O _ _ e43_51
  have d43_52 := HeatV.sub_nn K O _ _ e43_52
  have d43_53 := HeatV.sub_nn K O _ _ e43_53
  have d43_54 := HeatV.sub_nn K O _ _ e43_54
  have d44_45 := HeatV.sub_nn K O _ _ e44_45
  have d44_46 := HeatV.sub_nn K O _ _ e44_46
  have d44_47 := HeatV.sub_nn K O _ _ e44_47
  have d44_48 := HeatV.sub_nn K O _ _ e44_48
  have d44_49 := HeatV.sub_nn K O _ _ e44_49
  have d44_50 := HeatV.sub_nn K O _ _ e44_50
  have d44_51 := HeatV.sub_nn K O _ _ e44_51
  have d44_52 := HeatV.sub_nn K O _ _ e44_52
  have d44_53 := HeatV.sub_nn K O _ _ e44_53
  have d45_46 := HeatV.sub_nn K O _ _ e45_46
  have d45_47 := HeatV.sub_nn K O _ _ e45_47
  have d45_48 := HeatV.sub_nn K O _ _ e45_48
  have d45_49 := HeatV.sub_nn K O _ _ e45_49
  have d45_50 := HeatV.sub_nn K O _ _ e45_50
  have d45_51 := HeatV.sub_nn K O _ _ e45_51
  have d45_52 := HeatV.sub_nn K O _ _ e45_52
  have d45_53 := HeatV.sub_nn K O _ _ e45_53
  have d45_54 := HeatV.sub_nn K O _ _ e45_54
  have d46_47 := HeatV.sub_nn K O _ _ e46_47
  have d46_48 := HeatV.sub_nn K O _ _ e46_48
  have d46_49 := HeatV.sub_nn K O _ _ e46_49
  have d46_50 := HeatV.sub_nn K O _ _ e46_50
  have d46_51 := HeatV.sub_nn K O _ _ e46_51
  have d46_52 := HeatV.sub_nn K O _ _ e46_52
  have d46_53 := HeatV.sub_nn K O _ _ e46_53
  have d46_54 := HeatV.sub_nn K O _ _ e46_54
  have d47_48 := HeatV.sub_nn K O _ _ e47_48
  have d47_49 := HeatV.sub_nn K O _ _ e47_49
  have d47_50 := HeatV.sub_nn K O _ _ e47_50
  have d47_51 := HeatV.sub_nn K O _ _ e47_51
  have d47_52 := HeatV.sub_nn K O _ _ e47_52
  have d47_53 := HeatV.sub_nn K O _ _ e47_53
  have d47_54 := HeatV.sub_nn K O _ _ e47_54
  have d48_49 := HeatV.sub_nn K O _ _ e48_49
  have d48_50 := HeatV.sub_nn K O _ _ e48_50
  have d48_51 := HeatV.sub_nn K O _ _ e48_51
  have d48_52 := HeatV.sub_nn K O _ _ e48_52
  have d48_53 := HeatV.sub_nn K O _ _ e48_53
  have d48_54 := HeatV.sub_nn K O _ _ e48_54
  have d49_50 := HeatV.sub_nn K O _ _ e49_50
  have d49_51 := HeatV.sub_nn K O _ _ e49_51
  have d49_52 := HeatV.sub_nn K O _ _ e49_52
  have d49_53 := HeatV.sub_nn K O _ _ e49_53
  have d49_54 := HeatV.sub_nn K O _ _ e49_54
  have d50_51 := HeatV.sub_nn K O _ _ e50_51
  have d50_52 := HeatV.sub_nn K O _ _ e50_52
  have d50_53 := HeatV.sub_nn K O _ _ e50_53
  have d50_54 := HeatV.sub_nn K O _ _ e50_54
  have d51_52 := HeatV.sub_nn K O _ _ e51_52
  have d51_53 := HeatV.sub_nn K O _ _ e51_53
  have d51_54 := HeatV.sub_nn K O _ _ e51_54
  have d52_53 := HeatV.sub_nn K O _ _ e52_53
  have d52_54 := HeatV.sub_nn K O _ _ e52_54
  have d53_54 := HeatV.sub_nn K O _ _ e53_54
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+255126 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 856147600) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (  -- (+6177 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..55, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 55 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 856147600) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.  -- (+6809 chars; full line in the Zenodo source)
      (K.mul (cN K 855328320) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add  -- (+6809 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (A 37) (A 38) (A 39) (A 40) (A 41) (A 42) (A 43) (A 44) (A 45) (A 46) (A 47) (A 48) (A 49) (A 50) (A 51) (A 52) (A 53) (A 54) (A 55) (hn  -- (+490 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 55 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 55 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 55 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 55 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 55 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 55 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 55 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+81773 chars; full line in the Zenodo source)

end G61Lv54

#print axioms G61Lv54.add_nn
#print axioms G61Lv54.level
#print axioms G61Lv54.level_fun

ym/G61Lv55.lean

lean_all/ym/G61Lv55.lean

/-
  ym/G61Lv55 — T45, G61a at level n = 55 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv55

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxHeartbeats 0 in
set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 a42 a43 a44 a45 a46 a47 a48 a49 a50 a51 a52 a53 a54 a55 a56 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 :  -- (+1210 chars; full line in the Zenodo source)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e0_10 : O.le (K.  -- (+71930 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 952092736) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.  -- (+6269 chars; full line in the Zenodo source)
      (K.mul (cN K 951213340) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add  -- (+6272 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d0_10 := HeatV.sub_nn K O _ _ e0_10
  have d0_11 := HeatV.sub_nn K O _ _ e0_11
  have d0_12 := HeatV.sub_nn K O _ _ e0_12
  have d0_13 := HeatV.sub_nn K O _ _ e0_13
  have d0_14 := HeatV.sub_nn K O _ _ e0_14
  have d0_15 := HeatV.sub_nn K O _ _ e0_15
  have d0_16 := HeatV.sub_nn K O _ _ e0_16
  have d0_17 := HeatV.sub_nn K O _ _ e0_17
  have d0_18 := HeatV.sub_nn K O _ _ e0_18
  have d0_19 := HeatV.sub_nn K O _ _ e0_19
  have d0_20 := HeatV.sub_nn K O _ _ e0_20
  have d0_21 := HeatV.sub_nn K O _ _ e0_21
  have d0_22 := HeatV.sub_nn K O _ _ e0_22
  have d0_23 := HeatV.sub_nn K O _ _ e0_23
  have d0_24 := HeatV.sub_nn K O _ _ e0_24
  have d0_25 := HeatV.sub_nn K O _ _ e0_25
  have d0_26 := HeatV.sub_nn K O _ _ e0_26
  have d0_27 := HeatV.sub_nn K O _ _ e0_27
  have d0_28 := HeatV.sub_nn K O _ _ e0_28
  have d0_29 := HeatV.sub_nn K O _ _ e0_29
  have d0_30 := HeatV.sub_nn K O _ _ e0_30
  have d0_31 := HeatV.sub_nn K O _ _ e0_31
  have d0_32 := HeatV.sub_nn K O _ _ e0_32
  have d0_33 := HeatV.sub_nn K O _ _ e0_33
  have d0_34 := HeatV.sub_nn K O _ _ e0_34
  have d0_35 := HeatV.sub_nn K O _ _ e0_35
  have d0_36 := HeatV.sub_nn K O _ _ e0_36
  have d0_37 := HeatV.sub_nn K O _ _ e0_37
  have d0_38 := HeatV.sub_nn K O _ _ e0_38
  have d0_39 := HeatV.sub_nn K O _ _ e0_39
  have d0_40 := HeatV.sub_nn K O _ _ e0_40
  have d0_41 := HeatV.sub_nn K O _ _ e0_41
  have d0_42 := HeatV.sub_nn K O _ _ e0_42
  have d0_43 := HeatV.sub_nn K O _ _ e0_43
  have d0_44 := HeatV.sub_nn K O _ _ e0_44
  have d0_45 := HeatV.sub_nn K O _ _ e0_45
  have d0_46 := HeatV.sub_nn K O _ _ e0_46
  have d0_47 := HeatV.sub_nn K O _ _ e0_47
  have d0_48 := HeatV.sub_nn K O _ _ e0_48
  have d0_50 := HeatV.sub_nn K O _ _ e0_50
  have d0_51 := HeatV.sub_nn K O _ _ e0_51
  have d0_52 := HeatV.sub_nn K O _ _ e0_52
  have d0_53 := HeatV.sub_nn K O _ _ e0_53
  have d0_55 := HeatV.sub_nn K O _ _ e0_55
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d1_9 := HeatV.sub_nn K O _ _ e1_9
  have d1_10 := HeatV.sub_nn K O _ _ e1_10
  have d1_11 := HeatV.sub_nn K O _ _ e1_11
  have d1_12 := HeatV.sub_nn K O _ _ e1_12
  have d1_13 := HeatV.sub_nn K O _ _ e1_13
  have d1_14 := HeatV.sub_nn K O _ _ e1_14
  have d1_15 := HeatV.sub_nn K O _ _ e1_15
  have d1_16 := HeatV.sub_nn K O _ _ e1_16
  have d1_17 := HeatV.sub_nn K O _ _ e1_17
  have d1_18 := HeatV.sub_nn K O _ _ e1_18
  have d1_19 := HeatV.sub_nn K O _ _ e1_19
  have d1_20 := HeatV.sub_nn K O _ _ e1_20
  have d1_21 := HeatV.sub_nn K O _ _ e1_21
  have d1_22 := HeatV.sub_nn K O _ _ e1_22
  have d1_23 := HeatV.sub_nn K O _ _ e1_23
  have d1_24 := HeatV.sub_nn K O _ _ e1_24
  have d1_25 := HeatV.sub_nn K O _ _ e1_25
  have d1_26 := HeatV.sub_nn K O _ _ e1_26
  have d1_27 := HeatV.sub_nn K O _ _ e1_27
  have d1_28 := HeatV.sub_nn K O _ _ e1_28
  have d1_29 := HeatV.sub_nn K O _ _ e1_29
  have d1_30 := HeatV.sub_nn K O _ _ e1_30
  have d1_31 := HeatV.sub_nn K O _ _ e1_31
  have d1_32 := HeatV.sub_nn K O _ _ e1_32
  have d1_33 := HeatV.sub_nn K O _ _ e1_33
  have d1_34 := HeatV.sub_nn K O _ _ e1_34
  have d1_35 := HeatV.sub_nn K O _ _ e1_35
  have d1_36 := HeatV.sub_nn K O _ _ e1_36
  have d1_37 := HeatV.sub_nn K O _ _ e1_37
  have d1_38 := HeatV.sub_nn K O _ _ e1_38
  have d1_39 := HeatV.sub_nn K O _ _ e1_39
  have d1_40 := HeatV.sub_nn K O _ _ e1_40
  have d1_41 := HeatV.sub_nn K O _ _ e1_41
  have d1_42 := HeatV.sub_nn K O _ _ e1_42
  have d1_43 := HeatV.sub_nn K O _ _ e1_43
  have d1_44 := HeatV.sub_nn K O _ _ e1_44
  have d1_45 := HeatV.sub_nn K O _ _ e1_45
  have d1_46 := HeatV.sub_nn K O _ _ e1_46
  have d1_47 := HeatV.sub_nn K O _ _ e1_47
  have d1_48 := HeatV.sub_nn K O _ _ e1_48
  have d1_50 := HeatV.sub_nn K O _ _ e1_50
  have d1_51 := HeatV.sub_nn K O _ _ e1_51
  have d1_54 := HeatV.sub_nn K O _ _ e1_54
  have d1_55 := HeatV.sub_nn K O _ _ e1_55
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d2_10 := HeatV.sub_nn K O _ _ e2_10
  have d2_11 := HeatV.sub_nn K O _ _ e2_11
  have d2_12 := HeatV.sub_nn K O _ _ e2_12
  have d2_13 := HeatV.sub_nn K O _ _ e2_13
  have d2_14 := HeatV.sub_nn K O _ _ e2_14
  have d2_15 := HeatV.sub_nn K O _ _ e2_15
  have d2_16 := HeatV.sub_nn K O _ _ e2_16
  have d2_17 := HeatV.sub_nn K O _ _ e2_17
  have d2_18 := HeatV.sub_nn K O _ _ e2_18
  have d2_19 := HeatV.sub_nn K O _ _ e2_19
  have d2_20 := HeatV.sub_nn K O _ _ e2_20
  have d2_21 := HeatV.sub_nn K O _ _ e2_21
  have d2_22 := HeatV.sub_nn K O _ _ e2_22
  have d2_23 := HeatV.sub_nn K O _ _ e2_23
  have d2_24 := HeatV.sub_nn K O _ _ e2_24
  have d2_25 := HeatV.sub_nn K O _ _ e2_25
  have d2_26 := HeatV.sub_nn K O _ _ e2_26
  have d2_27 := HeatV.sub_nn K O _ _ e2_27
  have d2_28 := HeatV.sub_nn K O _ _ e2_28
  have d2_29 := HeatV.sub_nn K O _ _ e2_29
  have d2_30 := HeatV.sub_nn K O _ _ e2_30
  have d2_31 := HeatV.sub_nn K O _ _ e2_31
  have d2_32 := HeatV.sub_nn K O _ _ e2_32
  have d2_33 := HeatV.sub_nn K O _ _ e2_33
  have d2_34 := HeatV.sub_nn K O _ _ e2_34
  have d2_35 := HeatV.sub_nn K O _ _ e2_35
  have d2_36 := HeatV.sub_nn K O _ _ e2_36
  have d2_37 := HeatV.sub_nn K O _ _ e2_37
  have d2_38 := HeatV.sub_nn K O _ _ e2_38
  have d2_39 := HeatV.sub_nn K O _ _ e2_39
  have d2_40 := HeatV.sub_nn K O _ _ e2_40
  have d2_41 := HeatV.sub_nn K O _ _ e2_41
  have d2_42 := HeatV.sub_nn K O _ _ e2_42
  have d2_43 := HeatV.sub_nn K O _ _ e2_43
  have d2_44 := HeatV.sub_nn K O _ _ e2_44
  have d2_45 := HeatV.sub_nn K O _ _ e2_45
  have d2_46 := HeatV.sub_nn K O _ _ e2_46
  have d2_47 := HeatV.sub_nn K O _ _ e2_47
  have d2_48 := HeatV.sub_nn K O _ _ e2_48
  have d2_49 := HeatV.sub_nn K O _ _ e2_49
  have d2_51 := HeatV.sub_nn K O _ _ e2_51
  have d2_53 := HeatV.sub_nn K O _ _ e2_53
  have d2_54 := HeatV.sub_nn K O _ _ e2_54
  have d2_55 := HeatV.sub_nn K O _ _ e2_55
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d3_10 := HeatV.sub_nn K O _ _ e3_10
  have d3_11 := HeatV.sub_nn K O _ _ e3_11
  have d3_12 := HeatV.sub_nn K O _ _ e3_12
  have d3_13 := HeatV.sub_nn K O _ _ e3_13
  have d3_14 := HeatV.sub_nn K O _ _ e3_14
  have d3_15 := HeatV.sub_nn K O _ _ e3_15
  have d3_16 := HeatV.sub_nn K O _ _ e3_16
  have d3_17 := HeatV.sub_nn K O _ _ e3_17
  have d3_18 := HeatV.sub_nn K O _ _ e3_18
  have d3_19 := HeatV.sub_nn K O _ _ e3_19
  have d3_20 := HeatV.sub_nn K O _ _ e3_20
  have d3_21 := HeatV.sub_nn K O _ _ e3_21
  have d3_22 := HeatV.sub_nn K O _ _ e3_22
  have d3_23 := HeatV.sub_nn K O _ _ e3_23
  have d3_24 := HeatV.sub_nn K O _ _ e3_24
  have d3_25 := HeatV.sub_nn K O _ _ e3_25
  have d3_26 := HeatV.sub_nn K O _ _ e3_26
  have d3_27 := HeatV.sub_nn K O _ _ e3_27
  have d3_28 := HeatV.sub_nn K O _ _ e3_28
  have d3_29 := HeatV.sub_nn K O _ _ e3_29
  have d3_30 := HeatV.sub_nn K O _ _ e3_30
  have d3_31 := HeatV.sub_nn K O _ _ e3_31
  have d3_32 := HeatV.sub_nn K O _ _ e3_32
  have d3_33 := HeatV.sub_nn K O _ _ e3_33
  have d3_34 := HeatV.sub_nn K O _ _ e3_34
  have d3_35 := HeatV.sub_nn K O _ _ e3_35
  have d3_36 := HeatV.sub_nn K O _ _ e3_36
  have d3_37 := HeatV.sub_nn K O _ _ e3_37
  have d3_39 := HeatV.sub_nn K O _ _ e3_39
  have d3_40 := HeatV.sub_nn K O _ _ e3_40
  have d3_43 := HeatV.sub_nn K O _ _ e3_43
  have d3_44 := HeatV.sub_nn K O _ _ e3_44
  have d3_45 := HeatV.sub_nn K O _ _ e3_45
  have d3_46 := HeatV.sub_nn K O _ _ e3_46
  have d3_47 := HeatV.sub_nn K O _ _ e3_47
  have d3_48 := HeatV.sub_nn K O _ _ e3_48
  have d3_49 := HeatV.sub_nn K O _ _ e3_49
  have d3_52 := HeatV.sub_nn K O _ _ e3_52
  have d3_53 := HeatV.sub_nn K O _ _ e3_53
  have d3_54 := HeatV.sub_nn K O _ _ e3_54
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d4_10 := HeatV.sub_nn K O _ _ e4_10
  have d4_11 := HeatV.sub_nn K O _ _ e4_11
  have d4_12 := HeatV.sub_nn K O _ _ e4_12
  have d4_13 := HeatV.sub_nn K O _ _ e4_13
  have d4_14 := HeatV.sub_nn K O _ _ e4_14
  have d4_15 := HeatV.sub_nn K O _ _ e4_15
  have d4_16 := HeatV.sub_nn K O _ _ e4_16
  have d4_17 := HeatV.sub_nn K O _ _ e4_17
  have d4_18 := HeatV.sub_nn K O _ _ e4_18
  have d4_19 := HeatV.sub_nn K O _ _ e4_19
  have d4_20 := HeatV.sub_nn K O _ _ e4_20
  have d4_21 := HeatV.sub_nn K O _ _ e4_21
  have d4_22 := HeatV.sub_nn K O _ _ e4_22
  have d4_23 := HeatV.sub_nn K O _ _ e4_23
  have d4_24 := HeatV.sub_nn K O _ _ e4_24
  have d4_25 := HeatV.sub_nn K O _ _ e4_25
  have d4_26 := HeatV.sub_nn K O _ _ e4_26
  have d4_27 := HeatV.sub_nn K O _ _ e4_27
  have d4_28 := HeatV.sub_nn K O _ _ e4_28
  have d4_29 := HeatV.sub_nn K O _ _ e4_29
  have d4_30 := HeatV.sub_nn K O _ _ e4_30
  have d4_31 := HeatV.sub_nn K O _ _ e4_31
  have d4_32 := HeatV.sub_nn K O _ _ e4_32
  have d4_33 := HeatV.sub_nn K O _ _ e4_33
  have d4_35 := HeatV.sub_nn K O _ _ e4_35
  have d4_36 := HeatV.sub_nn K O _ _ e4_36
  have d4_37 := HeatV.sub_nn K O _ _ e4_37
  have d4_39 := HeatV.sub_nn K O _ _ e4_39
  have d4_40 := HeatV.sub_nn K O _ _ e4_40
  have d4_41 := HeatV.sub_nn K O _ _ e4_41
  have d4_42 := HeatV.sub_nn K O _ _ e4_42
  have d4_43 := HeatV.sub_nn K O _ _ e4_43
  have d4_44 := HeatV.sub_nn K O _ _ e4_44
  have d4_45 := HeatV.sub_nn K O _ _ e4_45
  have d4_46 := HeatV.sub_nn K O _ _ e4_46
  have d4_47 := HeatV.sub_nn K O _ _ e4_47
  have d4_48 := HeatV.sub_nn K O _ _ e4_48
  have d4_49 := HeatV.sub_nn K O _ _ e4_49
  have d4_51 := HeatV.sub_nn K O _ _ e4_51
  have d4_52 := HeatV.sub_nn K O _ _ e4_52
  have d4_53 := HeatV.sub_nn K O _ _ e4_53
  have d4_54 := HeatV.sub_nn K O _ _ e4_54
  have d4_55 := HeatV.sub_nn K O _ _ e4_55
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d5_10 := HeatV.sub_nn K O _ _ e5_10
  have d5_11 := HeatV.sub_nn K O _ _ e5_11
  have d5_12 := HeatV.sub_nn K O _ _ e5_12
  have d5_13 := HeatV.sub_nn K O _ _ e5_13
  have d5_14 := HeatV.sub_nn K O _ _ e5_14
  have d5_15 := HeatV.sub_nn K O _ _ e5_15
  have d5_16 := HeatV.sub_nn K O _ _ e5_16
  have d5_18 := HeatV.sub_nn K O _ _ e5_18
  have d5_19 := HeatV.sub_nn K O _ _ e5_19
  have d5_20 := HeatV.sub_nn K O _ _ e5_20
  have d5_21 := HeatV.sub_nn K O _ _ e5_21
  have d5_22 := HeatV.sub_nn K O _ _ e5_22
  have d5_23 := HeatV.sub_nn K O _ _ e5_23
  have d5_24 := HeatV.sub_nn K O _ _ e5_24
  have d5_25 := HeatV.sub_nn K O _ _ e5_25
  have d5_26 := HeatV.sub_nn K O _ _ e5_26
  have d5_27 := HeatV.sub_nn K O _ _ e5_27
  have d5_28 := HeatV.sub_nn K O _ _ e5_28
  have d5_29 := HeatV.sub_nn K O _ _ e5_29
  have d5_30 := HeatV.sub_nn K O _ _ e5_30
  have d5_31 := HeatV.sub_nn K O _ _ e5_31
  have d5_32 := HeatV.sub_nn K O _ _ e5_32
  have d5_33 := HeatV.sub_nn K O _ _ e5_33
  have d5_34 := HeatV.sub_nn K O _ _ e5_34
  have d5_35 := HeatV.sub_nn K O _ _ e5_35
  have d5_36 := HeatV.sub_nn K O _ _ e5_36
  have d5_37 := HeatV.sub_nn K O _ _ e5_37
  have d5_38 := HeatV.sub_nn K O _ _ e5_38
  have d5_39 := HeatV.sub_nn K O _ _ e5_39
  have d5_40 := HeatV.sub_nn K O _ _ e5_40
  have d5_41 := HeatV.sub_nn K O _ _ e5_41
  have d5_42 := HeatV.sub_nn K O _ _ e5_42
  have d5_43 := HeatV.sub_nn K O _ _ e5_43
  have d5_44 := HeatV.sub_nn K O _ _ e5_44
  have d5_45 := HeatV.sub_nn K O _ _ e5_45
  have d5_46 := HeatV.sub_nn K O _ _ e5_46
  have d5_47 := HeatV.sub_nn K O _ _ e5_47
  have d5_48 := HeatV.sub_nn K O _ _ e5_48
  have d5_50 := HeatV.sub_nn K O _ _ e5_50
  have d5_51 := HeatV.sub_nn K O _ _ e5_51
  have d5_52 := HeatV.sub_nn K O _ _ e5_52
  have d5_53 := HeatV.sub_nn K O _ _ e5_53
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d6_10 := HeatV.sub_nn K O _ _ e6_10
  have d6_11 := HeatV.sub_nn K O _ _ e6_11
  have d6_12 := HeatV.sub_nn K O _ _ e6_12
  have d6_13 := HeatV.sub_nn K O _ _ e6_13
  have d6_14 := HeatV.sub_nn K O _ _ e6_14
  have d6_15 := HeatV.sub_nn K O _ _ e6_15
  have d6_16 := HeatV.sub_nn K O _ _ e6_16
  have d6_17 := HeatV.sub_nn K O _ _ e6_17
  have d6_18 := HeatV.sub_nn K O _ _ e6_18
  have d6_19 := HeatV.sub_nn K O _ _ e6_19
  have d6_20 := HeatV.sub_nn K O _ _ e6_20
  have d6_21 := HeatV.sub_nn K O _ _ e6_21
  have d6_22 := HeatV.sub_nn K O _ _ e6_22
  have d6_23 := HeatV.sub_nn K O _ _ e6_23
  have d6_24 := HeatV.sub_nn K O _ _ e6_24
  have d6_25 := HeatV.sub_nn K O _ _ e6_25
  have d6_26 := HeatV.sub_nn K O _ _ e6_26
  have d6_27 := HeatV.sub_nn K O _ _ e6_27
  have d6_28 := HeatV.sub_nn K O _ _ e6_28
  have d6_29 := HeatV.sub_nn K O _ _ e6_29
  have d6_30 := HeatV.sub_nn K O _ _ e6_30
  have d6_31 := HeatV.sub_nn K O _ _ e6_31
  have d6_33 := HeatV.sub_nn K O _ _ e6_33
  have d6_35 := HeatV.sub_nn K O _ _ e6_35
  have d6_36 := HeatV.sub_nn K O _ _ e6_36
  have d6_37 := HeatV.sub_nn K O _ _ e6_37
  have d6_38 := HeatV.sub_nn K O _ _ e6_38
  have d6_39 := HeatV.sub_nn K O _ _ e6_39
  have d6_40 := HeatV.sub_nn K O _ _ e6_40
  have d6_41 := HeatV.sub_nn K O _ _ e6_41
  have d6_42 := HeatV.sub_nn K O _ _ e6_42
  have d6_43 := HeatV.sub_nn K O _ _ e6_43
  have d6_46 := HeatV.sub_nn K O _ _ e6_46
  have d6_47 := HeatV.sub_nn K O _ _ e6_47
  have d6_49 := HeatV.sub_nn K O _ _ e6_49
  have d6_50 := HeatV.sub_nn K O _ _ e6_50
  have d6_51 := HeatV.sub_nn K O _ _ e6_51
  have d6_52 := HeatV.sub_nn K O _ _ e6_52
  have d6_53 := HeatV.sub_nn K O _ _ e6_53
  have d6_54 := HeatV.sub_nn K O _ _ e6_54
  have d6_55 := HeatV.sub_nn K O _ _ e6_55
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d7_10 := HeatV.sub_nn K O _ _ e7_10
  have d7_11 := HeatV.sub_nn K O _ _ e7_11
  have d7_12 := HeatV.sub_nn K O _ _ e7_12
  have d7_13 := HeatV.sub_nn K O _ _ e7_13
  have d7_14 := HeatV.sub_nn K O _ _ e7_14
  have d7_15 := HeatV.sub_nn K O _ _ e7_15
  have d7_16 := HeatV.sub_nn K O _ _ e7_16
  have d7_17 := HeatV.sub_nn K O _ _ e7_17
  have d7_18 := HeatV.sub_nn K O _ _ e7_18
  have d7_19 := HeatV.sub_nn K O _ _ e7_19
  have d7_20 := HeatV.sub_nn K O _ _ e7_20
  have d7_21 := HeatV.sub_nn K O _ _ e7_21
  have d7_22 := HeatV.sub_nn K O _ _ e7_22
  have d7_24 := HeatV.sub_nn K O _ _ e7_24
  have d7_25 := HeatV.sub_nn K O _ _ e7_25
  have d7_26 := HeatV.sub_nn K O _ _ e7_26
  have d7_27 := HeatV.sub_nn K O _ _ e7_27
  have d7_28 := HeatV.sub_nn K O _ _ e7_28
  have d7_29 := HeatV.sub_nn K O _ _ e7_29
  have d7_30 := HeatV.sub_nn K O _ _ e7_30
  have d7_31 := HeatV.sub_nn K O _ _ e7_31
  have d7_32 := HeatV.sub_nn K O _ _ e7_32
  have d7_33 := HeatV.sub_nn K O _ _ e7_33
  have d7_34 := HeatV.sub_nn K O _ _ e7_34
  have d7_35 := HeatV.sub_nn K O _ _ e7_35
  have d7_36 := HeatV.sub_nn K O _ _ e7_36
  have d7_37 := HeatV.sub_nn K O _ _ e7_37
  have d7_38 := HeatV.sub_nn K O _ _ e7_38
  have d7_39 := HeatV.sub_nn K O _ _ e7_39
  have d7_40 := HeatV.sub_nn K O _ _ e7_40
  have d7_41 := HeatV.sub_nn K O _ _ e7_41
  have d7_42 := HeatV.sub_nn K O _ _ e7_42
  have d7_43 := HeatV.sub_nn K O _ _ e7_43
  have d7_44 := HeatV.sub_nn K O _ _ e7_44
  have d7_45 := HeatV.sub_nn K O _ _ e7_45
  have d7_46 := HeatV.sub_nn K O _ _ e7_46
  have d7_48 := HeatV.sub_nn K O _ _ e7_48
  have d7_49 := HeatV.sub_nn K O _ _ e7_49
  have d7_50 := HeatV.sub_nn K O _ _ e7_50
  have d7_51 := HeatV.sub_nn K O _ _ e7_51
  have d7_52 := HeatV.sub_nn K O _ _ e7_52
  have d7_53 := HeatV.sub_nn K O _ _ e7_53
  have d7_54 := HeatV.sub_nn K O _ _ e7_54
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have d8_10 := HeatV.sub_nn K O _ _ e8_10
  have d8_11 := HeatV.sub_nn K O _ _ e8_11
  have d8_12 := HeatV.sub_nn K O _ _ e8_12
  have d8_13 := HeatV.sub_nn K O _ _ e8_13
  have d8_14 := HeatV.sub_nn K O _ _ e8_14
  have d8_15 := HeatV.sub_nn K O _ _ e8_15
  have d8_16 := HeatV.sub_nn K O _ _ e8_16
  have d8_17 := HeatV.sub_nn K O _ _ e8_17
  have d8_18 := HeatV.sub_nn K O _ _ e8_18
  have d8_19 := HeatV.sub_nn K O _ _ e8_19
  have d8_20 := HeatV.sub_nn K O _ _ e8_20
  have d8_21 := HeatV.sub_nn K O _ _ e8_21
  have d8_22 := HeatV.sub_nn K O _ _ e8_22
  have d8_23 := HeatV.sub_nn K O _ _ e8_23
  have d8_24 := HeatV.sub_nn K O _ _ e8_24
  have d8_25 := HeatV.sub_nn K O _ _ e8_25
  have d8_26 := HeatV.sub_nn K O _ _ e8_26
  have d8_27 := HeatV.sub_nn K O _ _ e8_27
  have d8_28 := HeatV.sub_nn K O _ _ e8_28
  have d8_29 := HeatV.sub_nn K O _ _ e8_29
  have d8_30 := HeatV.sub_nn K O _ _ e8_30
  have d8_31 := HeatV.sub_nn K O _ _ e8_31
  have d8_32 := HeatV.sub_nn K O _ _ e8_32
  have d8_33 := HeatV.sub_nn K O _ _ e8_33
  have d8_34 := HeatV.sub_nn K O _ _ e8_34
  have d8_35 := HeatV.sub_nn K O _ _ e8_35
  have d8_36 := HeatV.sub_nn K O _ _ e8_36
  have d8_37 := HeatV.sub_nn K O _ _ e8_37
  have d8_38 := HeatV.sub_nn K O _ _ e8_38
  have d8_39 := HeatV.sub_nn K O _ _ e8_39
  have d8_40 := HeatV.sub_nn K O _ _ e8_40
  have d8_41 := HeatV.sub_nn K O _ _ e8_41
  have d8_42 := HeatV.sub_nn K O _ _ e8_42
  have d8_43 := HeatV.sub_nn K O _ _ e8_43
  have d8_44 := HeatV.sub_nn K O _ _ e8_44
  have d8_45 := HeatV.sub_nn K O _ _ e8_45
  have d8_46 := HeatV.sub_nn K O _ _ e8_46
  have d8_47 := HeatV.sub_nn K O _ _ e8_47
  have d8_48 := HeatV.sub_nn K O _ _ e8_48
  have d8_49 := HeatV.sub_nn K O _ _ e8_49
  have d8_50 := HeatV.sub_nn K O _ _ e8_50
  have d8_51 := HeatV.sub_nn K O _ _ e8_51
  have d8_52 := HeatV.sub_nn K O _ _ e8_52
  have d8_53 := HeatV.sub_nn K O _ _ e8_53
  have d8_54 := HeatV.sub_nn K O _ _ e8_54
  have d9_10 := HeatV.sub_nn K O _ _ e9_10
  have d9_11 := HeatV.sub_nn K O _ _ e9_11
  have d9_12 := HeatV.sub_nn K O _ _ e9_12
  have d9_13 := HeatV.sub_nn K O _ _ e9_13
  have d9_14 := HeatV.sub_nn K O _ _ e9_14
  have d9_15 := HeatV.sub_nn K O _ _ e9_15
  have d9_16 := HeatV.sub_nn K O _ _ e9_16
  have d9_17 := HeatV.sub_nn K O _ _ e9_17
  have d9_18 := HeatV.sub_nn K O _ _ e9_18
  have d9_19 := HeatV.sub_nn K O _ _ e9_19
  have d9_20 := HeatV.sub_nn K O _ _ e9_20
  have d9_21 := HeatV.sub_nn K O _ _ e9_21
  have d9_22 := HeatV.sub_nn K O _ _ e9_22
  have d9_23 := HeatV.sub_nn K O _ _ e9_23
  have d9_24 := HeatV.sub_nn K O _ _ e9_24
  have d9_25 := HeatV.sub_nn K O _ _ e9_25
  have d9_26 := HeatV.sub_nn K O _ _ e9_26
  have d9_27 := HeatV.sub_nn K O _ _ e9_27
  have d9_28 := HeatV.sub_nn K O _ _ e9_28
  have d9_29 := HeatV.sub_nn K O _ _ e9_29
  have d9_30 := HeatV.sub_nn K O _ _ e9_30
  have d9_31 := HeatV.sub_nn K O _ _ e9_31
  have d9_32 := HeatV.sub_nn K O _ _ e9_32
  have d9_33 := HeatV.sub_nn K O _ _ e9_33
  have d9_34 := HeatV.sub_nn K O _ _ e9_34
  have d9_35 := HeatV.sub_nn K O _ _ e9_35
  have d9_36 := HeatV.sub_nn K O _ _ e9_36
  have d9_37 := HeatV.sub_nn K O _ _ e9_37
  have d9_38 := HeatV.sub_nn K O _ _ e9_38
  have d9_39 := HeatV.sub_nn K O _ _ e9_39
  have d9_40 := HeatV.sub_nn K O _ _ e9_40
  have d9_42 := HeatV.sub_nn K O _ _ e9_42
  have d9_43 := HeatV.sub_nn K O _ _ e9_43
  have d9_44 := HeatV.sub_nn K O _ _ e9_44
  have d9_46 := HeatV.sub_nn K O _ _ e9_46
  have d9_47 := HeatV.sub_nn K O _ _ e9_47
  have d9_49 := HeatV.sub_nn K O _ _ e9_49
  have d9_50 := HeatV.sub_nn K O _ _ e9_50
  have d9_51 := HeatV.sub_nn K O _ _ e9_51
  have d9_52 := HeatV.sub_nn K O _ _ e9_52
  have d9_53 := HeatV.sub_nn K O _ _ e9_53
  have d9_54 := HeatV.sub_nn K O _ _ e9_54
  have d10_11 := HeatV.sub_nn K O _ _ e10_11
  have d10_12 := HeatV.sub_nn K O _ _ e10_12
  have d10_13 := HeatV.sub_nn K O _ _ e10_13
  have d10_14 := HeatV.sub_nn K O _ _ e10_14
  have d10_15 := HeatV.sub_nn K O _ _ e10_15
  have d10_16 := HeatV.sub_nn K O _ _ e10_16
  have d10_17 := HeatV.sub_nn K O _ _ e10_17
  have d10_18 := HeatV.sub_nn K O _ _ e10_18
  have d10_19 := HeatV.sub_nn K O _ _ e10_19
  have d10_20 := HeatV.sub_nn K O _ _ e10_20
  have d10_21 := HeatV.sub_nn K O _ _ e10_21
  have d10_22 := HeatV.sub_nn K O _ _ e10_22
  have d10_23 := HeatV.sub_nn K O _ _ e10_23
  have d10_24 := HeatV.sub_nn K O _ _ e10_24
  have d10_25 := HeatV.sub_nn K O _ _ e10_25
  have d10_26 := HeatV.sub_nn K O _ _ e10_26
  have d10_27 := HeatV.sub_nn K O _ _ e10_27
  have d10_28 := HeatV.sub_nn K O _ _ e10_28
  have d10_29 := HeatV.sub_nn K O _ _ e10_29
  have d10_30 := HeatV.sub_nn K O _ _ e10_30
  have d10_31 := HeatV.sub_nn K O _ _ e10_31
  have d10_32 := HeatV.sub_nn K O _ _ e10_32
  have d10_33 := HeatV.sub_nn K O _ _ e10_33
  have d10_34 := HeatV.sub_nn K O _ _ e10_34
  have d10_35 := HeatV.sub_nn K O _ _ e10_35
  have d10_36 := HeatV.sub_nn K O _ _ e10_36
  have d10_37 := HeatV.sub_nn K O _ _ e10_37
  have d10_38 := HeatV.sub_nn K O _ _ e10_38
  have d10_39 := HeatV.sub_nn K O _ _ e10_39
  have d10_40 := HeatV.sub_nn K O _ _ e10_40
  have d10_41 := HeatV.sub_nn K O _ _ e10_41
  have d10_42 := HeatV.sub_nn K O _ _ e10_42
  have d10_43 := HeatV.sub_nn K O _ _ e10_43
  have d10_45 := HeatV.sub_nn K O _ _ e10_45
  have d10_46 := HeatV.sub_nn K O _ _ e10_46
  have d10_47 := HeatV.sub_nn K O _ _ e10_47
  have d10_49 := HeatV.sub_nn K O _ _ e10_49
  have d10_50 := HeatV.sub_nn K O _ _ e10_50
  have d10_51 := HeatV.sub_nn K O _ _ e10_51
  have d10_52 := HeatV.sub_nn K O _ _ e10_52
  have d10_53 := HeatV.sub_nn K O _ _ e10_53
  have d10_54 := HeatV.sub_nn K O _ _ e10_54
  have d10_55 := HeatV.sub_nn K O _ _ e10_55
  have d11_12 := HeatV.sub_nn K O _ _ e11_12
  have d11_13 := HeatV.sub_nn K O _ _ e11_13
  have d11_14 := HeatV.sub_nn K O _ _ e11_14
  have d11_15 := HeatV.sub_nn K O _ _ e11_15
  have d11_16 := HeatV.sub_nn K O _ _ e11_16
  have d11_17 := HeatV.sub_nn K O _ _ e11_17
  have d11_18 := HeatV.sub_nn K O _ _ e11_18
  have d11_19 := HeatV.sub_nn K O _ _ e11_19
  have d11_20 := HeatV.sub_nn K O _ _ e11_20
  have d11_21 := HeatV.sub_nn K O _ _ e11_21
  have d11_22 := HeatV.sub_nn K O _ _ e11_22
  have d11_23 := HeatV.sub_nn K O _ _ e11_23
  have d11_24 := HeatV.sub_nn K O _ _ e11_24
  have d11_25 := HeatV.sub_nn K O _ _ e11_25
  have d11_26 := HeatV.sub_nn K O _ _ e11_26
  have d11_27 := HeatV.sub_nn K O _ _ e11_27
  have d11_28 := HeatV.sub_nn K O _ _ e11_28
  have d11_29 := HeatV.sub_nn K O _ _ e11_29
  have d11_30 := HeatV.sub_nn K O _ _ e11_30
  have d11_31 := HeatV.sub_nn K O _ _ e11_31
  have d11_32 := HeatV.sub_nn K O _ _ e11_32
  have d11_33 := HeatV.sub_nn K O _ _ e11_33
  have d11_34 := HeatV.sub_nn K O _ _ e11_34
  have d11_35 := HeatV.sub_nn K O _ _ e11_35
  have d11_36 := HeatV.sub_nn K O _ _ e11_36
  have d11_37 := HeatV.sub_nn K O _ _ e11_37
  have d11_38 := HeatV.sub_nn K O _ _ e11_38
  have d11_39 := HeatV.sub_nn K O _ _ e11_39
  have d11_41 := HeatV.sub_nn K O _ _ e11_41
  have d11_42 := HeatV.sub_nn K O _ _ e11_42
  have d11_44 := HeatV.sub_nn K O _ _ e11_44
  have d11_45 := HeatV.sub_nn K O _ _ e11_45
  have d11_46 := HeatV.sub_nn K O _ _ e11_46
  have d11_47 := HeatV.sub_nn K O _ _ e11_47
  have d11_48 := HeatV.sub_nn K O _ _ e11_48
  have d11_49 := HeatV.sub_nn K O _ _ e11_49
  have d11_50 := HeatV.sub_nn K O _ _ e11_50
  have d11_51 := HeatV.sub_nn K O _ _ e11_51
  have d11_52 := HeatV.sub_nn K O _ _ e11_52
  have d11_53 := HeatV.sub_nn K O _ _ e11_53
  have d11_54 := HeatV.sub_nn K O _ _ e11_54
  have d12_13 := HeatV.sub_nn K O _ _ e12_13
  have d12_14 := HeatV.sub_nn K O _ _ e12_14
  have d12_15 := HeatV.sub_nn K O _ _ e12_15
  have d12_16 := HeatV.sub_nn K O _ _ e12_16
  have d12_17 := HeatV.sub_nn K O _ _ e12_17
  have d12_18 := HeatV.sub_nn K O _ _ e12_18
  have d12_19 := HeatV.sub_nn K O _ _ e12_19
  have d12_20 := HeatV.sub_nn K O _ _ e12_20
  have d12_21 := HeatV.sub_nn K O _ _ e12_21
  have d12_22 := HeatV.sub_nn K O _ _ e12_22
  have d12_23 := HeatV.sub_nn K O _ _ e12_23
  have d12_24 := HeatV.sub_nn K O _ _ e12_24
  have d12_25 := HeatV.sub_nn K O _ _ e12_25
  have d12_26 := HeatV.sub_nn K O _ _ e12_26
  have d12_27 := HeatV.sub_nn K O _ _ e12_27
  have d12_28 := HeatV.sub_nn K O _ _ e12_28
  have d12_29 := HeatV.sub_nn K O _ _ e12_29
  have d12_30 := HeatV.sub_nn K O _ _ e12_30
  have d12_31 := HeatV.sub_nn K O _ _ e12_31
  have d12_32 := HeatV.sub_nn K O _ _ e12_32
  have d12_33 := HeatV.sub_nn K O _ _ e12_33
  have d12_34 := HeatV.sub_nn K O _ _ e12_34
  have d12_35 := HeatV.sub_nn K O _ _ e12_35
  have d12_36 := HeatV.sub_nn K O _ _ e12_36
  have d12_37 := HeatV.sub_nn K O _ _ e12_37
  have d12_38 := HeatV.sub_nn K O _ _ e12_38
  have d12_39 := HeatV.sub_nn K O _ _ e12_39
  have d12_41 := HeatV.sub_nn K O _ _ e12_41
  have d12_43 := HeatV.sub_nn K O _ _ e12_43
  have d12_44 := HeatV.sub_nn K O _ _ e12_44
  have d12_45 := HeatV.sub_nn K O _ _ e12_45
  have d12_46 := HeatV.sub_nn K O _ _ e12_46
  have d12_47 := HeatV.sub_nn K O _ _ e12_47
  have d12_48 := HeatV.sub_nn K O _ _ e12_48
  have d12_49 := HeatV.sub_nn K O _ _ e12_49
  have d12_50 := HeatV.sub_nn K O _ _ e12_50
  have d12_51 := HeatV.sub_nn K O _ _ e12_51
  have d12_52 := HeatV.sub_nn K O _ _ e12_52
  have d12_53 := HeatV.sub_nn K O _ _ e12_53
  have d12_54 := HeatV.sub_nn K O _ _ e12_54
  have d13_14 := HeatV.sub_nn K O _ _ e13_14
  have d13_15 := HeatV.sub_nn K O _ _ e13_15
  have d13_16 := HeatV.sub_nn K O _ _ e13_16
  have d13_17 := HeatV.sub_nn K O _ _ e13_17
  have d13_18 := HeatV.sub_nn K O _ _ e13_18
  have d13_19 := HeatV.sub_nn K O _ _ e13_19
  have d13_20 := HeatV.sub_nn K O _ _ e13_20
  have d13_21 := HeatV.sub_nn K O _ _ e13_21
  have d13_22 := HeatV.sub_nn K O _ _ e13_22
  have d13_23 := HeatV.sub_nn K O _ _ e13_23
  have d13_24 := HeatV.sub_nn K O _ _ e13_24
  have d13_25 := HeatV.sub_nn K O _ _ e13_25
  have d13_26 := HeatV.sub_nn K O _ _ e13_26
  have d13_27 := HeatV.sub_nn K O _ _ e13_27
  have d13_28 := HeatV.sub_nn K O _ _ e13_28
  have d13_29 := HeatV.sub_nn K O _ _ e13_29
  have d13_30 := HeatV.sub_nn K O _ _ e13_30
  have d13_31 := HeatV.sub_nn K O _ _ e13_31
  have d13_32 := HeatV.sub_nn K O _ _ e13_32
  have d13_33 := HeatV.sub_nn K O _ _ e13_33
  have d13_34 := HeatV.sub_nn K O _ _ e13_34
  have d13_35 := HeatV.sub_nn K O _ _ e13_35
  have d13_36 := HeatV.sub_nn K O _ _ e13_36
  have d13_37 := HeatV.sub_nn K O _ _ e13_37
  have d13_38 := HeatV.sub_nn K O _ _ e13_38
  have d13_39 := HeatV.sub_nn K O _ _ e13_39
  have d13_40 := HeatV.sub_nn K O _ _ e13_40
  have d13_42 := HeatV.sub_nn K O _ _ e13_42
  have d13_43 := HeatV.sub_nn K O _ _ e13_43
  have d13_44 := HeatV.sub_nn K O _ _ e13_44
  have d13_45 := HeatV.sub_nn K O _ _ e13_45
  have d13_46 := HeatV.sub_nn K O _ _ e13_46
  have d13_47 := HeatV.sub_nn K O _ _ e13_47
  have d13_48 := HeatV.sub_nn K O _ _ e13_48
  have d13_49 := HeatV.sub_nn K O _ _ e13_49
  have d13_50 := HeatV.sub_nn K O _ _ e13_50
  have d13_51 := HeatV.sub_nn K O _ _ e13_51
  have d13_52 := HeatV.sub_nn K O _ _ e13_52
  have d13_53 := HeatV.sub_nn K O _ _ e13_53
  have d13_54 := HeatV.sub_nn K O _ _ e13_54
  have d13_55 := HeatV.sub_nn K O _ _ e13_55
  have d14_15 := HeatV.sub_nn K O _ _ e14_15
  have d14_16 := HeatV.sub_nn K O _ _ e14_16
  have d14_17 := HeatV.sub_nn K O _ _ e14_17
  have d14_18 := HeatV.sub_nn K O _ _ e14_18
  have d14_19 := HeatV.sub_nn K O _ _ e14_19
  have d14_20 := HeatV.sub_nn K O _ _ e14_20
  have d14_21 := HeatV.sub_nn K O _ _ e14_21
  have d14_22 := HeatV.sub_nn K O _ _ e14_22
  have d14_23 := HeatV.sub_nn K O _ _ e14_23
  have d14_24 := HeatV.sub_nn K O _ _ e14_24
  have d14_25 := HeatV.sub_nn K O _ _ e14_25
  have d14_26 := HeatV.sub_nn K O _ _ e14_26
  have d14_27 := HeatV.sub_nn K O _ _ e14_27
  have d14_28 := HeatV.sub_nn K O _ _ e14_28
  have d14_29 := HeatV.sub_nn K O _ _ e14_29
  have d14_30 := HeatV.sub_nn K O _ _ e14_30
  have d14_31 := HeatV.sub_nn K O _ _ e14_31
  have d14_32 := HeatV.sub_nn K O _ _ e14_32
  have d14_33 := HeatV.sub_nn K O _ _ e14_33
  have d14_34 := HeatV.sub_nn K O _ _ e14_34
  have d14_35 := HeatV.sub_nn K O _ _ e14_35
  have d14_36 := HeatV.sub_nn K O _ _ e14_36
  have d14_37 := HeatV.sub_nn K O _ _ e14_37
  have d14_39 := HeatV.sub_nn K O _ _ e14_39
  have d14_41 := HeatV.sub_nn K O _ _ e14_41
  have d14_42 := HeatV.sub_nn K O _ _ e14_42
  have d14_44 := HeatV.sub_nn K O _ _ e14_44
  have d14_45 := HeatV.sub_nn K O _ _ e14_45
  have d14_46 := HeatV.sub_nn K O _ _ e14_46
  have d14_47 := HeatV.sub_nn K O _ _ e14_47
  have d14_48 := HeatV.sub_nn K O _ _ e14_48
  have d14_49 := HeatV.sub_nn K O _ _ e14_49
  have d14_50 := HeatV.sub_nn K O _ _ e14_50
  have d14_51 := HeatV.sub_nn K O _ _ e14_51
  have d14_52 := HeatV.sub_nn K O _ _ e14_52
  have d14_53 := HeatV.sub_nn K O _ _ e14_53
  have d14_54 := HeatV.sub_nn K O _ _ e14_54
  have d15_16 := HeatV.sub_nn K O _ _ e15_16
  have d15_17 := HeatV.sub_nn K O _ _ e15_17
  have d15_18 := HeatV.sub_nn K O _ _ e15_18
  have d15_19 := HeatV.sub_nn K O _ _ e15_19
  have d15_20 := HeatV.sub_nn K O _ _ e15_20
  have d15_21 := HeatV.sub_nn K O _ _ e15_21
  have d15_22 := HeatV.sub_nn K O _ _ e15_22
  have d15_23 := HeatV.sub_nn K O _ _ e15_23
  have d15_24 := HeatV.sub_nn K O _ _ e15_24
  have d15_25 := HeatV.sub_nn K O _ _ e15_25
  have d15_26 := HeatV.sub_nn K O _ _ e15_26
  have d15_27 := HeatV.sub_nn K O _ _ e15_27
  have d15_28 := HeatV.sub_nn K O _ _ e15_28
  have d15_29 := HeatV.sub_nn K O _ _ e15_29
  have d15_31 := HeatV.sub_nn K O _ _ e15_31
  have d15_32 := HeatV.sub_nn K O _ _ e15_32
  have d15_33 := HeatV.sub_nn K O _ _ e15_33
  have d15_34 := HeatV.sub_nn K O _ _ e15_34
  have d15_36 := HeatV.sub_nn K O _ _ e15_36
  have d15_37 := HeatV.sub_nn K O _ _ e15_37
  have d15_38 := HeatV.sub_nn K O _ _ e15_38
  have d15_39 := HeatV.sub_nn K O _ _ e15_39
  have d15_40 := HeatV.sub_nn K O _ _ e15_40
  have d15_41 := HeatV.sub_nn K O _ _ e15_41
  have d15_42 := HeatV.sub_nn K O _ _ e15_42
  have d15_43 := HeatV.sub_nn K O _ _ e15_43
  have d15_44 := HeatV.sub_nn K O _ _ e15_44
  have d15_45 := HeatV.sub_nn K O _ _ e15_45
  have d15_46 := HeatV.sub_nn K O _ _ e15_46
  have d15_47 := HeatV.sub_nn K O _ _ e15_47
  have d15_48 := HeatV.sub_nn K O _ _ e15_48
  have d15_49 := HeatV.sub_nn K O _ _ e15_49
  have d15_50 := HeatV.sub_nn K O _ _ e15_50
  have d15_51 := HeatV.sub_nn K O _ _ e15_51
  have d15_52 := HeatV.sub_nn K O _ _ e15_52
  have d15_53 := HeatV.sub_nn K O _ _ e15_53
  have d15_54 := HeatV.sub_nn K O _ _ e15_54
  have d15_55 := HeatV.sub_nn K O _ _ e15_55
  have d16_17 := HeatV.sub_nn K O _ _ e16_17
  have d16_18 := HeatV.sub_nn K O _ _ e16_18
  have d16_19 := HeatV.sub_nn K O _ _ e16_19
  have d16_20 := HeatV.sub_nn K O _ _ e16_20
  have d16_21 := HeatV.sub_nn K O _ _ e16_21
  have d16_22 := HeatV.sub_nn K O _ _ e16_22
  have d16_23 := HeatV.sub_nn K O _ _ e16_23
  have d16_24 := HeatV.sub_nn K O _ _ e16_24
  have d16_25 := HeatV.sub_nn K O _ _ e16_25
  have d16_26 := HeatV.sub_nn K O _ _ e16_26
  have d16_27 := HeatV.sub_nn K O _ _ e16_27
  have d16_28 := HeatV.sub_nn K O _ _ e16_28
  have d16_29 := HeatV.sub_nn K O _ _ e16_29
  have d16_30 := HeatV.sub_nn K O _ _ e16_30
  have d16_31 := HeatV.sub_nn K O _ _ e16_31
  have d16_32 := HeatV.sub_nn K O _ _ e16_32
  have d16_33 := HeatV.sub_nn K O _ _ e16_33
  have d16_34 := HeatV.sub_nn K O _ _ e16_34
  have d16_35 := HeatV.sub_nn K O _ _ e16_35
  have d16_36 := HeatV.sub_nn K O _ _ e16_36
  have d16_37 := HeatV.sub_nn K O _ _ e16_37
  have d16_39 := HeatV.sub_nn K O _ _ e16_39
  have d16_41 := HeatV.sub_nn K O _ _ e16_41
  have d16_42 := HeatV.sub_nn K O _ _ e16_42
  have d16_43 := HeatV.sub_nn K O _ _ e16_43
  have d16_44 := HeatV.sub_nn K O _ _ e16_44
  have d16_45 := HeatV.sub_nn K O _ _ e16_45
  have d16_46 := HeatV.sub_nn K O _ _ e16_46
  have d16_47 := HeatV.sub_nn K O _ _ e16_47
  have d16_48 := HeatV.sub_nn K O _ _ e16_48
  have d16_49 := HeatV.sub_nn K O _ _ e16_49
  have d16_50 := HeatV.sub_nn K O _ _ e16_50
  have d16_51 := HeatV.sub_nn K O _ _ e16_51
  have d16_52 := HeatV.sub_nn K O _ _ e16_52
  have d16_53 := HeatV.sub_nn K O _ _ e16_53
  have d16_54 := HeatV.sub_nn K O _ _ e16_54
  have d17_18 := HeatV.sub_nn K O _ _ e17_18
  have d17_19 := HeatV.sub_nn K O _ _ e17_19
  have d17_20 := HeatV.sub_nn K O _ _ e17_20
  have d17_21 := HeatV.sub_nn K O _ _ e17_21
  have d17_22 := HeatV.sub_nn K O _ _ e17_22
  have d17_23 := HeatV.sub_nn K O _ _ e17_23
  have d17_24 := HeatV.sub_nn K O _ _ e17_24
  have d17_25 := HeatV.sub_nn K O _ _ e17_25
  have d17_26 := HeatV.sub_nn K O _ _ e17_26
  have d17_27 := HeatV.sub_nn K O _ _ e17_27
  have d17_28 := HeatV.sub_nn K O _ _ e17_28
  have d17_29 := HeatV.sub_nn K O _ _ e17_29
  have d17_30 := HeatV.sub_nn K O _ _ e17_30
  have d17_31 := HeatV.sub_nn K O _ _ e17_31
  have d17_32 := HeatV.sub_nn K O _ _ e17_32
  have d17_33 := HeatV.sub_nn K O _ _ e17_33
  have d17_34 := HeatV.sub_nn K O _ _ e17_34
  have d17_35 := HeatV.sub_nn K O _ _ e17_35
  have d17_36 := HeatV.sub_nn K O _ _ e17_36
  have d17_37 := HeatV.sub_nn K O _ _ e17_37
  have d17_38 := HeatV.sub_nn K O _ _ e17_38
  have d17_39 := HeatV.sub_nn K O _ _ e17_39
  have d17_40 := HeatV.sub_nn K O _ _ e17_40
  have d17_41 := HeatV.sub_nn K O _ _ e17_41
  have d17_42 := HeatV.sub_nn K O _ _ e17_42
  have d17_43 := HeatV.sub_nn K O _ _ e17_43
  have d17_44 := HeatV.sub_nn K O _ _ e17_44
  have d17_45 := HeatV.sub_nn K O _ _ e17_45
  have d17_46 := HeatV.sub_nn K O _ _ e17_46
  have d17_47 := HeatV.sub_nn K O _ _ e17_47
  have d17_48 := HeatV.sub_nn K O _ _ e17_48
  have d17_49 := HeatV.sub_nn K O _ _ e17_49
  have d17_50 := HeatV.sub_nn K O _ _ e17_50
  have d17_51 := HeatV.sub_nn K O _ _ e17_51
  have d17_52 := HeatV.sub_nn K O _ _ e17_52
  have d17_53 := HeatV.sub_nn K O _ _ e17_53
  have d17_54 := HeatV.sub_nn K O _ _ e17_54
  have d17_55 := HeatV.sub_nn K O _ _ e17_55
  have d18_19 := HeatV.sub_nn K O _ _ e18_19
  have d18_20 := HeatV.sub_nn K O _ _ e18_20
  have d18_21 := HeatV.sub_nn K O _ _ e18_21
  have d18_22 := HeatV.sub_nn K O _ _ e18_22
  have d18_23 := HeatV.sub_nn K O _ _ e18_23
  have d18_24 := HeatV.sub_nn K O _ _ e18_24
  have d18_25 := HeatV.sub_nn K O _ _ e18_25
  have d18_26 := HeatV.sub_nn K O _ _ e18_26
  have d18_27 := HeatV.sub_nn K O _ _ e18_27
  have d18_28 := HeatV.sub_nn K O _ _ e18_28
  have d18_29 := HeatV.sub_nn K O _ _ e18_29
  have d18_30 := HeatV.sub_nn K O _ _ e18_30
  have d18_31 := HeatV.sub_nn K O _ _ e18_31
  have d18_32 := HeatV.sub_nn K O _ _ e18_32
  have d18_34 := HeatV.sub_nn K O _ _ e18_34
  have d18_35 := HeatV.sub_nn K O _ _ e18_35
  have d18_37 := HeatV.sub_nn K O _ _ e18_37
  have d18_38 := HeatV.sub_nn K O _ _ e18_38
  have d18_39 := HeatV.sub_nn K O _ _ e18_39
  have d18_40 := HeatV.sub_nn K O _ _ e18_40
  have d18_41 := HeatV.sub_nn K O _ _ e18_41
  have d18_42 := HeatV.sub_nn K O _ _ e18_42
  have d18_43 := HeatV.sub_nn K O _ _ e18_43
  have d18_44 := HeatV.sub_nn K O _ _ e18_44
  have d18_45 := HeatV.sub_nn K O _ _ e18_45
  have d18_46 := HeatV.sub_nn K O _ _ e18_46
  have d18_47 := HeatV.sub_nn K O _ _ e18_47
  have d18_48 := HeatV.sub_nn K O _ _ e18_48
  have d18_49 := HeatV.sub_nn K O _ _ e18_49
  have d18_50 := HeatV.sub_nn K O _ _ e18_50
  have d18_51 := HeatV.sub_nn K O _ _ e18_51
  have d18_52 := HeatV.sub_nn K O _ _ e18_52
  have d18_53 := HeatV.sub_nn K O _ _ e18_53
  have d18_54 := HeatV.sub_nn K O _ _ e18_54
  have d19_20 := HeatV.sub_nn K O _ _ e19_20
  have d19_21 := HeatV.sub_nn K O _ _ e19_21
  have d19_22 := HeatV.sub_nn K O _ _ e19_22
  have d19_23 := HeatV.sub_nn K O _ _ e19_23
  have d19_24 := HeatV.sub_nn K O _ _ e19_24
  have d19_25 := HeatV.sub_nn K O _ _ e19_25
  have d19_26 := HeatV.sub_nn K O _ _ e19_26
  have d19_27 := HeatV.sub_nn K O _ _ e19_27
  have d19_28 := HeatV.sub_nn K O _ _ e19_28
  have d19_29 := HeatV.sub_nn K O _ _ e19_29
  have d19_31 := HeatV.sub_nn K O _ _ e19_31
  have d19_32 := HeatV.sub_nn K O _ _ e19_32
  have d19_33 := HeatV.sub_nn K O _ _ e19_33
  have d19_34 := HeatV.sub_nn K O _ _ e19_34
  have d19_36 := HeatV.sub_nn K O _ _ e19_36
  have d19_37 := HeatV.sub_nn K O _ _ e19_37
  have d19_38 := HeatV.sub_nn K O _ _ e19_38
  have d19_39 := HeatV.sub_nn K O _ _ e19_39
  have d19_40 := HeatV.sub_nn K O _ _ e19_40
  have d19_41 := HeatV.sub_nn K O _ _ e19_41
  have d19_42 := HeatV.sub_nn K O _ _ e19_42
  have d19_43 := HeatV.sub_nn K O _ _ e19_43
  have d19_44 := HeatV.sub_nn K O _ _ e19_44
  have d19_45 := HeatV.sub_nn K O _ _ e19_45
  have d19_46 := HeatV.sub_nn K O _ _ e19_46
  have d19_47 := HeatV.sub_nn K O _ _ e19_47
  have d19_48 := HeatV.sub_nn K O _ _ e19_48
  have d19_49 := HeatV.sub_nn K O _ _ e19_49
  have d19_50 := HeatV.sub_nn K O _ _ e19_50
  have d19_51 := HeatV.sub_nn K O _ _ e19_51
  have d19_52 := HeatV.sub_nn K O _ _ e19_52
  have d19_53 := HeatV.sub_nn K O _ _ e19_53
  have d19_54 := HeatV.sub_nn K O _ _ e19_54
  have d20_21 := HeatV.sub_nn K O _ _ e20_21
  have d20_22 := HeatV.sub_nn K O _ _ e20_22
  have d20_23 := HeatV.sub_nn K O _ _ e20_23
  have d20_24 := HeatV.sub_nn K O _ _ e20_24
  have d20_25 := HeatV.sub_nn K O _ _ e20_25
  have d20_26 := HeatV.sub_nn K O _ _ e20_26
  have d20_27 := HeatV.sub_nn K O _ _ e20_27
  have d20_28 := HeatV.sub_nn K O _ _ e20_28
  have d20_29 := HeatV.sub_nn K O _ _ e20_29
  have d20_30 := HeatV.sub_nn K O _ _ e20_30
  have d20_31 := HeatV.sub_nn K O _ _ e20_31
  have d20_32 := HeatV.sub_nn K O _ _ e20_32
  have d20_35 := HeatV.sub_nn K O _ _ e20_35
  have d20_36 := HeatV.sub_nn K O _ _ e20_36
  have d20_37 := HeatV.sub_nn K O _ _ e20_37
  have d20_38 := HeatV.sub_nn K O _ _ e20_38
  have d20_39 := HeatV.sub_nn K O _ _ e20_39
  have d20_40 := HeatV.sub_nn K O _ _ e20_40
  have d20_41 := HeatV.sub_nn K O _ _ e20_41
  have d20_42 := HeatV.sub_nn K O _ _ e20_42
  have d20_43 := HeatV.sub_nn K O _ _ e20_43
  have d20_44 := HeatV.sub_nn K O _ _ e20_44
  have d20_45 := HeatV.sub_nn K O _ _ e20_45
  have d20_46 := HeatV.sub_nn K O _ _ e20_46
  have d20_47 := HeatV.sub_nn K O _ _ e20_47
  have d20_48 := HeatV.sub_nn K O _ _ e20_48
  have d20_49 := HeatV.sub_nn K O _ _ e20_49
  have d20_51 := HeatV.sub_nn K O _ _ e20_51
  have d20_52 := HeatV.sub_nn K O _ _ e20_52
  have d20_53 := HeatV.sub_nn K O _ _ e20_53
  have d20_54 := HeatV.sub_nn K O _ _ e20_54
  have d21_22 := HeatV.sub_nn K O _ _ e21_22
  have d21_23 := HeatV.sub_nn K O _ _ e21_23
  have d21_24 := HeatV.sub_nn K O _ _ e21_24
  have d21_25 := HeatV.sub_nn K O _ _ e21_25
  have d21_26 := HeatV.sub_nn K O _ _ e21_26
  have d21_27 := HeatV.sub_nn K O _ _ e21_27
  have d21_28 := HeatV.sub_nn K O _ _ e21_28
  have d21_29 := HeatV.sub_nn K O _ _ e21_29
  have d21_30 := HeatV.sub_nn K O _ _ e21_30
  have d21_31 := HeatV.sub_nn K O _ _ e21_31
  have d21_32 := HeatV.sub_nn K O _ _ e21_32
  have d21_33 := HeatV.sub_nn K O _ _ e21_33
  have d21_34 := HeatV.sub_nn K O _ _ e21_34
  have d21_35 := HeatV.sub_nn K O _ _ e21_35
  have d21_37 := HeatV.sub_nn K O _ _ e21_37
  have d21_38 := HeatV.sub_nn K O _ _ e21_38
  have d21_39 := HeatV.sub_nn K O _ _ e21_39
  have d21_40 := HeatV.sub_nn K O _ _ e21_40
  have d21_41 := HeatV.sub_nn K O _ _ e21_41
  have d21_42 := HeatV.sub_nn K O _ _ e21_42
  have d21_43 := HeatV.sub_nn K O _ _ e21_43
  have d21_44 := HeatV.sub_nn K O _ _ e21_44
  have d21_45 := HeatV.sub_nn K O _ _ e21_45
  have d21_46 := HeatV.sub_nn K O _ _ e21_46
  have d21_47 := HeatV.sub_nn K O _ _ e21_47
  have d21_48 := HeatV.sub_nn K O _ _ e21_48
  have d21_49 := HeatV.sub_nn K O _ _ e21_49
  have d21_50 := HeatV.sub_nn K O _ _ e21_50
  have d21_51 := HeatV.sub_nn K O _ _ e21_51
  have d21_52 := HeatV.sub_nn K O _ _ e21_52
  have d21_53 := HeatV.sub_nn K O _ _ e21_53
  have d21_54 := HeatV.sub_nn K O _ _ e21_54
  have d22_23 := HeatV.sub_nn K O _ _ e22_23
  have d22_24 := HeatV.sub_nn K O _ _ e22_24
  have d22_25 := HeatV.sub_nn K O _ _ e22_25
  have d22_26 := HeatV.sub_nn K O _ _ e22_26
  have d22_27 := HeatV.sub_nn K O _ _ e22_27
  have d22_28 := HeatV.sub_nn K O _ _ e22_28
  have d22_29 := HeatV.sub_nn K O _ _ e22_29
  have d22_31 := HeatV.sub_nn K O _ _ e22_31
  have d22_33 := HeatV.sub_nn K O _ _ e22_33
  have d22_34 := HeatV.sub_nn K O _ _ e22_34
  have d22_35 := HeatV.sub_nn K O _ _ e22_35
  have d22_36 := HeatV.sub_nn K O _ _ e22_36
  have d22_37 := HeatV.sub_nn K O _ _ e22_37
  have d22_38 := HeatV.sub_nn K O _ _ e22_38
  have d22_39 := HeatV.sub_nn K O _ _ e22_39
  have d22_40 := HeatV.sub_nn K O _ _ e22_40
  have d22_41 := HeatV.sub_nn K O _ _ e22_41
  have d22_42 := HeatV.sub_nn K O _ _ e22_42
  have d22_43 := HeatV.sub_nn K O _ _ e22_43
  have d22_44 := HeatV.sub_nn K O _ _ e22_44
  have d22_45 := HeatV.sub_nn K O _ _ e22_45
  have d22_46 := HeatV.sub_nn K O _ _ e22_46
  have d22_47 := HeatV.sub_nn K O _ _ e22_47
  have d22_49 := HeatV.sub_nn K O _ _ e22_49
  have d22_50 := HeatV.sub_nn K O _ _ e22_50
  have d22_51 := HeatV.sub_nn K O _ _ e22_51
  have d22_52 := HeatV.sub_nn K O _ _ e22_52
  have d22_53 := HeatV.sub_nn K O _ _ e22_53
  have d22_54 := HeatV.sub_nn K O _ _ e22_54
  have d23_24 := HeatV.sub_nn K O _ _ e23_24
  have d23_25 := HeatV.sub_nn K O _ _ e23_25
  have d23_26 := HeatV.sub_nn K O _ _ e23_26
  have d23_27 := HeatV.sub_nn K O _ _ e23_27
  have d23_28 := HeatV.sub_nn K O _ _ e23_28
  have d23_29 := HeatV.sub_nn K O _ _ e23_29
  have d23_30 := HeatV.sub_nn K O _ _ e23_30
  have d23_31 := HeatV.sub_nn K O _ _ e23_31
  have d23_32 := HeatV.sub_nn K O _ _ e23_32
  have d23_33 := HeatV.sub_nn K O _ _ e23_33
  have d23_34 := HeatV.sub_nn K O _ _ e23_34
  have d23_35 := HeatV.sub_nn K O _ _ e23_35
  have d23_36 := HeatV.sub_nn K O _ _ e23_36
  have d23_37 := HeatV.sub_nn K O _ _ e23_37
  have d23_38 := HeatV.sub_nn K O _ _ e23_38
  have d23_39 := HeatV.sub_nn K O _ _ e23_39
  have d23_40 := HeatV.sub_nn K O _ _ e23_40
  have d23_41 := HeatV.sub_nn K O _ _ e23_41
  have d23_42 := HeatV.sub_nn K O _ _ e23_42
  have d23_43 := HeatV.sub_nn K O _ _ e23_43
  have d23_44 := HeatV.sub_nn K O _ _ e23_44
  have d23_45 := HeatV.sub_nn K O _ _ e23_45
  have d23_46 := HeatV.sub_nn K O _ _ e23_46
  have d23_47 := HeatV.sub_nn K O _ _ e23_47
  have d23_48 := HeatV.sub_nn K O _ _ e23_48
  have d23_49 := HeatV.sub_nn K O _ _ e23_49
  have d23_50 := HeatV.sub_nn K O _ _ e23_50
  have d23_51 := HeatV.sub_nn K O _ _ e23_51
  have d23_52 := HeatV.sub_nn K O _ _ e23_52
  have d23_53 := HeatV.sub_nn K O _ _ e23_53
  have d23_54 := HeatV.sub_nn K O _ _ e23_54
  have d23_55 := HeatV.sub_nn K O _ _ e23_55
  have d24_25 := HeatV.sub_nn K O _ _ e24_25
  have d24_26 := HeatV.sub_nn K O _ _ e24_26
  have d24_27 := HeatV.sub_nn K O _ _ e24_27
  have d24_28 := HeatV.sub_nn K O _ _ e24_28
  have d24_29 := HeatV.sub_nn K O _ _ e24_29
  have d24_30 := HeatV.sub_nn K O _ _ e24_30
  have d24_31 := HeatV.sub_nn K O _ _ e24_31
  have d24_33 := HeatV.sub_nn K O _ _ e24_33
  have d24_34 := HeatV.sub_nn K O _ _ e24_34
  have d24_35 := HeatV.sub_nn K O _ _ e24_35
  have d24_36 := HeatV.sub_nn K O _ _ e24_36
  have d24_37 := HeatV.sub_nn K O _ _ e24_37
  have d24_38 := HeatV.sub_nn K O _ _ e24_38
  have d24_40 := HeatV.sub_nn K O _ _ e24_40
  have d24_41 := HeatV.sub_nn K O _ _ e24_41
  have d24_42 := HeatV.sub_nn K O _ _ e24_42
  have d24_43 := HeatV.sub_nn K O _ _ e24_43
  have d24_44 := HeatV.sub_nn K O _ _ e24_44
  have d24_45 := HeatV.sub_nn K O _ _ e24_45
  have d24_46 := HeatV.sub_nn K O _ _ e24_46
  have d24_47 := HeatV.sub_nn K O _ _ e24_47
  have d24_48 := HeatV.sub_nn K O _ _ e24_48
  have d24_49 := HeatV.sub_nn K O _ _ e24_49
  have d24_50 := HeatV.sub_nn K O _ _ e24_50
  have d24_51 := HeatV.sub_nn K O _ _ e24_51
  have d24_52 := HeatV.sub_nn K O _ _ e24_52
  have d24_53 := HeatV.sub_nn K O _ _ e24_53
  have d24_54 := HeatV.sub_nn K O _ _ e24_54
  have d25_26 := HeatV.sub_nn K O _ _ e25_26
  have d25_27 := HeatV.sub_nn K O _ _ e25_27
  have d25_28 := HeatV.sub_nn K O _ _ e25_28
  have d25_29 := HeatV.sub_nn K O _ _ e25_29
  have d25_30 := HeatV.sub_nn K O _ _ e25_30
  have d25_31 := HeatV.sub_nn K O _ _ e25_31
  have d25_32 := HeatV.sub_nn K O _ _ e25_32
  have d25_33 := HeatV.sub_nn K O _ _ e25_33
  have d25_34 := HeatV.sub_nn K O _ _ e25_34
  have d25_35 := HeatV.sub_nn K O _ _ e25_35
  have d25_36 := HeatV.sub_nn K O _ _ e25_36
  have d25_37 := HeatV.sub_nn K O _ _ e25_37
  have d25_38 := HeatV.sub_nn K O _ _ e25_38
  have d25_39 := HeatV.sub_nn K O _ _ e25_39
  have d25_40 := HeatV.sub_nn K O _ _ e25_40
  have d25_41 := HeatV.sub_nn K O _ _ e25_41
  have d25_42 := HeatV.sub_nn K O _ _ e25_42
  have d25_43 := HeatV.sub_nn K O _ _ e25_43
  have d25_44 := HeatV.sub_nn K O _ _ e25_44
  have d25_45 := HeatV.sub_nn K O _ _ e25_45
  have d25_46 := HeatV.sub_nn K O _ _ e25_46
  have d25_47 := HeatV.sub_nn K O _ _ e25_47
  have d25_48 := HeatV.sub_nn K O _ _ e25_48
  have d25_49 := HeatV.sub_nn K O _ _ e25_49
  have d25_50 := HeatV.sub_nn K O _ _ e25_50
  have d25_51 := HeatV.sub_nn K O _ _ e25_51
  have d25_52 := HeatV.sub_nn K O _ _ e25_52
  have d25_53 := HeatV.sub_nn K O _ _ e25_53
  have d25_54 := HeatV.sub_nn K O _ _ e25_54
  have d26_27 := HeatV.sub_nn K O _ _ e26_27
  have d26_28 := HeatV.sub_nn K O _ _ e26_28
  have d26_29 := HeatV.sub_nn K O _ _ e26_29
  have d26_30 := HeatV.sub_nn K O _ _ e26_30
  have d26_31 := HeatV.sub_nn K O _ _ e26_31
  have d26_32 := HeatV.sub_nn K O _ _ e26_32
  have d26_33 := HeatV.sub_nn K O _ _ e26_33
  have d26_34 := HeatV.sub_nn K O _ _ e26_34
  have d26_35 := HeatV.sub_nn K O _ _ e26_35
  have d26_36 := HeatV.sub_nn K O _ _ e26_36
  have d26_37 := HeatV.sub_nn K O _ _ e26_37
  have d26_38 := HeatV.sub_nn K O _ _ e26_38
  have d26_39 := HeatV.sub_nn K O _ _ e26_39
  have d26_40 := HeatV.sub_nn K O _ _ e26_40
  have d26_41 := HeatV.sub_nn K O _ _ e26_41
  have d26_42 := HeatV.sub_nn K O _ _ e26_42
  have d26_43 := HeatV.sub_nn K O _ _ e26_43
  have d26_44 := HeatV.sub_nn K O _ _ e26_44
  have d26_45 := HeatV.sub_nn K O _ _ e26_45
  have d26_46 := HeatV.sub_nn K O _ _ e26_46
  have d26_47 := HeatV.sub_nn K O _ _ e26_47
  have d26_48 := HeatV.sub_nn K O _ _ e26_48
  have d26_49 := HeatV.sub_nn K O _ _ e26_49
  have d26_50 := HeatV.sub_nn K O _ _ e26_50
  have d26_51 := HeatV.sub_nn K O _ _ e26_51
  have d26_52 := HeatV.sub_nn K O _ _ e26_52
  have d26_53 := HeatV.sub_nn K O _ _ e26_53
  have d26_54 := HeatV.sub_nn K O _ _ e26_54
  have d26_55 := HeatV.sub_nn K O _ _ e26_55
  have d27_28 := HeatV.sub_nn K O _ _ e27_28
  have d27_29 := HeatV.sub_nn K O _ _ e27_29
  have d27_30 := HeatV.sub_nn K O _ _ e27_30
  have d27_31 := HeatV.sub_nn K O _ _ e27_31
  have d27_32 := HeatV.sub_nn K O _ _ e27_32
  have d27_33 := HeatV.sub_nn K O _ _ e27_33
  have d27_34 := HeatV.sub_nn K O _ _ e27_34
  have d27_35 := HeatV.sub_nn K O _ _ e27_35
  have d27_36 := HeatV.sub_nn K O _ _ e27_36
  have d27_37 := HeatV.sub_nn K O _ _ e27_37
  have d27_38 := HeatV.sub_nn K O _ _ e27_38
  have d27_39 := HeatV.sub_nn K O _ _ e27_39
  have d27_40 := HeatV.sub_nn K O _ _ e27_40
  have d27_41 := HeatV.sub_nn K O _ _ e27_41
  have d27_42 := HeatV.sub_nn K O _ _ e27_42
  have d27_43 := HeatV.sub_nn K O _ _ e27_43
  have d27_44 := HeatV.sub_nn K O _ _ e27_44
  have d27_45 := HeatV.sub_nn K O _ _ e27_45
  have d27_46 := HeatV.sub_nn K O _ _ e27_46
  have d27_47 := HeatV.sub_nn K O _ _ e27_47
  have d27_48 := HeatV.sub_nn K O _ _ e27_48
  have d27_49 := HeatV.sub_nn K O _ _ e27_49
  have d27_50 := HeatV.sub_nn K O _ _ e27_50
  have d27_51 := HeatV.sub_nn K O _ _ e27_51
  have d27_52 := HeatV.sub_nn K O _ _ e27_52
  have d27_53 := HeatV.sub_nn K O _ _ e27_53
  have d27_54 := HeatV.sub_nn K O _ _ e27_54
  have d27_55 := HeatV.sub_nn K O _ _ e27_55
  have d28_29 := HeatV.sub_nn K O _ _ e28_29
  have d28_30 := HeatV.sub_nn K O _ _ e28_30
  have d28_31 := HeatV.sub_nn K O _ _ e28_31
  have d28_32 := HeatV.sub_nn K O _ _ e28_32
  have d28_33 := HeatV.sub_nn K O _ _ e28_33
  have d28_34 := HeatV.sub_nn K O _ _ e28_34
  have d28_35 := HeatV.sub_nn K O _ _ e28_35
  have d28_36 := HeatV.sub_nn K O _ _ e28_36
  have d28_37 := HeatV.sub_nn K O _ _ e28_37
  have d28_38 := HeatV.sub_nn K O _ _ e28_38
  have d28_39 := HeatV.sub_nn K O _ _ e28_39
  have d28_40 := HeatV.sub_nn K O _ _ e28_40
  have d28_41 := HeatV.sub_nn K O _ _ e28_41
  have d28_42 := HeatV.sub_nn K O _ _ e28_42
  have d28_43 := HeatV.sub_nn K O _ _ e28_43
  have d28_44 := HeatV.sub_nn K O _ _ e28_44
  have d28_45 := HeatV.sub_nn K O _ _ e28_45
  have d28_46 := HeatV.sub_nn K O _ _ e28_46
  have d28_47 := HeatV.sub_nn K O _ _ e28_47
  have d28_48 := HeatV.sub_nn K O _ _ e28_48
  have d28_49 := HeatV.sub_nn K O _ _ e28_49
  have d28_50 := HeatV.sub_nn K O _ _ e28_50
  have d28_51 := HeatV.sub_nn K O _ _ e28_51
  have d28_52 := HeatV.sub_nn K O _ _ e28_52
  have d28_53 := HeatV.sub_nn K O _ _ e28_53
  have d28_54 := HeatV.sub_nn K O _ _ e28_54
  have d29_30 := HeatV.sub_nn K O _ _ e29_30
  have d29_31 := HeatV.sub_nn K O _ _ e29_31
  have d29_32 := HeatV.sub_nn K O _ _ e29_32
  have d29_33 := HeatV.sub_nn K O _ _ e29_33
  have d29_34 := HeatV.sub_nn K O _ _ e29_34
  have d29_35 := HeatV.sub_nn K O _ _ e29_35
  have d29_36 := HeatV.sub_nn K O _ _ e29_36
  have d29_37 := HeatV.sub_nn K O _ _ e29_37
  have d29_38 := HeatV.sub_nn K O _ _ e29_38
  have d29_39 := HeatV.sub_nn K O _ _ e29_39
  have d29_40 := HeatV.sub_nn K O _ _ e29_40
  have d29_41 := HeatV.sub_nn K O _ _ e29_41
  have d29_42 := HeatV.sub_nn K O _ _ e29_42
  have d29_43 := HeatV.sub_nn K O _ _ e29_43
  have d29_44 := HeatV.sub_nn K O _ _ e29_44
  have d29_45 := HeatV.sub_nn K O _ _ e29_45
  have d29_46 := HeatV.sub_nn K O _ _ e29_46
  have d29_47 := HeatV.sub_nn K O _ _ e29_47
  have d29_48 := HeatV.sub_nn K O _ _ e29_48
  have d29_49 := HeatV.sub_nn K O _ _ e29_49
  have d29_50 := HeatV.sub_nn K O _ _ e29_50
  have d29_51 := HeatV.sub_nn K O _ _ e29_51
  have d29_52 := HeatV.sub_nn K O _ _ e29_52
  have d29_53 := HeatV.sub_nn K O _ _ e29_53
  have d29_54 := HeatV.sub_nn K O _ _ e29_54
  have d29_55 := HeatV.sub_nn K O _ _ e29_55
  have d30_31 := HeatV.sub_nn K O _ _ e30_31
  have d30_32 := HeatV.sub_nn K O _ _ e30_32
  have d30_33 := HeatV.sub_nn K O _ _ e30_33
  have d30_34 := HeatV.sub_nn K O _ _ e30_34
  have d30_35 := HeatV.sub_nn K O _ _ e30_35
  have d30_36 := HeatV.sub_nn K O _ _ e30_36
  have d30_37 := HeatV.sub_nn K O _ _ e30_37
  have d30_38 := HeatV.sub_nn K O _ _ e30_38
  have d30_39 := HeatV.sub_nn K O _ _ e30_39
  have d30_40 := HeatV.sub_nn K O _ _ e30_40
  have d30_41 := HeatV.sub_nn K O _ _ e30_41
  have d30_42 := HeatV.sub_nn K O _ _ e30_42
  have d30_43 := HeatV.sub_nn K O _ _ e30_43
  have d30_44 := HeatV.sub_nn K O _ _ e30_44
  have d30_45 := HeatV.sub_nn K O _ _ e30_45
  have d30_46 := HeatV.sub_nn K O _ _ e30_46
  have d30_47 := HeatV.sub_nn K O _ _ e30_47
  have d30_48 := HeatV.sub_nn K O _ _ e30_48
  have d30_49 := HeatV.sub_nn K O _ _ e30_49
  have d30_50 := HeatV.sub_nn K O _ _ e30_50
  have d30_51 := HeatV.sub_nn K O _ _ e30_51
  have d30_52 := HeatV.sub_nn K O _ _ e30_52
  have d30_53 := HeatV.sub_nn K O _ _ e30_53
  have d30_54 := HeatV.sub_nn K O _ _ e30_54
  have d30_55 := HeatV.sub_nn K O _ _ e30_55
  have d31_32 := HeatV.sub_nn K O _ _ e31_32
  have d31_33 := HeatV.sub_nn K O _ _ e31_33
  have d31_34 := HeatV.sub_nn K O _ _ e31_34
  have d31_35 := HeatV.sub_nn K O _ _ e31_35
  have d31_36 := HeatV.sub_nn K O _ _ e31_36
  have d31_37 := HeatV.sub_nn K O _ _ e31_37
  have d31_38 := HeatV.sub_nn K O _ _ e31_38
  have d31_39 := HeatV.sub_nn K O _ _ e31_39
  have d31_40 := HeatV.sub_nn K O _ _ e31_40
  have d31_41 := HeatV.sub_nn K O _ _ e31_41
  have d31_42 := HeatV.sub_nn K O _ _ e31_42
  have d31_43 := HeatV.sub_nn K O _ _ e31_43
  have d31_44 := HeatV.sub_nn K O _ _ e31_44
  have d31_45 := HeatV.sub_nn K O _ _ e31_45
  have d31_46 := HeatV.sub_nn K O _ _ e31_46
  have d31_48 := HeatV.sub_nn K O _ _ e31_48
  have d31_49 := HeatV.sub_nn K O _ _ e31_49
  have d31_50 := HeatV.sub_nn K O _ _ e31_50
  have d31_51 := HeatV.sub_nn K O _ _ e31_51
  have d31_52 := HeatV.sub_nn K O _ _ e31_52
  have d31_53 := HeatV.sub_nn K O _ _ e31_53
  have d31_54 := HeatV.sub_nn K O _ _ e31_54
  have d32_33 := HeatV.sub_nn K O _ _ e32_33
  have d32_34 := HeatV.sub_nn K O _ _ e32_34
  have d32_35 := HeatV.sub_nn K O _ _ e32_35
  have d32_36 := HeatV.sub_nn K O _ _ e32_36
  have d32_37 := HeatV.sub_nn K O _ _ e32_37
  have d32_38 := HeatV.sub_nn K O _ _ e32_38
  have d32_39 := HeatV.sub_nn K O _ _ e32_39
  have d32_40 := HeatV.sub_nn K O _ _ e32_40
  have d32_41 := HeatV.sub_nn K O _ _ e32_41
  have d32_42 := HeatV.sub_nn K O _ _ e32_42
  have d32_43 := HeatV.sub_nn K O _ _ e32_43
  have d32_44 := HeatV.sub_nn K O _ _ e32_44
  have d32_45 := HeatV.sub_nn K O _ _ e32_45
  have d32_46 := HeatV.sub_nn K O _ _ e32_46
  have d32_47 := HeatV.sub_nn K O _ _ e32_47
  have d32_48 := HeatV.sub_nn K O _ _ e32_48
  have d32_49 := HeatV.sub_nn K O _ _ e32_49
  have d32_50 := HeatV.sub_nn K O _ _ e32_50
  have d32_51 := HeatV.sub_nn K O _ _ e32_51
  have d32_52 := HeatV.sub_nn K O _ _ e32_52
  have d32_53 := HeatV.sub_nn K O _ _ e32_53
  have d32_54 := HeatV.sub_nn K O _ _ e32_54
  have d32_55 := HeatV.sub_nn K O _ _ e32_55
  have d33_34 := HeatV.sub_nn K O _ _ e33_34
  have d33_35 := HeatV.sub_nn K O _ _ e33_35
  have d33_36 := HeatV.sub_nn K O _ _ e33_36
  have d33_37 := HeatV.sub_nn K O _ _ e33_37
  have d33_38 := HeatV.sub_nn K O _ _ e33_38
  have d33_39 := HeatV.sub_nn K O _ _ e33_39
  have d33_40 := HeatV.sub_nn K O _ _ e33_40
  have d33_41 := HeatV.sub_nn K O _ _ e33_41
  have d33_42 := HeatV.sub_nn K O _ _ e33_42
  have d33_43 := HeatV.sub_nn K O _ _ e33_43
  have d33_44 := HeatV.sub_nn K O _ _ e33_44
  have d33_45 := HeatV.sub_nn K O _ _ e33_45
  have d33_46 := HeatV.sub_nn K O _ _ e33_46
  have d33_47 := HeatV.sub_nn K O _ _ e33_47
  have d33_48 := HeatV.sub_nn K O _ _ e33_48
  have d33_49 := HeatV.sub_nn K O _ _ e33_49
  have d33_50 := HeatV.sub_nn K O _ _ e33_50
  have d33_51 := HeatV.sub_nn K O _ _ e33_51
  have d33_52 := HeatV.sub_nn K O _ _ e33_52
  have d33_53 := HeatV.sub_nn K O _ _ e33_53
  have d33_54 := HeatV.sub_nn K O _ _ e33_54
  have d33_55 := HeatV.sub_nn K O _ _ e33_55
  have d34_35 := HeatV.sub_nn K O _ _ e34_35
  have d34_36 := HeatV.sub_nn K O _ _ e34_36
  have d34_37 := HeatV.sub_nn K O _ _ e34_37
  have d34_38 := HeatV.sub_nn K O _ _ e34_38
  have d34_39 := HeatV.sub_nn K O _ _ e34_39
  have d34_40 := HeatV.sub_nn K O _ _ e34_40
  have d34_41 := HeatV.sub_nn K O _ _ e34_41
  have d34_42 := HeatV.sub_nn K O _ _ e34_42
  have d34_43 := HeatV.sub_nn K O _ _ e34_43
  have d34_44 := HeatV.sub_nn K O _ _ e34_44
  have d34_45 := HeatV.sub_nn K O _ _ e34_45
  have d34_46 := HeatV.sub_nn K O _ _ e34_46
  have d34_47 := HeatV.sub_nn K O _ _ e34_47
  have d34_48 := HeatV.sub_nn K O _ _ e34_48
  have d34_49 := HeatV.sub_nn K O _ _ e34_49
  have d34_50 := HeatV.sub_nn K O _ _ e34_50
  have d34_51 := HeatV.sub_nn K O _ _ e34_51
  have d34_52 := HeatV.sub_nn K O _ _ e34_52
  have d34_53 := HeatV.sub_nn K O _ _ e34_53
  have d34_54 := HeatV.sub_nn K O _ _ e34_54
  have d34_55 := HeatV.sub_nn K O _ _ e34_55
  have d35_36 := HeatV.sub_nn K O _ _ e35_36
  have d35_37 := HeatV.sub_nn K O _ _ e35_37
  have d35_38 := HeatV.sub_nn K O _ _ e35_38
  have d35_39 := HeatV.sub_nn K O _ _ e35_39
  have d35_40 := HeatV.sub_nn K O _ _ e35_40
  have d35_41 := HeatV.sub_nn K O _ _ e35_41
  have d35_42 := HeatV.sub_nn K O _ _ e35_42
  have d35_43 := HeatV.sub_nn K O _ _ e35_43
  have d35_44 := HeatV.sub_nn K O _ _ e35_44
  have d35_45 := HeatV.sub_nn K O _ _ e35_45
  have d35_46 := HeatV.sub_nn K O _ _ e35_46
  have d35_47 := HeatV.sub_nn K O _ _ e35_47
  have d35_48 := HeatV.sub_nn K O _ _ e35_48
  have d35_49 := HeatV.sub_nn K O _ _ e35_49
  have d35_50 := HeatV.sub_nn K O _ _ e35_50
  have d35_51 := HeatV.sub_nn K O _ _ e35_51
  have d35_52 := HeatV.sub_nn K O _ _ e35_52
  have d35_53 := HeatV.sub_nn K O _ _ e35_53
  have d35_54 := HeatV.sub_nn K O _ _ e35_54
  have d35_55 := HeatV.sub_nn K O _ _ e35_55
  have d36_37 := HeatV.sub_nn K O _ _ e36_37
  have d36_38 := HeatV.sub_nn K O _ _ e36_38
  have d36_39 := HeatV.sub_nn K O _ _ e36_39
  have d36_40 := HeatV.sub_nn K O _ _ e36_40
  have d36_41 := HeatV.sub_nn K O _ _ e36_41
  have d36_42 := HeatV.sub_nn K O _ _ e36_42
  have d36_43 := HeatV.sub_nn K O _ _ e36_43
  have d36_44 := HeatV.sub_nn K O _ _ e36_44
  have d36_45 := HeatV.sub_nn K O _ _ e36_45
  have d36_46 := HeatV.sub_nn K O _ _ e36_46
  have d36_47 := HeatV.sub_nn K O _ _ e36_47
  have d36_48 := HeatV.sub_nn K O _ _ e36_48
  have d36_49 := HeatV.sub_nn K O _ _ e36_49
  have d36_50 := HeatV.sub_nn K O _ _ e36_50
  have d36_51 := HeatV.sub_nn K O _ _ e36_51
  have d36_52 := HeatV.sub_nn K O _ _ e36_52
  have d36_53 := HeatV.sub_nn K O _ _ e36_53
  have d36_54 := HeatV.sub_nn K O _ _ e36_54
  have d36_55 := HeatV.sub_nn K O _ _ e36_55
  have d37_38 := HeatV.sub_nn K O _ _ e37_38
  have d37_39 := HeatV.sub_nn K O _ _ e37_39
  have d37_40 := HeatV.sub_nn K O _ _ e37_40
  have d37_41 := HeatV.sub_nn K O _ _ e37_41
  have d37_42 := HeatV.sub_nn K O _ _ e37_42
  have d37_43 := HeatV.sub_nn K O _ _ e37_43
  have d37_44 := HeatV.sub_nn K O _ _ e37_44
  have d37_45 := HeatV.sub_nn K O _ _ e37_45
  have d37_46 := HeatV.sub_nn K O _ _ e37_46
  have d37_47 := HeatV.sub_nn K O _ _ e37_47
  have d37_48 := HeatV.sub_nn K O _ _ e37_48
  have d37_50 := HeatV.sub_nn K O _ _ e37_50
  have d37_51 := HeatV.sub_nn K O _ _ e37_51
  have d37_52 := HeatV.sub_nn K O _ _ e37_52
  have d37_53 := HeatV.sub_nn K O _ _ e37_53
  have d37_54 := HeatV.sub_nn K O _ _ e37_54
  have d38_39 := HeatV.sub_nn K O _ _ e38_39
  have d38_40 := HeatV.sub_nn K O _ _ e38_40
  have d38_41 := HeatV.sub_nn K O _ _ e38_41
  have d38_42 := HeatV.sub_nn K O _ _ e38_42
  have d38_43 := HeatV.sub_nn K O _ _ e38_43
  have d38_44 := HeatV.sub_nn K O _ _ e38_44
  have d38_45 := HeatV.sub_nn K O _ _ e38_45
  have d38_46 := HeatV.sub_nn K O _ _ e38_46
  have d38_47 := HeatV.sub_nn K O _ _ e38_47
  have d38_48 := HeatV.sub_nn K O _ _ e38_48
  have d38_49 := HeatV.sub_nn K O _ _ e38_49
  have d38_50 := HeatV.sub_nn K O _ _ e38_50
  have d38_51 := HeatV.sub_nn K O _ _ e38_51
  have d38_52 := HeatV.sub_nn K O _ _ e38_52
  have d38_53 := HeatV.sub_nn K O _ _ e38_53
  have d38_54 := HeatV.sub_nn K O _ _ e38_54
  have d38_55 := HeatV.sub_nn K O _ _ e38_55
  have d39_40 := HeatV.sub_nn K O _ _ e39_40
  have d39_41 := HeatV.sub_nn K O _ _ e39_41
  have d39_42 := HeatV.sub_nn K O _ _ e39_42
  have d39_43 := HeatV.sub_nn K O _ _ e39_43
  have d39_44 := HeatV.sub_nn K O _ _ e39_44
  have d39_45 := HeatV.sub_nn K O _ _ e39_45
  have d39_46 := HeatV.sub_nn K O _ _ e39_46
  have d39_47 := HeatV.sub_nn K O _ _ e39_47
  have d39_48 := HeatV.sub_nn K O _ _ e39_48
  have d39_49 := HeatV.sub_nn K O _ _ e39_49
  have d39_50 := HeatV.sub_nn K O _ _ e39_50
  have d39_51 := HeatV.sub_nn K O _ _ e39_51
  have d39_52 := HeatV.sub_nn K O _ _ e39_52
  have d39_53 := HeatV.sub_nn K O _ _ e39_53
  have d39_54 := HeatV.sub_nn K O _ _ e39_54
  have d40_41 := HeatV.sub_nn K O _ _ e40_41
  have d40_42 := HeatV.sub_nn K O _ _ e40_42
  have d40_43 := HeatV.sub_nn K O _ _ e40_43
  have d40_44 := HeatV.sub_nn K O _ _ e40_44
  have d40_45 := HeatV.sub_nn K O _ _ e40_45
  have d40_46 := HeatV.sub_nn K O _ _ e40_46
  have d40_47 := HeatV.sub_nn K O _ _ e40_47
  have d40_48 := HeatV.sub_nn K O _ _ e40_48
  have d40_49 := HeatV.sub_nn K O _ _ e40_49
  have d40_50 := HeatV.sub_nn K O _ _ e40_50
  have d40_51 := HeatV.sub_nn K O _ _ e40_51
  have d40_52 := HeatV.sub_nn K O _ _ e40_52
  have d40_53 := HeatV.sub_nn K O _ _ e40_53
  have d40_54 := HeatV.sub_nn K O _ _ e40_54
  have d40_55 := HeatV.sub_nn K O _ _ e40_55
  have d41_42 := HeatV.sub_nn K O _ _ e41_42
  have d41_43 := HeatV.sub_nn K O _ _ e41_43
  have d41_44 := HeatV.sub_nn K O _ _ e41_44
  have d41_45 := HeatV.sub_nn K O _ _ e41_45
  have d41_46 := HeatV.sub_nn K O _ _ e41_46
  have d41_47 := HeatV.sub_nn K O _ _ e41_47
  have d41_48 := HeatV.sub_nn K O _ _ e41_48
  have d41_49 := HeatV.sub_nn K O _ _ e41_49
  have d41_50 := HeatV.sub_nn K O _ _ e41_50
  have d41_51 := HeatV.sub_nn K O _ _ e41_51
  have d41_52 := HeatV.sub_nn K O _ _ e41_52
  have d41_53 := HeatV.sub_nn K O _ _ e41_53
  have d41_54 := HeatV.sub_nn K O _ _ e41_54
  have d41_55 := HeatV.sub_nn K O _ _ e41_55
  have d42_43 := HeatV.sub_nn K O _ _ e42_43
  have d42_44 := HeatV.sub_nn K O _ _ e42_44
  have d42_45 := HeatV.sub_nn K O _ _ e42_45
  have d42_46 := HeatV.sub_nn K O _ _ e42_46
  have d42_47 := HeatV.sub_nn K O _ _ e42_47
  have d42_48 := HeatV.sub_nn K O _ _ e42_48
  have d42_49 := HeatV.sub_nn K O _ _ e42_49
  have d42_50 := HeatV.sub_nn K O _ _ e42_50
  have d42_51 := HeatV.sub_nn K O _ _ e42_51
  have d42_52 := HeatV.sub_nn K O _ _ e42_52
  have d42_53 := HeatV.sub_nn K O _ _ e42_53
  have d42_54 := HeatV.sub_nn K O _ _ e42_54
  have d42_55 := HeatV.sub_nn K O _ _ e42_55
  have d43_44 := HeatV.sub_nn K O _ _ e43_44
  have d43_45 := HeatV.sub_nn K O _ _ e43_45
  have d43_46 := HeatV.sub_nn K O _ _ e43_46
  have d43_47 := HeatV.sub_nn K O _ _ e43_47
  have d43_48 := HeatV.sub_nn K O _ _ e43_48
  have d43_49 := HeatV.sub_nn K O _ _ e43_49
  have d43_50 := HeatV.sub_nn K O _ _ e43_50
  have d43_51 := HeatV.sub_nn K O _ _ e43_51
  have d43_52 := HeatV.sub_nn K O _ _ e43_52
  have d43_53 := HeatV.sub_nn K O _ _ e43_53
  have d43_54 := HeatV.sub_nn K O _ _ e43_54
  have d43_55 := HeatV.sub_nn K O _ _ e43_55
  have d44_45 := HeatV.sub_nn K O _ _ e44_45
  have d44_46 := HeatV.sub_nn K O _ _ e44_46
  have d44_47 := HeatV.sub_nn K O _ _ e44_47
  have d44_48 := HeatV.sub_nn K O _ _ e44_48
  have d44_49 := HeatV.sub_nn K O _ _ e44_49
  have d44_50 := HeatV.sub_nn K O _ _ e44_50
  have d44_51 := HeatV.sub_nn K O _ _ e44_51
  have d44_52 := HeatV.sub_nn K O _ _ e44_52
  have d44_53 := HeatV.sub_nn K O _ _ e44_53
  have d44_54 := HeatV.sub_nn K O _ _ e44_54
  have d45_46 := HeatV.sub_nn K O _ _ e45_46
  have d45_47 := HeatV.sub_nn K O _ _ e45_47
  have d45_48 := HeatV.sub_nn K O _ _ e45_48
  have d45_49 := HeatV.sub_nn K O _ _ e45_49
  have d45_50 := HeatV.sub_nn K O _ _ e45_50
  have d45_51 := HeatV.sub_nn K O _ _ e45_51
  have d45_52 := HeatV.sub_nn K O _ _ e45_52
  have d45_53 := HeatV.sub_nn K O _ _ e45_53
  have d45_54 := HeatV.sub_nn K O _ _ e45_54
  have d45_55 := HeatV.sub_nn K O _ _ e45_55
  have d46_47 := HeatV.sub_nn K O _ _ e46_47
  have d46_48 := HeatV.sub_nn K O _ _ e46_48
  have d46_49 := HeatV.sub_nn K O _ _ e46_49
  have d46_50 := HeatV.sub_nn K O _ _ e46_50
  have d46_51 := HeatV.sub_nn K O _ _ e46_51
  have d46_52 := HeatV.sub_nn K O _ _ e46_52
  have d46_53 := HeatV.sub_nn K O _ _ e46_53
  have d46_54 := HeatV.sub_nn K O _ _ e46_54
  have d46_55 := HeatV.sub_nn K O _ _ e46_55
  have d47_48 := HeatV.sub_nn K O _ _ e47_48
  have d47_49 := HeatV.sub_nn K O _ _ e47_49
  have d47_50 := HeatV.sub_nn K O _ _ e47_50
  have d47_51 := HeatV.sub_nn K O _ _ e47_51
  have d47_52 := HeatV.sub_nn K O _ _ e47_52
  have d47_53 := HeatV.sub_nn K O _ _ e47_53
  have d47_54 := HeatV.sub_nn K O _ _ e47_54
  have d47_55 := HeatV.sub_nn K O _ _ e47_55
  have d48_49 := HeatV.sub_nn K O _ _ e48_49
  have d48_50 := HeatV.sub_nn K O _ _ e48_50
  have d48_51 := HeatV.sub_nn K O _ _ e48_51
  have d48_52 := HeatV.sub_nn K O _ _ e48_52
  have d48_53 := HeatV.sub_nn K O _ _ e48_53
  have d48_54 := HeatV.sub_nn K O _ _ e48_54
  have d48_55 := HeatV.sub_nn K O _ _ e48_55
  have d49_50 := HeatV.sub_nn K O _ _ e49_50
  have d49_51 := HeatV.sub_nn K O _ _ e49_51
  have d49_52 := HeatV.sub_nn K O _ _ e49_52
  have d49_53 := HeatV.sub_nn K O _ _ e49_53
  have d49_54 := HeatV.sub_nn K O _ _ e49_54
  have d49_55 := HeatV.sub_nn K O _ _ e49_55
  have d50_51 := HeatV.sub_nn K O _ _ e50_51
  have d50_52 := HeatV.sub_nn K O _ _ e50_52
  have d50_53 := HeatV.sub_nn K O _ _ e50_53
  have d50_54 := HeatV.sub_nn K O _ _ e50_54
  have d50_55 := HeatV.sub_nn K O _ _ e50_55
  have d51_52 := HeatV.sub_nn K O _ _ e51_52
  have d51_53 := HeatV.sub_nn K O _ _ e51_53
  have d51_54 := HeatV.sub_nn K O _ _ e51_54
  have d51_55 := HeatV.sub_nn K O _ _ e51_55
  have d52_53 := HeatV.sub_nn K O _ _ e52_53
  have d52_54 := HeatV.sub_nn K O _ _ e52_54
  have d52_55 := HeatV.sub_nn K O _ _ e52_55
  have d53_54 := HeatV.sub_nn K O _ _ e53_54
  have d53_55 := HeatV.sub_nn K O _ _ e53_55
  have d54_55 := HeatV.sub_nn K O _ _ e54_55
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.ad  -- (+267653 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 952092736) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (  -- (+6297 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..56, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 56 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 952092736) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.  -- (+6941 chars; full line in the Zenodo source)
      (K.mul (cN K 951213340) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add  -- (+6941 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (A 11) (A 12) (A 13) (A 14) (A 15) (A 16) (A 17) (A 18) (A 19) (A 20) (A 21) (A 22) (A 23) (A 24) (A 25) (A 26) (A 27) (A 28) (A 29) (A 30) (A 31) (A 32) (A 33) (A 34) (A 35) (A 36) (A 37) (A 38) (A 39) (A 40) (A 41) (A 42) (A 43) (A 44) (A 45) (A 46) (A 47) (A 48) (A 49) (A 50) (A 51) (A 52) (A 53) (A 54) (A 55) (A   -- (+506 chars; full line in the Zenodo source)
    (G61Minor.minor K O A 56 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 56 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 56 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 56 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 56 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 56 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 56 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+84833 chars; full line in the Zenodo source)

end G61Lv55

#print axioms G61Lv55.add_nn
#print axioms G61Lv55.level
#print axioms G61Lv55.level_fun

ym/G61Lv6.lean

lean_all/ym/G61Lv6.lean

/-
  ym/G61Lv6 — T45, G61a at level n = 6 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv6

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a7)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e1_2 : O.le (K.mul a1 a3) (K.mul a2 a2)) (e1_3 : O.le (K.mul a1 a4) (K.mul a2 a3)) (e1_4 : O.le (K.mul a1 a5) (K.mul a2 a4)) (e1_5 : O.le (K.mu  -- (+487 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 7056) (K.mul (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 6) a5)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 5) a4))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 4) a3))) (K.mul (K.mul (cN K 4) a3) (K.mul (cN K 3) a2))) (K.mul (K.mul (cN K 5) a4) (K.mul (cN K 2) a1))) (K.mul (K.mul (cN K 6) a5) (K.mul (cN K 1) a0))) (K.add (K.add (K.add (K.add (K.add (K  -- (+404 chars; full line in the Zenodo source)
      (K.mul (cN K 6720) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 7) a6)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 6) a5))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 5) a4))) (K.mul (K.mul (cN K 4) a3) (K.mul (cN K 4) a3))) (K.mul (K.mul (cN K 5) a4) (K.mul (cN K 3) a2))) (K.mul (K.mul (cN K 6) a5) (K.mul (cN K 2) a1))) (K.mul (K.mul (cN K 7) a6) (K.mul  -- (+407 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (cN K 677376) (K.mul (K.mul a0 a5) (K.add (K.mul a1 a6) (K.neg (K.mul a0 a7))))) (K.mul (cN K 1349376) (K.mul (K.mul a4 a4) (K.add (K.mul a2 a2) (K.neg (K.mul a1 a3)))))) (K.mul (cN K 231168) (K.mul (K.mul a0 a4) (K.add (K.mul a2 a6) (K.neg (K.mul a1  -- (+3173 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 7056) (K.mul (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 6) a5)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 5) a4))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 4) a3))) (K.mul (K.mul (cN K 4) a3) (K.mul (cN K 3) a2))) (K.mul (K.mul (cN K 5) a4) (K.mul (cN K 2) a1))) (K.mul (K.mul (cN K 6) a5) (K.mul (cN K 1) a0))) (K.add (K.add   -- (+432 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..7, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 7 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 7056) (K.mul (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 6) (A 5))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 5) (A 4)))) (K.mul (K.mul (cN K 3) (A 2)) (K.mul (cN K 4) (A 3)))) (K.mul (K.mul (cN K 4) (A 3)) (K.mul (cN K 3) (A 2)))) (K.mul (K.mul (cN K 5) (A 4)) (K.mul (cN K 2) (A 1)))) (K.mul (K.mul (cN K 6) (A 5)) (K.mul (cN K 1) (A 0)))) (  -- (+488 chars; full line in the Zenodo source)
      (K.mul (cN K 6720) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 7) (A 6))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 6) (A 5)))) (K.mul (K.mul (cN K 3) (A 2)) (K.mul (cN K 5) (A 4)))) (K.mul (K.mul (cN K 4) (A 3)) (K.mul (cN K 4) (A 3)))) (K.mul (K.mul (cN K 5) (A 4)) (K.mul (cN K 3) (A 2)))) (K.mul (K.mul (cN K 6) (A 5)) (K.mul (cN K 2) (A 1))  -- (+488 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hnn 7)
    (G61Minor.minor K O A 7 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 7 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 7 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 7 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 7 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 7 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 7 hnn hne hlc 0 1 (by decide)) (G61Minor.minor K O A 7 h  -- (+716 chars; full line in the Zenodo source)

end G61Lv6

#print axioms G61Lv6.add_nn
#print axioms G61Lv6.level
#print axioms G61Lv6.level_fun

ym/G61Lv7.lean

lean_all/ym/G61Lv7.lean

/-
  ym/G61Lv7 — T45, G61a at level n = 7 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv7

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a7) (p8 : O.le K.zero a8)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e1_2 : O.le (K.mul a1 a3) (K.mul a2 a2)) (e1_3 : O.le (K.mul a1 a4) (K.mul a2 a3)) (e1_4 : O.le (K.mu  -- (+781 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 14400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 7) a6)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 6) a5))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 5) a4))) (K.mul (K.mul (cN K 4) a3) (K.mul (cN K 4) a3))) (K.mul (K.mul (cN K 5) a4) (K.mul (cN K 3) a2))) (K.mul (K.mul (cN K 6) a5) (K.mul (cN K 2) a1))) (K.mul (K.mul (cN K 7) a6) (K  -- (+517 chars; full line in the Zenodo source)
      (K.mul (cN K 13860) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 8) a7)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 7) a6))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 6) a5))) (K.mul (K.mul (cN K 4) a3) (K.mul (cN K 5) a4))) (K.mul (K.mul (cN K 5) a4) (K.mul (cN K 4) a3))) (K.mul (K.mul (cN K 6) a5) (K.mul (cN K 3) a2))) (K.mul (K.mul (cN K 7) a6  -- (+520 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (cN K 610560) (K.mul (K.mul a6 a6) (K.add (K.mul a1 a1) (K.neg (K.mul a0 a2))))) (K.mul (cN K 1123200) (K.mul (K.mul a3 a6) (K.add (K.mul a1 a4) (K.neg (K.mul a0 a5)))))) (K.mul (cN K 80640) (K.mul (K.  -- (+4554 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 14400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 7) a6)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 6) a5))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 5) a4))) (K.mul (K.mul (cN K 4) a3) (K.mul (cN K 4) a3))) (K.mul (K.mul (cN K 5) a4) (K.mul (cN K 3) a2))) (K.mul (K.mul (cN K 6) a5) (K.mul (cN K 2) a1))) (K.mul  -- (+545 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..8, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 8 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 14400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 7) (A 6))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 6) (A 5)))) (K.mul (K.mul (cN K 3) (A 2)) (K.mul (cN K 5) (A 4)))) (K.mul (K.mul (cN K 4) (A 3)) (K.mul (cN K 4) (A 3)))) (K.mul (K.mul (cN K 5) (A 4)) (K.mul (cN K 3) (A 2)))) (K.mul (K.mul (cN K 6) (A 5)) (K.mul (cN K 2) (A  -- (+613 chars; full line in the Zenodo source)
      (K.mul (cN K 13860) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 8) (A 7))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 7) (A 6)))) (K.mul (K.mul (cN K 3) (A 2)) (K.mul (cN K 6) (A 5)))) (K.mul (K.mul (cN K 4) (A 3)) (K.mul (cN K 5) (A 4)))) (K.mul (K.mul (cN K 5) (A 4)) (K.mul (cN K 4) (A 3)))) (K.mul (K.mul (cN K 6) (A 5)) (K.mul (cN K 3  -- (+613 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hnn 7) (hnn 8)
    (G61Minor.minor K O A 8 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 8 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 8 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 8 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 8 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 8 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 8 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K O A 8 h  -- (+1087 chars; full line in the Zenodo source)

end G61Lv7

#print axioms G61Lv7.add_nn
#print axioms G61Lv7.level
#print axioms G61Lv7.level_fun

ym/G61Lv8.lean

lean_all/ym/G61Lv8.lean

/-
  ym/G61Lv8 — T45, G61a at level n = 8 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv8

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a7) (p8 : O.le K.zero a8) (p9 : O.le K.zero a9)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e1_2 : O.le (K.mul a1 a3) (K.mul a2 a2)) (e1_3 : O.le (K.mu  -- (+1117 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 27225) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 8) a7)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 7) a6))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 6) a5))) (K.mul (K.mul (cN K 4) a3) (K.mul (cN K 5) a4))) (K.mul (K.mul (cN K 5) a4) (K.mul (cN K 4) a3))) (K.mul (K.mul (cN K 6) a5) (K.mul (cN K 3) a2))) (K.mul (K.mul (cN K 7)  -- (+631 chars; full line in the Zenodo source)
      (K.mul (cN K 26400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 9) a8)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 8) a7))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 7) a6))) (K.mul (K.mul (cN K 4) a3) (K.mul (cN K 6) a5))) (K.mul (K.mul (cN K 5) a4) (K.mul (cN K 5) a4))) (K.mul (K.mul (cN K 6) a5) (K.mul (cN K 4) a3))) (K.mul (K.mul (cN   -- (+632 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_6 := HeatV.sub_nn K O _ _ e2_6
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (cN K 4197600) (K.mul (K.mul a7 a7) (K.add (K.mul a1 a1) (K.neg (K.mul a0 a2))))) (K.mul (cN K 158400) (K.mul (K.mul a0 a7) (K.add (K.mul a1 a8) (K.neg (K.mul a0 a9))  -- (+5571 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 27225) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 8) a7)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 7) a6))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 6) a5))) (K.mul (K.mul (cN K 4) a3) (K.mul (cN K 5) a4))) (K.mul (K.mul (cN K 5) a4) (K.mul (cN K 4) a3))) (K.mul (K.mul (cN K 6) a5) (K.mul (cN K 3) a2)))  -- (+659 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..9, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 9 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 27225) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 8) (A 7))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 7) (A 6)))) (K.mul (K.mul (cN K 3) (A 2)) (K.mul (cN K 6) (A 5)))) (K.mul (K.mul (cN K 4) (A 3)) (K.mul (cN K 5) (A 4)))) (K.mul (K.mul (cN K 5) (A 4)) (K.mul (cN K 4) (A 3)))) (K.mul (K.mul (cN K 6) (A 5)) (K.mul (cN   -- (+739 chars; full line in the Zenodo source)
      (K.mul (cN K 26400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 9) (A 8))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 8) (A 7)))) (K.mul (K.mul (cN K 3) (A 2)) (K.mul (cN K 7) (A 6)))) (K.mul (K.mul (cN K 4) (A 3)) (K.mul (cN K 6) (A 5)))) (K.mul (K.mul (cN K 5) (A 4)) (K.mul (cN K 5) (A 4)))) (K.mul (K.mul (cN K 6) (A 5)) (K.mul   -- (+737 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hnn 7) (hnn 8) (hnn 9)
    (G61Minor.minor K O A 9 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 9 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 9 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 9 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 9 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 9 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 9 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K O A 9 h  -- (+1511 chars; full line in the Zenodo source)

end G61Lv8

#print axioms G61Lv8.add_nn
#print axioms G61Lv8.level
#print axioms G61Lv8.level_fun

ym/G61Lv9.lean

lean_all/ym/G61Lv9.lean

/-
  ym/G61Lv9 — T45, G61a at level n = 9 (all lengths, generated by work/cert/A/g61/gen61.py from an exact LP
  certificate): for X_k = (k+1)A_k with A ≥ 0 and the log-concavity minors e_{j,k} = A_{j+1}A_k − A_jA_{k+1} ≥ 0,
  and S = X⋆X, the Liggett-type inequality W_{n}² S_{n−1}S_{n+1} ≤ W_{n−1}W_{n+1} S_n² (W_m = C(m+3,3)),
  scaled by 1. Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ
import ym.HeatV
import ym.G61Minor

namespace G61Lv9

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

set_option maxRecDepth 100000 in
theorem level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 : R) (p0 : O.le K.zero a0) (p1 : O.le K.zero a1) (p2 : O.le K.zero a2) (p3 : O.le K.zero a3) (p4 : O.le K.zero a4) (p5 : O.le K.zero a5) (p6 : O.le K.zero a6) (p7 : O.le K.zero a7) (p8 : O.le K.zero a8) (p9 : O.le K.zero a9) (p10 : O.le K.zero a10)
    (e0_1 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e0_2 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e0_3 : O.le (K.mul a0 a4) (K.mul a1 a3)) (e0_4 : O.le (K.mul a0 a5) (K.mul a1 a4)) (e0_5 : O.le (K.mul a0 a6) (K.mul a1 a5)) (e0_6 : O.le (K.mul a0 a7) (K.mul a1 a6)) (e0_7 : O.le (K.mul a0 a8) (K.mul a1 a7)) (e0_8 : O.le (K.mul a0 a9) (K.mul a1 a8)) (e0_9 : O.le (K.mul a0 a10) (K.mul a1 a9)) (e1_2 : O.le (K.m  -- (+1504 chars; full line in the Zenodo source)
    O.le (K.mul (cN K 48400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 9) a8)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 8) a7))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 7) a6))) (K.mul (K.mul (cN K 4) a3) (K.mul (cN K 6) a5))) (K.mul (K.mul (cN K 5) a4) (K.mul (cN K 5) a4))) (K.mul (K.mul (cN K 6) a5) (K.mul (cN K 4) a3))) (K.mul (K.mul (  -- (+747 chars; full line in the Zenodo source)
      (K.mul (cN K 47190) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 10) a9)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 9) a8))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 8) a7))) (K.mul (K.mul (cN K 4) a3) (K.mul (cN K 7) a6))) (K.mul (K.mul (cN K 5) a4) (K.mul (cN K 6) a5))) (K.mul (K.mul (cN K 6) a5) (K.mul (cN K 5) a4))) (K.mul (K.  -- (+748 chars; full line in the Zenodo source)
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have d0_1 := HeatV.sub_nn K O _ _ e0_1
  have d0_2 := HeatV.sub_nn K O _ _ e0_2
  have d0_3 := HeatV.sub_nn K O _ _ e0_3
  have d0_4 := HeatV.sub_nn K O _ _ e0_4
  have d0_5 := HeatV.sub_nn K O _ _ e0_5
  have d0_6 := HeatV.sub_nn K O _ _ e0_6
  have d0_7 := HeatV.sub_nn K O _ _ e0_7
  have d0_8 := HeatV.sub_nn K O _ _ e0_8
  have d0_9 := HeatV.sub_nn K O _ _ e0_9
  have d1_2 := HeatV.sub_nn K O _ _ e1_2
  have d1_3 := HeatV.sub_nn K O _ _ e1_3
  have d1_4 := HeatV.sub_nn K O _ _ e1_4
  have d1_5 := HeatV.sub_nn K O _ _ e1_5
  have d1_6 := HeatV.sub_nn K O _ _ e1_6
  have d1_7 := HeatV.sub_nn K O _ _ e1_7
  have d1_8 := HeatV.sub_nn K O _ _ e1_8
  have d2_3 := HeatV.sub_nn K O _ _ e2_3
  have d2_4 := HeatV.sub_nn K O _ _ e2_4
  have d2_5 := HeatV.sub_nn K O _ _ e2_5
  have d2_7 := HeatV.sub_nn K O _ _ e2_7
  have d2_8 := HeatV.sub_nn K O _ _ e2_8
  have d2_9 := HeatV.sub_nn K O _ _ e2_9
  have d3_4 := HeatV.sub_nn K O _ _ e3_4
  have d3_5 := HeatV.sub_nn K O _ _ e3_5
  have d3_6 := HeatV.sub_nn K O _ _ e3_6
  have d3_7 := HeatV.sub_nn K O _ _ e3_7
  have d3_8 := HeatV.sub_nn K O _ _ e3_8
  have d3_9 := HeatV.sub_nn K O _ _ e3_9
  have d4_5 := HeatV.sub_nn K O _ _ e4_5
  have d4_6 := HeatV.sub_nn K O _ _ e4_6
  have d4_7 := HeatV.sub_nn K O _ _ e4_7
  have d4_8 := HeatV.sub_nn K O _ _ e4_8
  have d4_9 := HeatV.sub_nn K O _ _ e4_9
  have d5_6 := HeatV.sub_nn K O _ _ e5_6
  have d5_7 := HeatV.sub_nn K O _ _ e5_7
  have d5_8 := HeatV.sub_nn K O _ _ e5_8
  have d5_9 := HeatV.sub_nn K O _ _ e5_9
  have d6_7 := HeatV.sub_nn K O _ _ e6_7
  have d6_8 := HeatV.sub_nn K O _ _ e6_8
  have d6_9 := HeatV.sub_nn K O _ _ e6_9
  have d7_8 := HeatV.sub_nn K O _ _ e7_8
  have d7_9 := HeatV.sub_nn K O _ _ e7_9
  have d8_9 := HeatV.sub_nn K O _ _ e8_9
  have hs : O.le K.zero (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (cN K 8034400) (K.mul (K.mul a4 a6) (K.add (K.mul a1 a7) (K.neg (K.mul a0 a8))))) (K.mul (cN K 1258400)  -- (+7422 chars; full line in the Zenodo source)
  have u := HeatV.le_add_nn K O (K.mul (cN K 48400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) a0) (K.mul (cN K 9) a8)) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 8) a7))) (K.mul (K.mul (cN K 3) a2) (K.mul (cN K 7) a6))) (K.mul (K.mul (cN K 4) a3) (K.mul (cN K 6) a5))) (K.mul (K.mul (cN K 5) a4) (K.mul (cN K 5) a4))) (K.mul (K.mul (cN K 6) a5) (K.mul (cN K 4  -- (+775 chars; full line in the Zenodo source)
  refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
  unfold cN; ring_z


/-- the same for a sequence: nonnegative, nonzero on 0..10, adjacent-log-concave -/
theorem level_fun (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 10 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le (K.mul (cN K 48400) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 9) (A 8))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 8) (A 7)))) (K.mul (K.mul (cN K 3) (A 2)) (K.mul (cN K 7) (A 6)))) (K.mul (K.mul (cN K 4) (A 3)) (K.mul (cN K 6) (A 5)))) (K.mul (K.mul (cN K 5) (A 4)) (K.mul (cN K 5) (A 4)))) (K.mul (K.mul (cN K 6) (A 5)) (K.m  -- (+867 chars; full line in the Zenodo source)
      (K.mul (cN K 47190) (K.mul (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K 10) (A 9))) (K.mul (K.mul (cN K 2) (A 1)) (K.mul (cN K 9) (A 8)))) (K.mul (K.mul (cN K 3) (A 2)) (K.mul (cN K 8) (A 7)))) (K.mul (K.mul (cN K 4) (A 3)) (K.mul (cN K 7) (A 6)))) (K.mul (K.mul (cN K 5) (A 4)) (K.mul (cN K 6) (A 5)))) (K.mul (K.mul (cN K 6) (A 5))  -- (+865 chars; full line in the Zenodo source)
  level K O h1 (A 0) (A 1) (A 2) (A 3) (A 4) (A 5) (A 6) (A 7) (A 8) (A 9) (A 10) (hnn 0) (hnn 1) (hnn 2) (hnn 3) (hnn 4) (hnn 5) (hnn 6) (hnn 7) (hnn 8) (hnn 9) (hnn 10)
    (G61Minor.minor K O A 10 hnn hne hlc 0 0 (by decide)) (G61Minor.minor K O A 10 hnn hne hlc 1 0 (by decide)) (G61Minor.minor K O A 10 hnn hne hlc 2 0 (by decide)) (G61Minor.minor K O A 10 hnn hne hlc 3 0 (by decide)) (G61Minor.minor K O A 10 hnn hne hlc 4 0 (by decide)) (G61Minor.minor K O A 10 hnn hne hlc 5 0 (by decide)) (G61Minor.minor K O A 10 hnn hne hlc 6 0 (by decide)) (G61Minor.minor K   -- (+2033 chars; full line in the Zenodo source)

end G61Lv9

#print axioms G61Lv9.add_nn
#print axioms G61Lv9.level
#print axioms G61Lv9.level_fun

ym/G61Minor.lean

lean_all/ym/G61Minor.lean

/-
  ym/G61Minor — T45, G61a hypotheses: a nonnegative sequence that is adjacent-log-concave
  (A_k A_{k+2} ≤ A_{k+1}²) and nonzero on 0..N has all gapped 2×2 minors nonnegative:
    A_j A_{j+d+2} ≤ A_{j+1} A_{j+d+1}   whenever j + d + 1 ≤ N.
  Induction on the gap d, cancelling A_{j+d+1} ≠ 0. Lean 4 core only, no axioms.
-/
import ym.TripleE

namespace G61Minor

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem minor (A : Nat → R) (N : Nat) (hnn : ∀ i, O.le K.zero (A i)) (hne : ∀ i, i ≤ N → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    ∀ d j, j + d + 1 ≤ N → O.le (K.mul (A j) (A (j + d + 2))) (K.mul (A (j + 1)) (A (j + d + 1)))
  | 0, j, _ => by
    have := hlc j
    rw [show j + 0 + 2 = j + 2 from rfl, show j + 0 + 1 = j + 1 from rfl]; exact this
  | d + 1, j, h => by
    have ih := minor A N hnn hne hlc d j (Nat.le_of_succ_le (show j + d + 1 + 1 ≤ N by rw [show j + d + 1 + 1 = j + (d + 1) + 1 by lib_nat]; exact h))
    -- c = A_{j+d+2} ≠ 0
    have hc := hne (j + d + 2) (by rw [show j + d + 2 = j + (d + 1) + 1 by lib_nat]; exact h)
    have l := hlc (j + d + 1)
    rw [show j + d + 1 + 2 = j + (d + 1) + 2 by lib_nat, show j + d + 1 + 1 = j + d + 2 by lib_nat] at l
    -- A_j A_{j+d+3} A_{j+d+1} ≤ A_j A_{j+d+2}² ≤ A_{j+1} A_{j+d+1} A_{j+d+2}
    have s1 := O.mul_le_mul_right _ _ (A j) l (hnn j)
    have s2 := O.mul_le_mul_right _ _ (A (j + d + 2)) ih (hnn _)
    show O.le (K.mul (A j) (A (j + (d + 1) + 2))) (K.mul (A (j + 1)) (A (j + (d + 1) + 1)))
    rw [show j + (d + 1) + 1 = j + d + 2 by lib_nat]
    -- cancel A_{j+d+1}? use c = A_{j+d+1} if nonzero, else handle: here cancel A_{j+d+1}
    have hc1 := hne (j + d + 1) (Nat.le_of_succ_le (show j + d + 1 + 1 ≤ N by rw [show j + d + 1 + 1 = j + (d + 1) + 1 by lib_nat]; exact h))
    apply O.pos_cancel _ _ (A (j + d + 1)) (hnn _) hc1
    refine O.le_trans _ _ _ (TripleE.le_of_eq' K O _ _ ?_) (O.le_trans _ _ _ s1 (O.le_trans _ _ _ (TripleE.le_of_eq' K O _ _ ?_)
      (O.le_trans _ _ _ s2 (TripleE.le_of_eq' K O _ _ ?_))))
    · lib_ring
    · lib_ring
    · lib_ring

end G61Minor

#print axioms G61Minor.minor

ym/G61N2.lean

lean_all/ym/G61N2.lean

/-
  ym/G61N2 — T45, G61a at the second level (all lengths): for X_k = (k+1)A_k with A ≥ 0 and the
  log-concavity minors e₀₁ = A₁² − A₀A₂, e₀₂ = A₁A₂ − A₀A₃, e₁₂ = A₂² − A₁A₃ nonnegative, and S = X⋆X,
    W₁W₃ S₂² ≥ W₂² S₁S₃   (W_n = C(n+3,3): 4·20 S₂² ≥ 100 S₁S₃),
  with the exact certificate  80S₂² − 100S₁S₃ = 1280A₁²e₀₁ + 320A₀A₁e₀₂ + 2880A₀²e₁₂  (Kamiak LP a3_lp61b).
  Lean 4 core only, no axioms.
-/
import ym.TripleE
import ym.RingZ

namespace G61N2

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem second_level (h1 : O.le K.zero K.one) (a0 a1 a2 a3 : R) (h0 : O.le K.zero a0) (ha1 : O.le K.zero a1)
    (e01 : O.le (K.mul a0 a2) (K.mul a1 a1)) (e02 : O.le (K.mul a0 a3) (K.mul a1 a2)) (e12 : O.le (K.mul a1 a3) (K.mul a2 a2)) :
    O.le (K.mul (cN K 100)
        (K.mul (K.mul (cN K 2) (K.mul a0 (K.mul (cN K 2) a1)))
          (K.add (K.mul (cN K 2) (K.mul a0 (K.mul (cN K 4) a3))) (K.mul (cN K 2) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 3) a2))))))
      (K.mul (cN K 80)
        (K.mul (K.add (K.mul (cN K 2) (K.mul a0 (K.mul (cN K 3) a2))) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 2) a1)))
          (K.add (K.mul (cN K 2) (K.mul a0 (K.mul (cN K 3) a2))) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 2) a1))))) := by
  have nn := fun k => SU2CharExp.cN_nn K O h1 k
  have sq : ∀ x : R, O.le K.zero (K.mul x x) := fun x => by
    cases O.le_total K.zero x with
    | inl h => exact O.mul_nonneg _ _ h h
    | inr h =>
      have hn : O.le K.zero (K.neg x) := by
        have := O.add_le_add _ _ _ _ h (O.le_refl (K.neg x))
        rw [show K.add x (K.neg x) = K.zero by lib_ring, show K.add K.zero (K.neg x) = K.neg x by lib_ring] at this
        exact this
      have := O.mul_nonneg _ _ hn hn
      rw [show K.mul (K.neg x) (K.neg x) = K.mul x x by lib_ring] at this; exact this
  -- three nonnegative pieces, written as  c·(big) ≥ c·(small)
  have t1 := O.mul_le_mul_right _ _ (K.mul (cN K 1280) (K.mul a1 a1)) e01 (O.mul_nonneg _ _ (nn _) (sq a1))
  have t2 := O.mul_le_mul_right _ _ (K.mul (cN K 320) (K.mul a0 a1)) e02 (O.mul_nonneg _ _ (nn _) (O.mul_nonneg _ _ h0 ha1))
  have t3 := O.mul_le_mul_right _ _ (K.mul (cN K 2880) (K.mul a0 a0)) e12 (O.mul_nonneg _ _ (nn _) (sq a0))
  have t := O.add_le_add _ _ _ _ (O.add_le_add _ _ _ _ t1 t2) t3
  have u := O.add_le_add _ _ _ _ t (O.le_refl (K.mul (cN K 100)
        (K.mul (K.mul (cN K 2) (K.mul a0 (K.mul (cN K 2) a1)))
          (K.add (K.mul (cN K 2) (K.mul a0 (K.mul (cN K 4) a3))) (K.mul (cN K 2) (K.mul (K.mul (cN K 2) a1) (K.mul (cN K 3) a2)))))))
  have w := O.add_le_add _ _ _ _ u (O.le_refl (K.neg (K.add (K.add (K.mul (K.mul a0 a2) (K.mul (cN K 1280) (K.mul a1 a1))) (K.mul (K.mul a0 a3) (K.mul (cN K 320) (K.mul a0 a1)))) (K.mul (K.mul a1 a3) (K.mul (cN K 2880) (K.mul a0 a0))))))
  refine O.le_trans _ _ _ (TripleE.le_of_eq' K O _ _ ?_) (O.le_trans _ _ _ w (TripleE.le_of_eq' K O _ _ ?_))
  · unfold cN; ring_z
  · unfold cN; ring_z

end G61N2

#print axioms G61N2.second_level

ym/G61Peel.lean

lean_all/ym/G61Peel.lean

/-
  ym/G61Peel — T45, G61a: uniform peeling of the top index, for every level.
  At level N = n+1 the deficit D_N = W_n W_{n+2} S_{n+1}² − W_{n+1}² S_n S_{n+2} (G61Upto.Stmt, W_m = C(m+3,3)) carries
  A_{n+2} only through −W_{n+1}²·S_n·2(n+3)A_0A_{n+2}; the explicit sum
    P_n = Σ_{i+d=n} 2(n+3) W_{n+1}² (i+1)(d+1) · (A_{i+1}A_{i+d+1} − A_iA_{i+d+2}) · A_0 A_d
  of gapped log-concavity minors (nonnegative by G61Minor) removes it:
    `peel_reduce`  D_N − P_n ≥ 0 implies the level-N inequality;
    `peeled_indep` D_N − P_n is the same for two sequences agreeing on 0..n+1 (it does not involve A_{n+2}).
  Lean 4 core only, no axioms.
-/
import ym.G61Upto
import lib.NatSub

namespace G61Peel

open YMChain LinkIntegral SU2Char G61Upto

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

/-- the minor-times-monomial term with index i and gap d, scaled by κ -/
def term (A : Nat → R) (κ : R) (i d : Nat) : R :=
  K.mul κ (K.mul (K.mul (cN K (i + 1)) (cN K (d + 1)))
    (K.mul (K.add (K.mul (A (i + 1)) (A (i + d + 1))) (K.neg (K.mul (A i) (A (i + d + 2)))))
      (K.mul (A 0) (A d))))

/-- Σ_{k=0}^{d} term (i+k) (d−k), written without subtraction -/
def pAux (A : Nat → R) (κ : R) : Nat → Nat → R
  | i, 0 => term K A κ i 0
  | i, d + 1 => K.add (term K A κ i (d + 1)) (pAux A κ (i + 1) d)

/-- the peeling constant 2(n+3)W_{n+1}² -/
def kap (n : Nat) : R := K.mul (K.mul (cN K 2) (cN K (n + 3))) (K.mul (cN K (wt (n + 1))) (cN K (wt (n + 1))))

/-- the peeling sum at level n+1 -/
def peel (A : Nat → R) (n : Nat) : R := pAux K A (kap K n) 0 n

/-- the peeled deficit D_{n+1} − P_n -/
def peeled (A : Nat → R) (n : Nat) : R :=
  K.add (K.add (K.mul (cN K (wt n * wt (n + 2))) (K.mul (sq K A (n + 1)) (sq K A (n + 1))))
    (K.neg (K.mul (cN K (wt (n + 1) * wt (n + 1))) (K.mul (sq K A n) (sq K A (n + 2))))))
    (K.neg (peel K A n))

theorem add_nn (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy
  rw [show K.add K.zero K.zero = K.zero by lib_ring] at this; exact this

theorem kap_nn (h1 : O.le K.zero K.one) (n : Nat) : O.le K.zero (kap K n) :=
  O.mul_nonneg _ _ (O.mul_nonneg _ _ (SU2CharExp.cN_nn K O h1 _) (SU2CharExp.cN_nn K O h1 _))
    (O.mul_nonneg _ _ (SU2CharExp.cN_nn K O h1 _) (SU2CharExp.cN_nn K O h1 _))

theorem term_nn (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (N : Nat)
    (hne : ∀ i, i ≤ N → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (κ : R) (hκ : O.le K.zero κ) (i d : Nat) (h : i + d + 1 ≤ N) : O.le K.zero (term K A κ i d) := by
  have m := G61Minor.minor K O A N hnn hne hlc d i h
  exact O.mul_nonneg _ _ hκ (O.mul_nonneg _ _
    (O.mul_nonneg _ _ (SU2CharExp.cN_nn K O h1 _) (SU2CharExp.cN_nn K O h1 _))
    (O.mul_nonneg _ _ (HeatV.sub_nn K O _ _ m) (O.mul_nonneg _ _ (hnn 0) (hnn d))))

theorem pAux_nn (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (N : Nat)
    (hne : ∀ i, i ≤ N → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) (κ : R) (hκ : O.le K.zero κ) :
    ∀ d i, i + d + 1 ≤ N → O.le K.zero (pAux K A κ i d)
  | 0, i, h => term_nn K O h1 A hnn N hne hlc κ hκ i 0 h
  | d + 1, i, h => by
    have h' : (i + 1) + d + 1 ≤ N := by
      have e : (i + 1) + d + 1 = i + (d + 1) + 1 := by lib_nat
      rw [e]; exact h
    exact add_nn K O _ _ (term_nn K O h1 A hnn N hne hlc κ hκ i (d + 1) h)
      (pAux_nn h1 A hnn N hne hlc κ hκ d (i + 1) h')

/-- the peeling sum is nonnegative for adjacent-log-concave A ≥ 0, nonzero on 0..n+1 -/
theorem peel_nn (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 1 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) :
    O.le K.zero (peel K A n) :=
  pAux_nn K O h1 A hnn (n + 1) hne hlc _ (kap_nn K O h1 n) n 0 (by
    have e : 0 + n + 1 = n + 1 := by lib_nat
    rw [e]; exact Nat.le_refl _)

/-- **reduction**: if the peeled deficit is nonnegative then the level-(n+1) inequality holds -/
theorem peel_reduce (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 1 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hD : O.le K.zero (peeled K A n)) : Stmt K O A n := by
  have hP := peel_nn K O h1 A hnn n hne hlc
  have s := O.add_le_add _ _ _ _ hD hP
  have s2 := O.add_le_add _ _ _ _ s
    (O.le_refl (K.mul (cN K (wt (n + 1) * wt (n + 1))) (K.mul (sq K A n) (sq K A (n + 2)))))
  unfold Stmt
  unfold peeled at s2
  exact (show K.add (K.add K.zero K.zero) (K.mul (cN K (wt (n + 1) * wt (n + 1))) (K.mul (sq K A n) (sq K A (n + 2))))
      = K.mul (cN K (wt (n + 1) * wt (n + 1))) (K.mul (sq K A n) (sq K A (n + 2))) by lib_ring) ▸
    (show K.add (K.add (K.add (K.add (K.mul (cN K (wt n * wt (n + 2))) (K.mul (sq K A (n + 1)) (sq K A (n + 1))))
        (K.neg (K.mul (cN K (wt (n + 1) * wt (n + 1))) (K.mul (sq K A n) (sq K A (n + 2))))))
        (K.neg (peel K A n))) (peel K A n)) (K.mul (cN K (wt (n + 1) * wt (n + 1))) (K.mul (sq K A n) (sq K A (n + 2))))
      = K.mul (cN K (wt n * wt (n + 2))) (K.mul (sq K A (n + 1)) (sq K A (n + 1))) by lib_ring) ▸ s2

/-! ### independence of A_{n+2} -/

theorem sumS_congr (f g : Nat → R) : ∀ m, (∀ j, j ≤ m → f j = g j) → sumS K f m = sumS K g m
  | 0, h => h 0 (Nat.le_refl 0)
  | m + 1, h => by
    show K.add (sumS K f m) (f (m + 1)) = K.add (sumS K g m) (g (m + 1))
    rw [sumS_congr f g m (fun j hj => h j (Nat.le_succ_of_le hj)), h (m + 1) (Nat.le_refl _)]

/-- sums agreeing except at index 0 -/
theorem sumS_diff (f g : Nat → R) : ∀ m, (∀ j, 1 ≤ j → j ≤ m → f j = g j) →
    sumS K f m = K.add (sumS K g m) (K.add (f 0) (K.neg (g 0)))
  | 0, _ => by show f 0 = K.add (g 0) (K.add (f 0) (K.neg (g 0))); lib_ring
  | m + 1, h => by
    show K.add (sumS K f m) (f (m + 1)) = K.add (K.add (sumS K g m) (g (m + 1))) (K.add (f 0) (K.neg (g 0)))
    rw [sumS_diff f g m (fun j h1 hj => h j h1 (Nat.le_succ_of_le hj)), h (m + 1) (Nat.succ_le_succ (Nat.zero_le m)) (Nat.le_refl _)]
    lib_ring

theorem sub_le' (a b : Nat) : a - b ≤ a := by
  cases Nat.le_total b a with
  | inl hba => exact Nat.le.intro (LibNatSub.sub_add hba)
  | inr hab => rw [LibNatSub.sub_eq_zero hab]; exact Nat.zero_le a

theorem sq_agree (A B : Nat → R) (M : Nat) (hAB : ∀ j, j ≤ M → A j = B j) (m : Nat) (hm : m ≤ M) :
    sq K A m = sq K B m := by
  unfold G61Upto.sq
  apply sumS_congr
  intro j hj
  show K.mul (K.mul (cN K (j + 1)) (A j)) (K.mul (cN K (m - j + 1)) (A (m - j)))
    = K.mul (K.mul (cN K (j + 1)) (B j)) (K.mul (cN K (m - j + 1)) (B (m - j)))
  rw [hAB j (Nat.le_trans hj hm), hAB (m - j) (Nat.le_trans (sub_le' m j) hm)]

theorem self_sub (a : Nat) : a - a = 0 := by
  have := LibNatSub.add_sub_r 0 a
  rw [Nat.zero_add] at this; exact this

/-- the top sum changes only through the two corner terms -/
theorem sq_top (A B : Nat → R) (n : Nat) (hAB : ∀ j, j ≤ n + 1 → A j = B j) :
    sq K A (n + 2) = K.add (sq K B (n + 2))
      (K.mul (K.mul (cN K 2) (cN K (n + 3))) (K.mul (B 0) (K.add (A (n + 2)) (K.neg (B (n + 2)))))) := by
  have key := sumS_diff K (fun j => K.mul (K.mul (cN K (j + 1)) (A j)) (K.mul (cN K (n + 2 - j + 1)) (A (n + 2 - j))))
    (fun j => K.mul (K.mul (cN K (j + 1)) (B j)) (K.mul (cN K (n + 2 - j + 1)) (B (n + 2 - j)))) (n + 1)
    (fun j h1 hj => by
      cases j with
      | zero => exact absurd h1 (Nat.not_succ_le_zero 0)
      | succ j' =>
        have e : n + 2 - (j' + 1) = n + 1 - j' := Nat.succ_sub_succ (n + 1) j'
        show K.mul (K.mul (cN K (j' + 1 + 1)) (A (j' + 1))) (K.mul (cN K (n + 2 - (j' + 1) + 1)) (A (n + 2 - (j' + 1))))
          = K.mul (K.mul (cN K (j' + 1 + 1)) (B (j' + 1))) (K.mul (cN K (n + 2 - (j' + 1) + 1)) (B (n + 2 - (j' + 1))))
        rw [e, hAB (j' + 1) hj, hAB (n + 1 - j') (sub_le' (n + 1) j')])
  have e0 : n + 2 - (n + 2) = 0 := self_sub (n + 2)
  have e01 : n + 2 - (n + 2) + 1 = 1 := by rw [e0]
  have e2 : cN K 2 = K.add (cN K 1) (cN K 1) := cN_add K 1 1
  unfold G61Upto.sq
  show K.add (sumS K (fun j => K.mul (K.mul (cN K (j + 1)) (A j)) (K.mul (cN K (n + 2 - j + 1)) (A (n + 2 - j)))) (n + 1))
      (K.mul (K.mul (cN K (n + 3)) (A (n + 2))) (K.mul (cN K (n + 2 - (n + 2) + 1)) (A (n + 2 - (n + 2)))))
    = K.add (K.add (sumS K (fun j => K.mul (K.mul (cN K (j + 1)) (B j)) (K.mul (cN K (n + 2 - j + 1)) (B (n + 2 - j)))) (n + 1))
      (K.mul (K.mul (cN K (n + 3)) (B (n + 2))) (K.mul (cN K (n + 2 - (n + 2) + 1)) (B (n + 2 - (n + 2))))))
      (K.mul (K.mul (cN K 2) (cN K (n + 3))) (K.mul (B 0) (K.add (A (n + 2)) (K.neg (B (n + 2))))))
  rw [key]
  show K.add (K.add (sumS K _ (n + 1)) (K.add (K.mul (K.mul (cN K 1) (A 0)) (K.mul (cN K (n + 3)) (A (n + 2))))
      (K.neg (K.mul (K.mul (cN K 1) (B 0)) (K.mul (cN K (n + 3)) (B (n + 2)))))))
      (K.mul (K.mul (cN K (n + 3)) (A (n + 2))) (K.mul (cN K (n + 2 - (n + 2) + 1)) (A (n + 2 - (n + 2))))) = _
  rw [e01, e0, hAB 0 (Nat.zero_le _), e2]
  lib_ring

/-- the weight sum Σ_{k} (i+k+1)(d−k+1) B_{i+k} B_{d−k}, written without subtraction -/
def aux (g : Nat → Nat → R) : Nat → Nat → R
  | i, 0 => g i 0
  | i, d + 1 => K.add (g i (d + 1)) (aux g (i + 1) d)

theorem sumS_shift (h : Nat → R) : ∀ d, sumS K h (d + 1) = K.add (h 0) (sumS K (fun k => h (k + 1)) d)
  | 0 => rfl
  | d + 1 => by
    show K.add (sumS K h (d + 1)) (h (d + 1 + 1)) = K.add (h 0) (K.add (sumS K (fun k => h (k + 1)) d) (h (d + 1 + 1)))
    rw [sumS_shift h d]; lib_ring

theorem aux_rev (g : Nat → Nat → R) : ∀ d i, aux K g i d = sumS K (fun k => g (k + i) (d - k)) d
  | 0, i => by
    show g i 0 = g (0 + i) (0 - 0)
    rw [Nat.zero_add]
  | d + 1, i => by
    show K.add (g i (d + 1)) (aux K g (i + 1) d) = _
    rw [aux_rev g d (i + 1), sumS_shift K _ d]
    show _ = K.add (g (0 + i) (d + 1 - 0)) _
    rw [Nat.zero_add]
    have c := sumS_congr K (fun k => g (k + (i + 1)) (d - k)) (fun k => g (k + 1 + i) (d + 1 - (k + 1))) d
      (fun k _ => by
        show g (k + (i + 1)) (d - k) = g (k + 1 + i) (d + 1 - (k + 1))
        have e1 : k + 1 + i = k + (i + 1) := by lib_nat
        rw [e1, Nat.succ_sub_succ d k])
    rw [c]; rfl

theorem term_diff (A B : Nat → R) (n : Nat) (hAB : ∀ j, j ≤ n + 1 → A j = B j) (κ : R) (i d : Nat)
    (hid : i + d = n) :
    term K A κ i d = K.add (term K B κ i d)
      (K.neg (K.mul (K.mul κ (K.mul (B 0) (K.add (A (n + 2)) (K.neg (B (n + 2))))))
        (K.mul (K.mul (cN K (i + 1)) (B i)) (K.mul (cN K (d + 1)) (B d))))) := by
  have e : i + d + 2 = n + 2 := by rw [hid]
  have hid1 : i + d + 1 ≤ n + 1 := Nat.le_of_eq (by rw [hid])
  have hi1 : i + 1 ≤ n + 1 := Nat.succ_le_succ (hid ▸ Nat.le_add_right i d)
  have hi : i ≤ n + 1 := Nat.le_trans (Nat.le_succ i) hi1
  have hd : d ≤ n + 1 := Nat.le_trans (hid ▸ Nat.le_add_left d i) (Nat.le_succ n)
  unfold term
  rw [e, hAB (i + 1) hi1, hAB (i + d + 1) hid1, hAB i hi, hAB 0 (Nat.zero_le _), hAB d hd]
  lib_ring

theorem pAux_diff (A B : Nat → R) (n : Nat) (hAB : ∀ j, j ≤ n + 1 → A j = B j) (κ : R) :
    ∀ d i, i + d = n → pAux K A κ i d = K.add (pAux K B κ i d)
      (K.neg (K.mul (K.mul κ (K.mul (B 0) (K.add (A (n + 2)) (K.neg (B (n + 2))))))
        (aux K (fun k e => K.mul (K.mul (cN K (k + 1)) (B k)) (K.mul (cN K (e + 1)) (B e))) i d)))
  | 0, i, hid => term_diff K A B n hAB κ i 0 hid
  | d + 1, i, hid => by
    have hid' : i + 1 + d = n := by rw [← hid]; lib_nat
    show K.add (term K A κ i (d + 1)) (pAux K A κ (i + 1) d) = K.add (K.add (term K B κ i (d + 1)) (pAux K B κ (i + 1) d))
      (K.neg (K.mul (K.mul κ (K.mul (B 0) (K.add (A (n + 2)) (K.neg (B (n + 2))))))
        (K.add (K.mul (K.mul (cN K (i + 1)) (B i)) (K.mul (cN K (d + 1 + 1)) (B (d + 1))))
          (aux K (fun k e => K.mul (K.mul (cN K (k + 1)) (B k)) (K.mul (cN K (e + 1)) (B e))) (i + 1) d))))
    rw [term_diff K A B n hAB κ i (d + 1) hid, pAux_diff A B n hAB κ d (i + 1) hid']
    lib_ring

/-- **independence**: the peeled deficit D_{n+1} − P_n does not involve A_{n+2} (nor anything above n+1) -/
theorem peeled_indep (A B : Nat → R) (n : Nat) (hAB : ∀ j, j ≤ n + 1 → A j = B j) :
    peeled K A n = peeled K B n := by
  have r : aux K (fun k e => K.mul (K.mul (cN K (k + 1)) (B k)) (K.mul (cN K (e + 1)) (B e))) 0 n = sq K B n :=
    (aux_rev K _ n 0).trans rfl
  unfold peeled peel
  rw [sq_agree K A B (n + 1) hAB n (Nat.le_succ n), sq_agree K A B (n + 1) hAB (n + 1) (Nat.le_refl _),
    sq_top K A B n hAB, pAux_diff K A B n hAB (kap K n) n 0 (Nat.zero_add n), r,
    SU2CharExp.cN_mul K (wt (n + 1)) (wt (n + 1))]
  unfold kap
  lib_ring

end G61Peel

#print axioms G61Peel.add_nn
#print axioms G61Peel.kap_nn
#print axioms G61Peel.term_nn
#print axioms G61Peel.pAux_nn
#print axioms G61Peel.peel_nn
#print axioms G61Peel.peel_reduce
#print axioms G61Peel.sumS_congr
#print axioms G61Peel.sumS_diff
#print axioms G61Peel.sub_le'
#print axioms G61Peel.sq_agree
#print axioms G61Peel.self_sub
#print axioms G61Peel.sq_top
#print axioms G61Peel.sumS_shift
#print axioms G61Peel.aux_rev
#print axioms G61Peel.term_diff
#print axioms G61Peel.pAux_diff
#print axioms G61Peel.peeled_indep

ym/G61Upto.lean

lean_all/ym/G61Upto.lean

/-
  ym/G61Upto — T45, G61a assembled for 1 ≤ n ≤ 49 (levels 2..50): for A ≥ 0, nonzero on 0..n+2 and adjacent
  log-concave, with X_k = (k+1)A_k and S = X⋆X (Cauchy square, `sq`),
    W_{n+1}² S_n S_{n+2} ≤ W_n W_{n+2} S_{n+1}²,   W_m = C(m+3,3) (`wt`).
  Each level is G61Lv<n+1>.level_fun restated through the uniform definitions. Lean 4 core only, no axioms.
-/
import ym.G61Lv2
import ym.G61Lv3
import ym.G61Lv4
import ym.G61Lv5
import ym.G61Lv6
import ym.G61Lv7
import ym.G61Lv8
import ym.G61Lv9
import ym.G61Lv10
import ym.G61Lv11
import ym.G61Lv12
import ym.G61Lv13
import ym.G61Lv14
import ym.G61Lv15
import ym.G61Lv16
import ym.G61Lv17
import ym.G61Lv18
import ym.G61Lv19
import ym.G61Lv20
import ym.G61Lv21
import ym.G61Lv22
import ym.G61Lv23
import ym.G61Lv24
import ym.G61Lv25
import ym.G61Lv26
import ym.G61Lv27
import ym.G61Lv28
import ym.G61Lv29
import ym.G61Lv30
import ym.G61Lv31
import ym.G61Lv32
import ym.G61Lv33
import ym.G61Lv34
import ym.G61Lv35
import ym.G61Lv36
import ym.G61Lv37
import ym.G61Lv38
import ym.G61Lv39
import ym.G61Lv40
import ym.G61Lv41
import ym.G61Lv42
import ym.G61Lv43
import ym.G61Lv44
import ym.G61Lv45
import ym.G61Lv46
import ym.G61Lv47
import ym.G61Lv48
import ym.G61Lv49
import ym.G61Lv50

namespace G61Upto

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

/-- left-nested sum f 0 + f 1 + ... + f m -/
def sumS (f : Nat → R) : Nat → R
  | 0 => f 0
  | m + 1 => K.add (sumS f m) (f (m + 1))

/-- Cauchy square of X_k = (k+1)A_k at index m -/
def sq (A : Nat → R) (m : Nat) : R :=
  sumS K (fun j => K.mul (K.mul (cN K (j + 1)) (A j)) (K.mul (cN K (m - j + 1)) (A (m - j)))) m

/-- C(m+2,2) -/
def tri : Nat → Nat
  | 0 => 1
  | m + 1 => tri m + (m + 2)

/-- C(m+3,3) -/
def wt : Nat → Nat
  | 0 => 1
  | m + 1 => wt m + tri (m + 1)

/-- the Liggett-type inequality at level n+1 -/
def Stmt (A : Nat → R) (n : Nat) : Prop :=
  O.le (K.mul (cN K (wt (n + 1) * wt (n + 1))) (K.mul (sq K A n) (sq K A (n + 2))))
    (K.mul (cN K (wt n * wt (n + 2))) (K.mul (sq K A (n + 1)) (sq K A (n + 1))))

theorem lv1 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 3 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 1 := by
  have e1 : wt 2 * wt 2 = 100 := rfl
  have e2 : wt 1 * wt 3 = 80 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv2.level_fun K O h1 A hnn hne hlc

theorem lv2 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 4 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 2 := by
  have e1 : wt 3 * wt 3 = 400 := rfl
  have e2 : wt 2 * wt 4 = 350 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv3.level_fun K O h1 A hnn hne hlc

theorem lv3 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 5 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 3 := by
  have e1 : wt 4 * wt 4 = 1225 := rfl
  have e2 : wt 3 * wt 5 = 1120 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv4.level_fun K O h1 A hnn hne hlc

theorem lv4 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 6 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 4 := by
  have e1 : wt 5 * wt 5 = 3136 := rfl
  have e2 : wt 4 * wt 6 = 2940 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv5.level_fun K O h1 A hnn hne hlc

theorem lv5 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 7 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 5 := by
  have e1 : wt 6 * wt 6 = 7056 := rfl
  have e2 : wt 5 * wt 7 = 6720 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv6.level_fun K O h1 A hnn hne hlc

theorem lv6 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 8 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 6 := by
  have e1 : wt 7 * wt 7 = 14400 := rfl
  have e2 : wt 6 * wt 8 = 13860 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv7.level_fun K O h1 A hnn hne hlc

theorem lv7 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 9 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 7 := by
  have e1 : wt 8 * wt 8 = 27225 := rfl
  have e2 : wt 7 * wt 9 = 26400 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv8.level_fun K O h1 A hnn hne hlc

theorem lv8 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 10 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 8 := by
  have e1 : wt 9 * wt 9 = 48400 := rfl
  have e2 : wt 8 * wt 10 = 47190 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv9.level_fun K O h1 A hnn hne hlc

theorem lv9 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 11 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 9 := by
  have e1 : wt 10 * wt 10 = 81796 := rfl
  have e2 : wt 9 * wt 11 = 80080 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv10.level_fun K O h1 A hnn hne hlc

theorem lv10 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 12 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 10 := by
  have e1 : wt 11 * wt 11 = 132496 := rfl
  have e2 : wt 10 * wt 12 = 130130 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv11.level_fun K O h1 A hnn hne hlc

theorem lv11 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 13 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 11 := by
  have e1 : wt 12 * wt 12 = 207025 := rfl
  have e2 : wt 11 * wt 13 = 203840 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv12.level_fun K O h1 A hnn hne hlc

theorem lv12 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 14 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 12 := by
  have e1 : wt 13 * wt 13 = 313600 := rfl
  have e2 : wt 12 * wt 14 = 309400 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv13.level_fun K O h1 A hnn hne hlc

theorem lv13 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 15 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 13 := by
  have e1 : wt 14 * wt 14 = 462400 := rfl
  have e2 : wt 13 * wt 15 = 456960 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv14.level_fun K O h1 A hnn hne hlc

theorem lv14 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 16 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 14 := by
  have e1 : wt 15 * wt 15 = 665856 := rfl
  have e2 : wt 14 * wt 16 = 658920 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv15.level_fun K O h1 A hnn hne hlc

theorem lv15 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 17 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 15 := by
  have e1 : wt 16 * wt 16 = 938961 := rfl
  have e2 : wt 15 * wt 17 = 930240 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv16.level_fun K O h1 A hnn hne hlc

theorem lv16 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 18 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 16 := by
  have e1 : wt 17 * wt 17 = 1299600 := rfl
  have e2 : wt 16 * wt 18 = 1288770 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv17.level_fun K O h1 A hnn hne hlc

theorem lv17 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 19 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 17 := by
  have e1 : wt 18 * wt 18 = 1768900 := rfl
  have e2 : wt 17 * wt 19 = 1755600 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv18.level_fun K O h1 A hnn hne hlc

theorem lv18 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 20 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 18 := by
  have e1 : wt 19 * wt 19 = 2371600 := rfl
  have e2 : wt 18 * wt 20 = 2355430 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv19.level_fun K O h1 A hnn hne hlc

theorem lv19 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 21 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 19 := by
  have e1 : wt 20 * wt 20 = 3136441 := rfl
  have e2 : wt 19 * wt 21 = 3116960 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv20.level_fun K O h1 A hnn hne hlc

theorem lv20 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 22 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 20 := by
  have e1 : wt 21 * wt 21 = 4096576 := rfl
  have e2 : wt 20 * wt 22 = 4073300 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv21.level_fun K O h1 A hnn hne hlc

theorem lv21 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 23 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 21 := by
  have e1 : wt 22 * wt 22 = 5290000 := rfl
  have e2 : wt 21 * wt 23 = 5262400 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv22.level_fun K O h1 A hnn hne hlc

theorem lv22 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 24 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 22 := by
  have e1 : wt 23 * wt 23 = 6760000 := rfl
  have e2 : wt 22 * wt 24 = 6727500 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv23.level_fun K O h1 A hnn hne hlc

theorem lv23 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 25 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 23 := by
  have e1 : wt 24 * wt 24 = 8555625 := rfl
  have e2 : wt 23 * wt 25 = 8517600 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv24.level_fun K O h1 A hnn hne hlc

theorem lv24 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 26 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 24 := by
  have e1 : wt 25 * wt 25 = 10732176 := rfl
  have e2 : wt 24 * wt 26 = 10687950 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv25.level_fun K O h1 A hnn hne hlc

theorem lv25 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 27 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 25 := by
  have e1 : wt 26 * wt 26 = 13351716 := rfl
  have e2 : wt 25 * wt 27 = 13300560 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv26.level_fun K O h1 A hnn hne hlc

theorem lv26 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 28 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 26 := by
  have e1 : wt 27 * wt 27 = 16483600 := rfl
  have e2 : wt 26 * wt 28 = 16424730 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv27.level_fun K O h1 A hnn hne hlc

theorem lv27 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 29 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 27 := by
  have e1 : wt 28 * wt 28 = 20205025 := rfl
  have e2 : wt 27 * wt 29 = 20137600 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv28.level_fun K O h1 A hnn hne hlc

theorem lv28 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 30 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 28 := by
  have e1 : wt 29 * wt 29 = 24601600 := rfl
  have e2 : wt 28 * wt 30 = 24524720 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv29.level_fun K O h1 A hnn hne hlc

theorem lv29 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 31 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 29 := by
  have e1 : wt 30 * wt 30 = 29767936 := rfl
  have e2 : wt 29 * wt 31 = 29680640 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv30.level_fun K O h1 A hnn hne hlc

theorem lv30 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 32 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 30 := by
  have e1 : wt 31 * wt 31 = 35808256 := rfl
  have e2 : wt 30 * wt 32 = 35709520 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv31.level_fun K O h1 A hnn hne hlc

theorem lv31 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 33 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 31 := by
  have e1 : wt 32 * wt 32 = 42837025 := rfl
  have e2 : wt 31 * wt 33 = 42725760 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv32.level_fun K O h1 A hnn hne hlc

theorem lv32 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 34 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 32 := by
  have e1 : wt 33 * wt 33 = 50979600 := rfl
  have e2 : wt 32 * wt 34 = 50854650 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv33.level_fun K O h1 A hnn hne hlc

theorem lv33 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 35 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 33 := by
  have e1 : wt 34 * wt 34 = 60372900 := rfl
  have e2 : wt 33 * wt 35 = 60233040 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv34.level_fun K O h1 A hnn hne hlc

theorem lv34 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 36 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 34 := by
  have e1 : wt 35 * wt 35 = 71166096 := rfl
  have e2 : wt 34 * wt 36 = 71010030 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv35.level_fun K O h1 A hnn hne hlc

theorem lv35 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 37 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 35 := by
  have e1 : wt 36 * wt 36 = 83521321 := rfl
  have e2 : wt 35 * wt 37 = 83347680 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv36.level_fun K O h1 A hnn hne hlc

theorem lv36 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 38 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 36 := by
  have e1 : wt 37 * wt 37 = 97614400 := rfl
  have e2 : wt 36 * wt 38 = 97421740 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv37.level_fun K O h1 A hnn hne hlc

theorem lv37 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 39 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 37 := by
  have e1 : wt 38 * wt 38 = 113635600 := rfl
  have e2 : wt 37 * wt 39 = 113422400 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv38.level_fun K O h1 A hnn hne hlc

theorem lv38 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 40 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 38 := by
  have e1 : wt 39 * wt 39 = 131790400 := rfl
  have e2 : wt 38 * wt 40 = 131555060 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv39.level_fun K O h1 A hnn hne hlc

theorem lv39 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 41 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 39 := by
  have e1 : wt 40 * wt 40 = 152300281 := rfl
  have e2 : wt 39 * wt 41 = 152041120 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv40.level_fun K O h1 A hnn hne hlc

theorem lv40 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 42 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 40 := by
  have e1 : wt 41 * wt 41 = 175403536 := rfl
  have e2 : wt 40 * wt 42 = 175118790 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv41.level_fun K O h1 A hnn hne hlc

theorem lv41 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 43 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 41 := by
  have e1 : wt 42 * wt 42 = 201356100 := rfl
  have e2 : wt 41 * wt 43 = 201043920 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv42.level_fun K O h1 A hnn hne hlc

theorem lv42 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 44 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 42 := by
  have e1 : wt 43 * wt 43 = 230432400 := rfl
  have e2 : wt 42 * wt 44 = 230090850 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv43.level_fun K O h1 A hnn hne hlc

theorem lv43 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 45 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 43 := by
  have e1 : wt 44 * wt 44 = 262926225 := rfl
  have e2 : wt 43 * wt 45 = 262553280 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv44.level_fun K O h1 A hnn hne hlc

theorem lv44 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 46 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 44 := by
  have e1 : wt 45 * wt 45 = 299151616 := rfl
  have e2 : wt 44 * wt 46 = 298745160 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv45.level_fun K O h1 A hnn hne hlc

theorem lv45 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 47 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 45 := by
  have e1 : wt 46 * wt 46 = 339443776 := rfl
  have e2 : wt 45 * wt 47 = 339001600 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv46.level_fun K O h1 A hnn hne hlc

theorem lv46 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 48 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 46 := by
  have e1 : wt 47 * wt 47 = 384160000 := rfl
  have e2 : wt 46 * wt 48 = 383679800 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv47.level_fun K O h1 A hnn hne hlc

theorem lv47 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 49 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 47 := by
  have e1 : wt 48 * wt 48 = 433680625 := rfl
  have e2 : wt 47 * wt 49 = 433160000 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv48.level_fun K O h1 A hnn hne hlc

theorem lv48 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 50 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 48 := by
  have e1 : wt 49 * wt 49 = 488410000 := rfl
  have e2 : wt 48 * wt 50 = 487846450 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv49.level_fun K O h1 A hnn hne hlc

theorem lv49 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i))
    (hne : ∀ i, i ≤ 51 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1)))) : Stmt K O A 49 := by
  have e1 : wt 50 * wt 50 = 548777476 := rfl
  have e2 : wt 49 * wt 51 = 548168400 := rfl
  unfold Stmt
  rw [e1, e2]
  exact G61Lv50.level_fun K O h1 A hnn hne hlc

theorem up1 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 1) : Stmt K O A n := by
  have e : n = 1 := Nat.le_antisymm hn hn0
  subst e
  exact lv1 K O h1 A hnn hne hlc

theorem up2 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 2) : Stmt K O A n := by
  cases Nat.lt_or_ge n 2 with
  | inl h => exact up1 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 2 := Nat.le_antisymm hn h
    subst e
    exact lv2 K O h1 A hnn hne hlc

theorem up3 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 3) : Stmt K O A n := by
  cases Nat.lt_or_ge n 3 with
  | inl h => exact up2 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 3 := Nat.le_antisymm hn h
    subst e
    exact lv3 K O h1 A hnn hne hlc

theorem up4 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 4) : Stmt K O A n := by
  cases Nat.lt_or_ge n 4 with
  | inl h => exact up3 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 4 := Nat.le_antisymm hn h
    subst e
    exact lv4 K O h1 A hnn hne hlc

theorem up5 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 5) : Stmt K O A n := by
  cases Nat.lt_or_ge n 5 with
  | inl h => exact up4 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 5 := Nat.le_antisymm hn h
    subst e
    exact lv5 K O h1 A hnn hne hlc

theorem up6 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 6) : Stmt K O A n := by
  cases Nat.lt_or_ge n 6 with
  | inl h => exact up5 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 6 := Nat.le_antisymm hn h
    subst e
    exact lv6 K O h1 A hnn hne hlc

theorem up7 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 7) : Stmt K O A n := by
  cases Nat.lt_or_ge n 7 with
  | inl h => exact up6 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 7 := Nat.le_antisymm hn h
    subst e
    exact lv7 K O h1 A hnn hne hlc

theorem up8 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 8) : Stmt K O A n := by
  cases Nat.lt_or_ge n 8 with
  | inl h => exact up7 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 8 := Nat.le_antisymm hn h
    subst e
    exact lv8 K O h1 A hnn hne hlc

theorem up9 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 9) : Stmt K O A n := by
  cases Nat.lt_or_ge n 9 with
  | inl h => exact up8 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 9 := Nat.le_antisymm hn h
    subst e
    exact lv9 K O h1 A hnn hne hlc

theorem up10 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 10) : Stmt K O A n := by
  cases Nat.lt_or_ge n 10 with
  | inl h => exact up9 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 10 := Nat.le_antisymm hn h
    subst e
    exact lv10 K O h1 A hnn hne hlc

theorem up11 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 11) : Stmt K O A n := by
  cases Nat.lt_or_ge n 11 with
  | inl h => exact up10 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 11 := Nat.le_antisymm hn h
    subst e
    exact lv11 K O h1 A hnn hne hlc

theorem up12 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 12) : Stmt K O A n := by
  cases Nat.lt_or_ge n 12 with
  | inl h => exact up11 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 12 := Nat.le_antisymm hn h
    subst e
    exact lv12 K O h1 A hnn hne hlc

theorem up13 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 13) : Stmt K O A n := by
  cases Nat.lt_or_ge n 13 with
  | inl h => exact up12 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 13 := Nat.le_antisymm hn h
    subst e
    exact lv13 K O h1 A hnn hne hlc

theorem up14 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 14) : Stmt K O A n := by
  cases Nat.lt_or_ge n 14 with
  | inl h => exact up13 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 14 := Nat.le_antisymm hn h
    subst e
    exact lv14 K O h1 A hnn hne hlc

theorem up15 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 15) : Stmt K O A n := by
  cases Nat.lt_or_ge n 15 with
  | inl h => exact up14 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 15 := Nat.le_antisymm hn h
    subst e
    exact lv15 K O h1 A hnn hne hlc

theorem up16 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 16) : Stmt K O A n := by
  cases Nat.lt_or_ge n 16 with
  | inl h => exact up15 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 16 := Nat.le_antisymm hn h
    subst e
    exact lv16 K O h1 A hnn hne hlc

theorem up17 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 17) : Stmt K O A n := by
  cases Nat.lt_or_ge n 17 with
  | inl h => exact up16 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 17 := Nat.le_antisymm hn h
    subst e
    exact lv17 K O h1 A hnn hne hlc

theorem up18 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 18) : Stmt K O A n := by
  cases Nat.lt_or_ge n 18 with
  | inl h => exact up17 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 18 := Nat.le_antisymm hn h
    subst e
    exact lv18 K O h1 A hnn hne hlc

theorem up19 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 19) : Stmt K O A n := by
  cases Nat.lt_or_ge n 19 with
  | inl h => exact up18 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 19 := Nat.le_antisymm hn h
    subst e
    exact lv19 K O h1 A hnn hne hlc

theorem up20 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 20) : Stmt K O A n := by
  cases Nat.lt_or_ge n 20 with
  | inl h => exact up19 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 20 := Nat.le_antisymm hn h
    subst e
    exact lv20 K O h1 A hnn hne hlc

theorem up21 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 21) : Stmt K O A n := by
  cases Nat.lt_or_ge n 21 with
  | inl h => exact up20 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 21 := Nat.le_antisymm hn h
    subst e
    exact lv21 K O h1 A hnn hne hlc

theorem up22 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 22) : Stmt K O A n := by
  cases Nat.lt_or_ge n 22 with
  | inl h => exact up21 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 22 := Nat.le_antisymm hn h
    subst e
    exact lv22 K O h1 A hnn hne hlc

theorem up23 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 23) : Stmt K O A n := by
  cases Nat.lt_or_ge n 23 with
  | inl h => exact up22 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 23 := Nat.le_antisymm hn h
    subst e
    exact lv23 K O h1 A hnn hne hlc

theorem up24 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 24) : Stmt K O A n := by
  cases Nat.lt_or_ge n 24 with
  | inl h => exact up23 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 24 := Nat.le_antisymm hn h
    subst e
    exact lv24 K O h1 A hnn hne hlc

theorem up25 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 25) : Stmt K O A n := by
  cases Nat.lt_or_ge n 25 with
  | inl h => exact up24 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 25 := Nat.le_antisymm hn h
    subst e
    exact lv25 K O h1 A hnn hne hlc

theorem up26 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 26) : Stmt K O A n := by
  cases Nat.lt_or_ge n 26 with
  | inl h => exact up25 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 26 := Nat.le_antisymm hn h
    subst e
    exact lv26 K O h1 A hnn hne hlc

theorem up27 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 27) : Stmt K O A n := by
  cases Nat.lt_or_ge n 27 with
  | inl h => exact up26 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 27 := Nat.le_antisymm hn h
    subst e
    exact lv27 K O h1 A hnn hne hlc

theorem up28 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 28) : Stmt K O A n := by
  cases Nat.lt_or_ge n 28 with
  | inl h => exact up27 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 28 := Nat.le_antisymm hn h
    subst e
    exact lv28 K O h1 A hnn hne hlc

theorem up29 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 29) : Stmt K O A n := by
  cases Nat.lt_or_ge n 29 with
  | inl h => exact up28 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 29 := Nat.le_antisymm hn h
    subst e
    exact lv29 K O h1 A hnn hne hlc

theorem up30 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 30) : Stmt K O A n := by
  cases Nat.lt_or_ge n 30 with
  | inl h => exact up29 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 30 := Nat.le_antisymm hn h
    subst e
    exact lv30 K O h1 A hnn hne hlc

theorem up31 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 31) : Stmt K O A n := by
  cases Nat.lt_or_ge n 31 with
  | inl h => exact up30 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 31 := Nat.le_antisymm hn h
    subst e
    exact lv31 K O h1 A hnn hne hlc

theorem up32 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 32) : Stmt K O A n := by
  cases Nat.lt_or_ge n 32 with
  | inl h => exact up31 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 32 := Nat.le_antisymm hn h
    subst e
    exact lv32 K O h1 A hnn hne hlc

theorem up33 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 33) : Stmt K O A n := by
  cases Nat.lt_or_ge n 33 with
  | inl h => exact up32 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 33 := Nat.le_antisymm hn h
    subst e
    exact lv33 K O h1 A hnn hne hlc

theorem up34 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 34) : Stmt K O A n := by
  cases Nat.lt_or_ge n 34 with
  | inl h => exact up33 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 34 := Nat.le_antisymm hn h
    subst e
    exact lv34 K O h1 A hnn hne hlc

theorem up35 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 35) : Stmt K O A n := by
  cases Nat.lt_or_ge n 35 with
  | inl h => exact up34 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 35 := Nat.le_antisymm hn h
    subst e
    exact lv35 K O h1 A hnn hne hlc

theorem up36 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 36) : Stmt K O A n := by
  cases Nat.lt_or_ge n 36 with
  | inl h => exact up35 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 36 := Nat.le_antisymm hn h
    subst e
    exact lv36 K O h1 A hnn hne hlc

theorem up37 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 37) : Stmt K O A n := by
  cases Nat.lt_or_ge n 37 with
  | inl h => exact up36 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 37 := Nat.le_antisymm hn h
    subst e
    exact lv37 K O h1 A hnn hne hlc

theorem up38 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 38) : Stmt K O A n := by
  cases Nat.lt_or_ge n 38 with
  | inl h => exact up37 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 38 := Nat.le_antisymm hn h
    subst e
    exact lv38 K O h1 A hnn hne hlc

theorem up39 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 39) : Stmt K O A n := by
  cases Nat.lt_or_ge n 39 with
  | inl h => exact up38 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 39 := Nat.le_antisymm hn h
    subst e
    exact lv39 K O h1 A hnn hne hlc

theorem up40 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 40) : Stmt K O A n := by
  cases Nat.lt_or_ge n 40 with
  | inl h => exact up39 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 40 := Nat.le_antisymm hn h
    subst e
    exact lv40 K O h1 A hnn hne hlc

theorem up41 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 41) : Stmt K O A n := by
  cases Nat.lt_or_ge n 41 with
  | inl h => exact up40 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 41 := Nat.le_antisymm hn h
    subst e
    exact lv41 K O h1 A hnn hne hlc

theorem up42 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 42) : Stmt K O A n := by
  cases Nat.lt_or_ge n 42 with
  | inl h => exact up41 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 42 := Nat.le_antisymm hn h
    subst e
    exact lv42 K O h1 A hnn hne hlc

theorem up43 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 43) : Stmt K O A n := by
  cases Nat.lt_or_ge n 43 with
  | inl h => exact up42 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 43 := Nat.le_antisymm hn h
    subst e
    exact lv43 K O h1 A hnn hne hlc

theorem up44 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 44) : Stmt K O A n := by
  cases Nat.lt_or_ge n 44 with
  | inl h => exact up43 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 44 := Nat.le_antisymm hn h
    subst e
    exact lv44 K O h1 A hnn hne hlc

theorem up45 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 45) : Stmt K O A n := by
  cases Nat.lt_or_ge n 45 with
  | inl h => exact up44 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 45 := Nat.le_antisymm hn h
    subst e
    exact lv45 K O h1 A hnn hne hlc

theorem up46 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 46) : Stmt K O A n := by
  cases Nat.lt_or_ge n 46 with
  | inl h => exact up45 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 46 := Nat.le_antisymm hn h
    subst e
    exact lv46 K O h1 A hnn hne hlc

theorem up47 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 47) : Stmt K O A n := by
  cases Nat.lt_or_ge n 47 with
  | inl h => exact up46 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 47 := Nat.le_antisymm hn h
    subst e
    exact lv47 K O h1 A hnn hne hlc

theorem up48 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 48) : Stmt K O A n := by
  cases Nat.lt_or_ge n 48 with
  | inl h => exact up47 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 48 := Nat.le_antisymm hn h
    subst e
    exact lv48 K O h1 A hnn hne hlc

theorem up49 (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 49) : Stmt K O A n := by
  cases Nat.lt_or_ge n 49 with
  | inl h => exact up48 K O h1 A hnn n hne hlc hn0 (Nat.le_of_lt_succ h)
  | inr h =>
    have e : n = 49 := Nat.le_antisymm hn h
    subst e
    exact lv49 K O h1 A hnn hne hlc

/-- **G61a for 1 ≤ n ≤ 49**: W_{n+1}² S_n S_{n+2} ≤ W_n W_{n+2} S_{n+1}². -/
theorem upto (h1 : O.le K.zero K.one) (A : Nat → R) (hnn : ∀ i, O.le K.zero (A i)) (n : Nat)
    (hne : ∀ i, i ≤ n + 2 → A i ≠ K.zero)
    (hlc : ∀ k, O.le (K.mul (A k) (A (k + 2))) (K.mul (A (k + 1)) (A (k + 1))))
    (hn0 : 1 ≤ n) (hn : n ≤ 49) : Stmt K O A n :=
  up49 K O h1 A hnn n hne hlc hn0 hn

end G61Upto

#print axioms G61Upto.lv1
#print axioms G61Upto.lv2
#print axioms G61Upto.lv3
#print axioms G61Upto.lv4
#print axioms G61Upto.lv5
#print axioms G61Upto.lv6
#print axioms G61Upto.lv7
#print axioms G61Upto.lv8
#print axioms G61Upto.lv9
#print axioms G61Upto.lv10
#print axioms G61Upto.lv11
#print axioms G61Upto.lv12
#print axioms G61Upto.lv13
#print axioms G61Upto.lv14
#print axioms G61Upto.lv15
#print axioms G61Upto.lv16
#print axioms G61Upto.lv17
#print axioms G61Upto.lv18
#print axioms G61Upto.lv19
#print axioms G61Upto.lv20
#print axioms G61Upto.lv21
#print axioms G61Upto.lv22
#print axioms G61Upto.lv23
#print axioms G61Upto.lv24
#print axioms G61Upto.lv25
#print axioms G61Upto.lv26
#print axioms G61Upto.lv27
#print axioms G61Upto.lv28
#print axioms G61Upto.lv29
#print axioms G61Upto.lv30
#print axioms G61Upto.lv31
#print axioms G61Upto.lv32
#print axioms G61Upto.lv33
#print axioms G61Upto.lv34
#print axioms G61Upto.lv35
#print axioms G61Upto.lv36
#print axioms G61Upto.lv37
#print axioms G61Upto.lv38
#print axioms G61Upto.lv39
#print axioms G61Upto.lv40
#print axioms G61Upto.lv41
#print axioms G61Upto.lv42
#print axioms G61Upto.lv43
#print axioms G61Upto.lv44
#print axioms G61Upto.lv45
#print axioms G61Upto.lv46
#print axioms G61Upto.lv47
#print axioms G61Upto.lv48
#print axioms G61Upto.lv49
#print axioms G61Upto.up1
#print axioms G61Upto.up2
#print axioms G61Upto.up3
#print axioms G61Upto.up4
#print axioms G61Upto.up5
#print axioms G61Upto.up6
#print axioms G61Upto.up7
#print axioms G61Upto.up8
#print axioms G61Upto.up9
#print axioms G61Upto.up10
#print axioms G61Upto.up11
#print axioms G61Upto.up12
#print axioms G61Upto.up13
#print axioms G61Upto.up14
#print axioms G61Upto.up15
#print axioms G61Upto.up16
#print axioms G61Upto.up17
#print axioms G61Upto.up18
#print axioms G61Upto.up19
#print axioms G61Upto.up20
#print axioms G61Upto.up21
#print axioms G61Upto.up22
#print axioms G61Upto.up23
#print axioms G61Upto.up24
#print axioms G61Upto.up25
#print axioms G61Upto.up26
#print axioms G61Upto.up27
#print axioms G61Upto.up28
#print axioms G61Upto.up29
#print axioms G61Upto.up30
#print axioms G61Upto.up31
#print axioms G61Upto.up32
#print axioms G61Upto.up33
#print axioms G61Upto.up34
#print axioms G61Upto.up35
#print axioms G61Upto.up36
#print axioms G61Upto.up37
#print axioms G61Upto.up38
#print axioms G61Upto.up39
#print axioms G61Upto.up40
#print axioms G61Upto.up41
#print axioms G61Upto.up42
#print axioms G61Upto.up43
#print axioms G61Upto.up44
#print axioms G61Upto.up45
#print axioms G61Upto.up46
#print axioms G61Upto.up47
#print axioms G61Upto.up48
#print axioms G61Upto.up49
#print axioms G61Upto.upto

ym/GBounds.lean

lean_all/ym/GBounds.lean

/-
  ym/GBounds — T27, cycle 86 (correlation decay, step 7): bounds on surface sums.
    G_le        G_n(P) ≤ G_0(P)  (|⟨W⟩| ≤ 1; vectors of length L, 0 ≤ t ≤ 1)
    G_grow      G_n(P) ≤ G_n(Q ++ P)
    G0_sub      G_0(selP P A) ≤ G_0(P)
    len_offv    |offv s q| = |q|
  Lean 4 core only, proofs by hand, no axioms.
-/
import ym.OffPart

namespace GBounds

open YMChain LinkIntegral GKS StrongZ2 MaskRestr MonoSub PermTools OffPart S2cFinal

theorem len_offv : ∀ (s q : List Nat), (offv s q).length = q.length
  | _, [] => by cases ‹List Nat› <;> rfl
  | [], _ :: q => congrArg Nat.succ (len_offv [] q)
  | _ :: s, _ :: q => congrArg Nat.succ (len_offv s q)

section Main
variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem G_le (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero) (t : R) (ht0 : O.le K.zero t) (ht1 : O.le t K.one) (L : Nat)
    (n : List Nat) (hn : n.length = L) (P : List (List Nat)) (hP : ∀ q, memL q P → q.length = L) :
    O.le (G K t n P) (G K t (zl L) P) := by
  have w := WilsonBound.wilson_le_one K O h1 t ht0 ht1 L n P
  have e1 := N_eq K t P n (fun q hq => (hP q hq).trans hn.symm)
  have e2 := N_eq K t P (zl L) (fun q hq => (hP q hq).trans (len_zl L).symm)
  rw [hn] at e1
  rw [len_zl] at e2
  rw [e1, e2, K.mul_comm _ (G K t n P), K.mul_comm _ (G K t (zl L) P)] at w
  exact O.pos_cancel _ _ _ (two_pow_nn K O h1 L) (two_pow_ne K O h1 h10 L) w

theorem G_grow (h1 : O.le K.zero K.one) (t : R) (ht : O.le K.zero t) (P : List (List Nat)) :
    ∀ (Q : List (List Nat)) (n : List Nat), O.le (G K t n P) (G K t n (Q ++ P))
  | [], _ => O.le_refl _
  | q :: Q, n => by
    show O.le (G K t n P) (K.add (G K t n (Q ++ P)) (K.mul t (G K t (zadd n q) (Q ++ P))))
    have a := G_grow h1 t ht P Q n
    have b := O.mul_nonneg _ _ ht (G_nn K O h1 t ht (Q ++ P) (zadd n q))
    have c := O.add_le_add _ _ _ _ a b
    rw [DetChain.add_zero' K] at c
    exact c

theorem G0_sub (h1 : O.le K.zero K.one) (t : R) (ht : O.le K.zero t) (P : List (List Nat)) (A : List Bool)
    (hA : P.length = A.length) (n : List Nat) : O.le (G K t n (selP P A)) (G K t n P) := by
  rw [GPerm.G_perm K t P _ (perm_sel P A hA) n]
  exact G_grow K O h1 t ht _ _ n

end Main

end GBounds

#print axioms GBounds.len_offv
#print axioms GBounds.G_le
#print axioms GBounds.G_grow
#print axioms GBounds.G0_sub

ym/GKS.lean

lean_all/ym/GKS.lean

/-
  ym/GKS — T45, cycle 14: the first Griffiths inequality for ℤ₂ lattice gauge theory, any dimension.

  Link fields are Bool lists c of length L (u_l = ±1). A monomial is given by an exponent list n (one
  exponent per link): mono c n = Π_l u_l^(n_l). A plaquette p is the monomial with exponent 1 on its four
  links (or any 0/1 list); the plaquette weight is a + b U_p (e^{βU} = cosh β + sinh β U, a, b ≥ 0).
    mono_mul       mono c n · mono c m = mono c (n + m)
    link_int_nn    Σ_c mono c n = Π_l (1 + (−1)^(n_l)) ≥ 0
    gks1           Σ_c mono c n · Π_{q ∈ P} (a + b · mono c q) ≥ 0  for a, b ≥ 0
  With n the loop's link set: ⟨W(C)⟩ ≥ 0 for every loop, every lattice, every β ≥ 0 (GKS I).

  Lean 4 core only, proofs by hand, no axioms.
-/
import ym.LinkIntegral

namespace GKS

open YMChain LinkIntegral

variable {R : Type} (K : DetChain.CRing R)

def fsOf (n : List Nat) : List (Bool → R) := n.map (fun k b => pwR K (sgn K b) k)

def mono (n : List Nat) (c : List Bool) : R := prodF K (fsOf K n) c

def zadd : List Nat → List Nat → List Nat
  | [], m => m
  | n, [] => n
  | a :: n, b :: m => (a + b) :: zadd n m

theorem pwR_add (x : R) (a : Nat) : ∀ b, pwR K x (a + b) = K.mul (pwR K x a) (pwR K x b)
  | 0 => by show pwR K x a = K.mul (pwR K x a) K.one; rw [K.mul_comm, K.one_mul]
  | b + 1 => by
    show K.mul (pwR K x (a + b)) x = K.mul (pwR K x a) (K.mul (pwR K x b) x)
    rw [pwR_add x a b, K.mul_assoc]

theorem mono_mul : ∀ (n m : List Nat) (c : List Bool), n.length = m.length →
    K.mul (mono K n c) (mono K m c) = mono K (zadd n m) c
  | [], [], _, _ => K.one_mul K.one
  | a :: n, b :: m, [], _ => K.one_mul K.one
  | a :: n, b :: m, x :: c, h => by
    show K.mul (K.mul (pwR K (sgn K x) a) (mono K n c)) (K.mul (pwR K (sgn K x) b) (mono K m c))
      = K.mul (pwR K (sgn K x) (a + b)) (mono K (zadd n m) c)
    rw [← mono_mul n m c (Nat.succ.inj h), pwR_add, K.mul_assoc, ← K.mul_assoc (mono K n c),
      K.mul_comm (mono K n c) (pwR K (sgn K x) b), K.mul_assoc, ← K.mul_assoc]
  | [], _ :: _, _, h => absurd h (Nat.noConfusion)
  | _ :: _, [], _, h => absurd h (Nat.noConfusion)

variable (O : ORing K)

theorem sgn_pow_nn (h1 : O.le K.zero K.one) : ∀ k, O.le K.zero (K.add (pwR K (sgn K true) k) (pwR K (sgn K false) k))
  | k => by
    -- (−1)^k is 1 or −1; the sum is 2 or 0
    have par : ∀ k, pwR K (K.neg K.one) k = K.one ∨ pwR K (K.neg K.one) k = K.neg K.one := by
      intro k
      induction k with
      | zero => exact Or.inl rfl
      | succ k ih =>
        cases ih with
        | inl h => exact Or.inr (by show K.mul _ _ = _; rw [h, K.one_mul])
        | inr h => exact Or.inl (by show K.mul _ _ = _; rw [h, negone_sq])
    show O.le K.zero (K.add (pwR K K.one k) (pwR K (K.neg K.one) k))
    rw [pw_one']
    cases par k with
    | inl h => rw [h]; have := O.add_le_add _ _ _ _ h1 h1; rw [K.zero_add] at this; exact this
    | inr h => rw [h, K.add_neg]; exact O.le_refl _

theorem prodSum_nn (h1 : O.le K.zero K.one) : ∀ n : List Nat, O.le K.zero (prodSum K (fsOf K n))
  | [] => h1
  | k :: n => O.mul_nonneg _ _ (sgn_pow_nn K O h1 k) (prodSum_nn h1 n)

theorem len_fsOf (n : List Nat) : (fsOf K n).length = n.length := by
  induction n with
  | nil => rfl
  | cons _ n ih => exact congrArg Nat.succ ih

/-- **Link integrals of monomials are nonnegative.** -/
theorem link_int_nn (h1 : O.le K.zero K.one) (n : List Nat) :
    O.le K.zero (sumK K (mono K n) (bools n.length)) := by
  have e : sumK K (mono K n) (bools n.length) = prodSum K (fsOf K n) := by
    rw [← sum_prod_factor K (fsOf K n), len_fsOf]; rfl
  rw [e]; exact prodSum_nn K O h1 n

/-- `Π_{q ∈ P} (a + b · U_q)`. -/
def prodQ (a b : R) : List (List Nat) → List Bool → R
  | [], _ => K.one
  | q :: P, c => K.mul (K.add a (K.mul b (mono K q c))) (prodQ a b P c)

theorem len_zadd (L : Nat) : ∀ (n q : List Nat), n.length = L → q.length = L → (zadd n q).length = L
  | [], _, h1, h2 => h2
  | _ :: _, [], h1, _ => h1
  | _ :: n, _ :: q, h1, h2 => by
    cases L with
    | zero => exact absurd h1 Nat.noConfusion
    | succ L => exact congrArg Nat.succ (len_zadd L n q (Nat.succ.inj h1) (Nat.succ.inj h2))

omit O in
theorem zero_add_le' (O : ORing K) {x y : R} (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy; rw [K.zero_add] at this; exact this

/-- **GKS I.** -/
theorem gks1 (h1 : O.le K.zero K.one) (a b : R) (ha : O.le K.zero a) (hb : O.le K.zero b) (L : Nat) :
    ∀ (P : List (List Nat)) (n : List Nat), n.length = L → (∀ q, memL q P → q.length = L) →
    O.le K.zero (sumK K (fun c => K.mul (mono K n c) (prodQ K a b P c)) (bools L))
  | [], n, hn, _ => by
    have := link_int_nn K O h1 n
    rw [hn] at this
    exact (sumK_ext K _ _ (fun c => (by show mono K n c = K.mul (mono K n c) K.one; rw [K.mul_comm, K.one_mul])) _) ▸ this
  | q :: P, n, hn, hP => by
    have hq : q.length = L := hP q (Or.inl rfl)
    have split : ∀ c, K.mul (mono K n c) (prodQ K a b (q :: P) c)
        = K.add (K.mul a (K.mul (mono K n c) (prodQ K a b P c))) (K.mul b (K.mul (mono K (zadd n q) c) (prodQ K a b P c))) := fun c => by
      show K.mul (mono K n c) (K.mul (K.add a (K.mul b (mono K q c))) (prodQ K a b P c)) = _
      rw [← mono_mul K n q c (hn.trans hq.symm), DetChain.right_distrib, K.distrib]
      rw [← K.mul_assoc (mono K n c) a, K.mul_comm (mono K n c) a, K.mul_assoc a]
      rw [← K.mul_assoc (mono K n c) (K.mul b (mono K q c)), ← K.mul_assoc (mono K n c) b (mono K q c),
        K.mul_comm (mono K n c) b, K.mul_assoc b (mono K n c) (mono K q c), K.mul_assoc b]
    rw [sumK_ext K _ _ split, sumK_add, ← mul_sumK, ← mul_sumK]
    have hz : (zadd n q).length = L := len_zadd L n q hn hq
    exact zero_add_le' K O (O.mul_nonneg _ _ ha (gks1 h1 a b ha hb L P n hn (fun r hr => hP r (Or.inr hr))))
      (O.mul_nonneg _ _ hb (gks1 h1 a b ha hb L P (zadd n q) hz (fun r hr => hP r (Or.inr hr))))

/-- Per-plaquette coefficients: `Π_{(q, a, b) ∈ P} (a + b · U_q)`. -/
def prodQ' : List (List Nat × R × R) → List Bool → R
  | [], _ => K.one
  | (q, a, b) :: P, c => K.mul (K.add a (K.mul b (mono K q c))) (prodQ' P c)

/-- **GKS I with plaquette-dependent nonnegative coefficients.** -/
theorem gks1' (h1 : O.le K.zero K.one) (L : Nat) :
    ∀ (P : List (List Nat × R × R)) (n : List Nat), n.length = L →
    (∀ t, memL t P → t.1.length = L ∧ O.le K.zero t.2.1 ∧ O.le K.zero t.2.2) →
    O.le K.zero (sumK K (fun c => K.mul (mono K n c) (prodQ' K P c)) (bools L))
  | [], n, hn, _ => by
    have := link_int_nn K O h1 n
    rw [hn] at this
    exact (sumK_ext K _ _ (fun c => (by show mono K n c = K.mul (mono K n c) K.one; rw [K.mul_comm, K.one_mul])) _) ▸ this
  | (q, a, b) :: P, n, hn, hP => by
    obtain ⟨hq, ha, hb⟩ := hP (q, a, b) (Or.inl rfl)
    have split : ∀ c, K.mul (mono K n c) (prodQ' K ((q, a, b) :: P) c)
        = K.add (K.mul a (K.mul (mono K n c) (prodQ' K P c))) (K.mul b (K.mul (mono K (zadd n q) c) (prodQ' K P c))) := fun c => by
      show K.mul (mono K n c) (K.mul (K.add a (K.mul b (mono K q c))) (prodQ' K P c)) = _
      rw [← mono_mul K n q c (hn.trans hq.symm), DetChain.right_distrib, K.distrib]
      rw [← K.mul_assoc (mono K n c) a, K.mul_comm (mono K n c) a, K.mul_assoc a]
      rw [← K.mul_assoc (mono K n c) (K.mul b (mono K q c)), ← K.mul_assoc (mono K n c) b (mono K q c),
        K.mul_comm (mono K n c) b, K.mul_assoc b (mono K n c) (mono K q c), K.mul_assoc b]
    rw [sumK_ext K _ _ split, sumK_add, ← mul_sumK, ← mul_sumK]
    exact zero_add_le' K O (O.mul_nonneg _ _ ha (gks1' h1 L P n hn (fun t ht => hP t (Or.inr ht))))
      (O.mul_nonneg _ _ hb (gks1' h1 L P (zadd n q) (len_zadd L n q hn hq) (fun t ht => hP t (Or.inr ht))))

omit O in
theorem perm4' (A X Y Z : R) : K.add (K.add A X) (K.add Y Z) = K.add (K.add A Z) (K.add Y X) := by
  rw [K.add_assoc A X, K.add_assoc A Z, K.add_comm Y Z, ← K.add_assoc X Z Y, K.add_comm X Z,
    K.add_assoc Z X Y, K.add_comm X Y]

/-- The doubled plaquette factor: `(a + b U)(a + b U S) = (a² + b² S) + ab (1 + S) U` for `U, S = ±1`,
    and both coefficients are `≥ 0` when `a ≥ b ≥ 0` and `S = ±1`. -/
theorem doubled_factor (a b U S : R) (hU : K.mul U U = K.one) :
    K.mul (K.add a (K.mul b U)) (K.add a (K.mul b (K.mul U S)))
      = K.add (K.add (K.mul a a) (K.mul (K.mul b b) S)) (K.mul (K.mul (K.mul a b) (K.add K.one S)) U) := by
  rw [K.distrib, DetChain.right_distrib, DetChain.right_distrib]
  -- (bU)(b U S) = b² S
  have e1 : K.mul (K.mul b U) (K.mul b (K.mul U S)) = K.mul (K.mul b b) S := by
    rw [K.mul_assoc b U, ← K.mul_assoc U b, K.mul_comm U b, K.mul_assoc b U, ← K.mul_assoc U U S, hU, K.one_mul,
      ← K.mul_assoc]
  rw [e1]
  -- a(b U S) + (bU) a = ab(1 + S) U   (after reordering)
  have e2 : K.add (K.mul a (K.mul b (K.mul U S))) (K.mul (K.mul b U) a) = K.mul (K.mul (K.mul a b) (K.add K.one S)) U := by
    rw [K.distrib (K.mul a b), K.mul_comm (K.mul a b) K.one, K.one_mul, DetChain.right_distrib, K.add_comm]
    rw [K.mul_comm (K.mul b U) a, ← K.mul_assoc a b U]
    congr 1
    rw [← K.mul_assoc a b, K.mul_assoc (K.mul a b) S U, K.mul_comm S U]
  rw [← e2]
  exact perm4' K _ _ _ _

end GKS

#print axioms GKS.pwR_add
#print axioms GKS.mono_mul
#print axioms GKS.sgn_pow_nn
#print axioms GKS.prodSum_nn
#print axioms GKS.len_fsOf
#print axioms GKS.link_int_nn
#print axioms GKS.len_zadd
#print axioms GKS.zero_add_le'
#print axioms GKS.gks1
#print axioms GKS.gks1'
#print axioms GKS.perm4'
#print axioms GKS.doubled_factor

ym/GKS2.lean

lean_all/ym/GKS2.lean

/-
  ym/GKS2 — T45, cycle 16 (towards GKS II for ℤ₂ gauge theory): monomials under the doubling change of variables.

  Link fields c, s (Bool lists); c' = zx s c is the field with u'_l = u_l(s) · u_l(c).
    sgn_bx        sgn (b xor b') = sgn b · sgn b'
    mono_zx       mono n (s ⊙ c) = mono n s · mono n c,  s ⊙ c = zx s (not c)  (lists of equal length)
    mono_sq       mono n s · mono n s = 1
    mono_pm       monomials are ±1;  prodQ'_double: w(c) w(s⊙c) = Π_q [(a² + b² U_q(s)) + ab (1 + U_q(s)) U_q(c)]
    dbl_nn        those coefficients are ≥ 0 when 0 ≤ b ≤ a
    gks2          GKS II: Σ_{c,c'} A(c)B(c') w w' ≤ Σ_{c,c'} A(c)B(c) w w', i.e. ⟨A⟩⟨B⟩ ≤ ⟨AB⟩, any lattice, any dimension
  With ChangeVar2D.sum_xor (Σ_s G (zx s c) = Σ_s G s) the doubled difference is
  Σ_s (1 − W_B(s)) Σ_c W_A W_B(c) Π_q [(a² + b² U_q(s)) + ab (1 + U_q(s)) U_q(c)], a sum of GKS I terms.

  Lean 4 core only, proofs by hand, no axioms.
-/
import ym.GKS
import ym.ChangeVar2D
import BridgeChain

namespace GKS2

open YMChain LinkIntegral GKS ChangeVar2D

variable {R : Type} (K : DetChain.CRing R)

/-- The group law of signs in the Bool encoding (true ↦ +1): `b ⊙ b' = b xor (not b')`. -/
theorem sgn_bx (a b : Bool) : sgn K (bx a (!b)) = K.mul (sgn K a) (sgn K b) := by
  cases a <;> cases b
  · show K.one = K.mul (K.neg K.one) (K.neg K.one)
    rw [negone_sq]
  · show K.neg K.one = K.mul (K.neg K.one) K.one
    rw [K.mul_comm, K.one_mul]
  · show K.neg K.one = K.mul K.one (K.neg K.one)
    rw [K.one_mul]
  · show K.one = K.mul K.one K.one
    rw [K.one_mul]

def notL (c : List Bool) : List Bool := c.map (fun b => !b)

theorem pwR_mul (x y : R) : ∀ k, pwR K (K.mul x y) k = K.mul (pwR K x k) (pwR K y k)
  | 0 => (K.one_mul K.one).symm
  | k + 1 => by
    show K.mul (pwR K (K.mul x y) k) (K.mul x y) = K.mul (K.mul (pwR K x k) x) (K.mul (pwR K y k) y)
    rw [pwR_mul x y k, mul_mid4 K]

theorem mono_zx : ∀ (n : List Nat) (s c : List Bool), s.length = c.length →
    mono K n (zx s (notL c)) = K.mul (mono K n s) (mono K n c)
  | [], _, _, _ => (K.one_mul K.one).symm
  | _ :: _, [], [], _ => (K.one_mul K.one).symm
  | k :: n, a :: s, b :: c, h => by
    show K.mul (pwR K (sgn K (bx a (!b))) k) (mono K n (zx s (notL c)))
      = K.mul (K.mul (pwR K (sgn K a) k) (mono K n s)) (K.mul (pwR K (sgn K b) k) (mono K n c))
    rw [mono_zx n s c (Nat.succ.inj h), sgn_bx, pwR_mul, mul_mid4 K]
  | _ :: _, [], _ :: _, h => absurd h Nat.noConfusion
  | _ :: _, _ :: _, [], h => absurd h Nat.noConfusion

theorem sgn_sq (b : Bool) : K.mul (sgn K b) (sgn K b) = K.one := by
  cases b
  · exact negone_sq K
  · exact K.one_mul K.one

theorem mono_sq : ∀ (n : List Nat) (s : List Bool), K.mul (mono K n s) (mono K n s) = K.one
  | [], _ => K.one_mul K.one
  | _ :: _, [] => K.one_mul K.one
  | k :: n, a :: s => by
    show K.mul (K.mul (pwR K (sgn K a) k) (mono K n s)) (K.mul (pwR K (sgn K a) k) (mono K n s)) = K.one
    rw [mul_mid4 K, ← pwR_mul, sgn_sq, pw_one', mono_sq n s, K.one_mul]

/-- Monomials take the values ±1. -/
theorem mono_pm : ∀ (n : List Nat) (s : List Bool), mono K n s = K.one ∨ mono K n s = K.neg K.one
  | [], _ => Or.inl rfl
  | _ :: _, [] => Or.inl rfl
  | k :: n, a :: s => by
    show K.mul (pwR K (sgn K a) k) (mono K n s) = K.one ∨ K.mul (pwR K (sgn K a) k) (mono K n s) = K.neg K.one
    have hp : pwR K (sgn K a) k = K.one ∨ pwR K (sgn K a) k = K.neg K.one := by
      induction k with
      | zero => exact Or.inl rfl
      | succ k ih =>
        show K.mul (pwR K (sgn K a) k) (sgn K a) = K.one ∨ K.mul (pwR K (sgn K a) k) (sgn K a) = K.neg K.one
        cases a with
        | true => cases ih with
          | inl h => exact Or.inl (by rw [h]; exact K.one_mul K.one)
          | inr h => exact Or.inr (by rw [h]; show K.mul (K.neg K.one) K.one = _; rw [K.mul_comm, K.one_mul])
        | false => cases ih with
          | inl h => exact Or.inr (by rw [h]; exact K.one_mul _)
          | inr h => exact Or.inl (by rw [h]; exact negone_sq K)
    cases hp with
    | inl h => rw [h, K.one_mul]; exact mono_pm n s
    | inr h =>
      rw [h, DetChain.neg_mul_left, K.one_mul]
      cases mono_pm n s with
      | inl h' => exact Or.inr (by rw [h'])
      | inr h' => exact Or.inl (by rw [h', DetChain.neg_neg'])

/-- The doubled plaquette list for a fixed `s`. -/
def dbl (s : List Bool) : List (List Nat × R × R) → List (List Nat × R × R)
  | [] => []
  | (q, a, b) :: P => (q, K.add (K.mul a a) (K.mul (K.mul b b) (mono K q s)),
      K.mul (K.mul a b) (K.add K.one (mono K q s))) :: dbl s P

theorem prodQ'_double (s c : List Bool) (hsc : s.length = c.length) : ∀ P : List (List Nat × R × R),
    K.mul (prodQ' K P c) (prodQ' K P (zx s (notL c))) = prodQ' K (dbl K s P) c
  | [] => K.one_mul K.one
  | (q, a, b) :: P => by
    show K.mul (K.mul (K.add a (K.mul b (mono K q c))) (prodQ' K P c))
        (K.mul (K.add a (K.mul b (mono K q (zx s (notL c))))) (prodQ' K P (zx s (notL c))))
      = K.mul (K.add (K.add (K.mul a a) (K.mul (K.mul b b) (mono K q s)))
          (K.mul (K.mul (K.mul a b) (K.add K.one (mono K q s))) (mono K q c))) (prodQ' K (dbl K s P) c)
    rw [mul_mid4 K, prodQ'_double s c hsc P, mono_zx K q s c hsc, K.mul_comm (mono K q s) (mono K q c),
      doubled_factor K a b (mono K q c) (mono K q s) (mono_sq K q c)]

variable (O : ORing K)

theorem nn_add (x y : R) (hx : O.le K.zero x) (hy : O.le K.zero y) : O.le K.zero (K.add x y) := by
  have := O.add_le_add _ _ _ _ hx hy; rw [K.zero_add] at this; exact this

/-- Coefficients of the doubled list are nonnegative when `0 ≤ b ≤ a`. -/
theorem dbl_nn (h1 : O.le K.zero K.one) (s : List Bool) (L : Nat) : ∀ P : List (List Nat × R × R),
    (∀ t, memL t P → t.1.length = L ∧ O.le K.zero t.2.2 ∧ O.le t.2.2 t.2.1) →
    ∀ t, memL t (dbl K s P) → t.1.length = L ∧ O.le K.zero t.2.1 ∧ O.le K.zero t.2.2
  | [], _, _, h => absurd h (fun z => z)
  | (q, a, b) :: P, hP, t, ht => by
    obtain ⟨hq, hb0, hba0⟩ := hP (q, a, b) (Or.inl rfl)
    have hb : O.le K.zero b := hb0
    have hba : O.le b a := hba0
    have ha : O.le K.zero a := O.le_trans _ _ _ hb hba
    cases ht with
    | inr h' => exact dbl_nn h1 s L P (fun u hu => hP u (Or.inr hu)) t h'
    | inl e =>
      rw [e]
      refine ⟨hq, ?_, ?_⟩
      · show O.le K.zero (K.add (K.mul a a) (K.mul (K.mul b b) (mono K q s)))
        cases mono_pm K q s with
        | inl hS => rw [hS, K.mul_comm (K.mul b b) K.one, K.one_mul]
                    exact nn_add K O _ _ (O.mul_nonneg _ _ ha ha) (O.mul_nonneg _ _ hb hb)
        | inr hS =>
          rw [hS, mul_neg' K, K.mul_comm (K.mul b b) K.one, K.one_mul]
          -- b b ≤ a b ≤ a a
          have h2a : O.le (K.mul b b) (K.mul a b) := O.mul_le_mul_right _ _ b hba hb
          have h2b : O.le (K.mul b a) (K.mul a a) := O.mul_le_mul_right _ _ a hba ha
          rw [K.mul_comm b a] at h2b
          have h2 : O.le (K.mul b b) (K.mul a a) := O.le_trans _ _ _ h2a h2b
          have := O.add_le_add _ _ _ _ h2 (O.le_refl (K.neg (K.mul b b)))
          rw [K.add_neg] at this
          exact this
      · show O.le K.zero (K.mul (K.mul a b) (K.add K.one (mono K q s)))
        cases mono_pm K q s with
        | inl hS => rw [hS]; exact O.mul_nonneg _ _ (O.mul_nonneg _ _ ha hb) (nn_add K O _ _ h1 h1)
        | inr hS => rw [hS, K.add_neg, DetChain.mul_zero]; exact O.le_refl _
where
  mul_neg' (K : DetChain.CRing R) (x y : R) : K.mul x (K.neg y) = K.neg (K.mul x y) := by
    rw [K.mul_comm, DetChain.neg_mul_left, K.mul_comm]

/-- **GKS II.** For plaquette weights `a + b U` with `0 ≤ b ≤ a` and monomials `A`, `B` (exponent lists of length L):
    `Σ_{c,c'} A(c) B(c') w(c) w(c') ≤ Σ_{c,c'} A(c) B(c) w(c) w(c')`, i.e. `⟨A⟩⟨B⟩ ≤ ⟨A B⟩`. -/
theorem gks2 (h1 : O.le K.zero K.one) (L : Nat) (P : List (List Nat × R × R))
    (hP : ∀ t, memL t P → t.1.length = L ∧ O.le K.zero t.2.2 ∧ O.le t.2.2 t.2.1)
    (nA nB : List Nat) (hA : nA.length = L) (hB : nB.length = L) :
    O.le (sumK K (fun c => sumK K (fun c' => K.mul (K.mul (mono K nA c) (mono K nB c'))
            (K.mul (prodQ' K P c) (prodQ' K P c'))) (bools L)) (bools L))
         (sumK K (fun c => sumK K (fun c' => K.mul (K.mul (mono K nA c) (mono K nB c))
            (K.mul (prodQ' K P c) (prodQ' K P c'))) (bools L)) (bools L)) := by
  -- Z c s = A(c)B(c) (1 − B(s)) w(c) w(s⊙c)
  let Z : List Bool → List Bool → R := fun c s => K.mul (K.mul (K.mul (mono K nA c) (mono K nB c))
      (K.add K.one (K.neg (mono K nB s)))) (K.mul (prodQ' K P c) (prodQ' K P (zx s (notL c))))
  have hlen : ∀ c, memL c (bools L) → (notL c).length = L := fun c hc => by
    show (c.map (fun b => !b)).length = L
    rw [len_map3]; exact mem_bools_len L c hc
  -- rewrite both inner sums with c' = s ⊙ c and compare pointwise
  have hX : ∀ c, memL c (bools L) →
      sumK K (fun c' => K.mul (K.mul (mono K nA c) (mono K nB c)) (K.mul (prodQ' K P c) (prodQ' K P c'))) (bools L)
        = K.add (sumK K (fun s => K.mul (K.mul (mono K nA c) (mono K nB (zx s (notL c))))
              (K.mul (prodQ' K P c) (prodQ' K P (zx s (notL c))))) (bools L))
            (sumK K (Z c) (bools L)) := fun c hc => by
    rw [← sum_xor K L (fun c' => K.mul (K.mul (mono K nA c) (mono K nB c)) (K.mul (prodQ' K P c) (prodQ' K P c')))
      (notL c) (hlen c hc), ← sumK_add]
    refine sumK_ext_mem K _ _ (bools L) (fun s hs => ?_)
    have hsl : s.length = c.length := (mem_bools_len L s hs).trans (mem_bools_len L c hc).symm
    show K.mul (K.mul (mono K nA c) (mono K nB c)) (K.mul (prodQ' K P c) (prodQ' K P (zx s (notL c))))
      = K.add (K.mul (K.mul (mono K nA c) (mono K nB (zx s (notL c)))) (K.mul (prodQ' K P c) (prodQ' K P (zx s (notL c)))))
          (K.mul (K.mul (K.mul (mono K nA c) (mono K nB c)) (K.add K.one (K.neg (mono K nB s))))
            (K.mul (prodQ' K P c) (prodQ' K P (zx s (notL c)))))
    rw [mono_zx K nB s c hsl, ← DetChain.right_distrib, K.distrib (K.mul (mono K nA c) (mono K nB c)), K.mul_comm _ K.one,
      K.one_mul]
    congr 1
    -- A·(B(s)B(c)) + (AB(c) + AB(c)(−B(s))) = AB(c)
    rw [Sym2Local'.mul_neg K, ← K.add_assoc, K.add_comm (K.mul (mono K nA c) (K.mul (mono K nB s) (mono K nB c))),
      K.add_assoc]
    have e : K.mul (mono K nA c) (K.mul (mono K nB s) (mono K nB c)) = K.mul (K.mul (mono K nA c) (mono K nB c)) (mono K nB s) := by
      rw [K.mul_comm (mono K nB s) (mono K nB c), K.mul_assoc]
    rw [e, K.add_neg, DetChain.add_zero']
  have hY : ∀ c, memL c (bools L) →
      sumK K (fun c' => K.mul (K.mul (mono K nA c) (mono K nB c')) (K.mul (prodQ' K P c) (prodQ' K P c'))) (bools L)
        = sumK K (fun s => K.mul (K.mul (mono K nA c) (mono K nB (zx s (notL c))))
              (K.mul (prodQ' K P c) (prodQ' K P (zx s (notL c))))) (bools L) := fun c hc =>
    (sum_xor K L (fun c' => K.mul (K.mul (mono K nA c) (mono K nB c')) (K.mul (prodQ' K P c) (prodQ' K P c')))
      (notL c) (hlen c hc)).symm
  rw [sumK_ext_mem K _ _ (bools L) hX, sumK_ext_mem K _ _ (bools L) hY, sumK_add]
  -- Σ_c Σ_s Z ≥ 0
  have hZ : O.le K.zero (sumK K (fun c => sumK K (Z c) (bools L)) (bools L)) := by
    rw [sumK_swap]
    refine zero_le_sum' K O _ (bools L) (fun s hs => ?_)
    have e : ∀ c, memL c (bools L) → Z c s
        = K.mul (K.add K.one (K.neg (mono K nB s))) (K.mul (mono K (zadd nA nB) c) (prodQ' K (dbl K s P) c)) := fun c hc => by
      have hsl : s.length = c.length := (mem_bools_len L s hs).trans (mem_bools_len L c hc).symm
      show K.mul (K.mul (K.mul (mono K nA c) (mono K nB c)) (K.add K.one (K.neg (mono K nB s))))
          (K.mul (prodQ' K P c) (prodQ' K P (zx s (notL c)))) = _
      rw [prodQ'_double K s c hsl, mono_mul K nA nB c (hA.trans hB.symm), K.mul_comm (mono K (zadd nA nB) c),
        K.mul_assoc, K.mul_comm (K.add K.one (K.neg (mono K nB s)))]
    rw [sumK_ext_mem K _ _ (bools L) e, ← mul_sumK]
    have hB1 : O.le K.zero (K.add K.one (K.neg (mono K nB s))) := by
      cases mono_pm K nB s with
      | inl h => rw [h, K.add_neg]; exact O.le_refl _
      | inr h => rw [h, DetChain.neg_neg']; exact nn_add K O _ _ h1 h1
    exact O.mul_nonneg _ _ hB1 (gks1' K O h1 L (dbl K s P) (zadd nA nB) (len_zadd L nA nB hA hB)
      (dbl_nn K O h1 s L P hP))
  have := O.add_le_add _ _ _ _ (O.le_refl (sumK K (fun c => sumK K (fun s => K.mul (K.mul (mono K nA c)
      (mono K nB (zx s (notL c)))) (K.mul (prodQ' K P c) (prodQ' K P (zx s (notL c))))) (bools L)) (bools L))) hZ
  rw [DetChain.add_zero'] at this
  exact this
where
  Sym2Local'.mul_neg (K : DetChain.CRing R) (x y : R) : K.mul x (K.neg y) = K.neg (K.mul x y) := by
    rw [K.mul_comm, DetChain.neg_mul_left, K.mul_comm]
  zero_le_sum' (K : DetChain.CRing R) (O : ORing K) {A : Type} (f : A → R) : ∀ l : List A,
      (∀ a, memL a l → O.le K.zero (f a)) → O.le K.zero (sumK K f l)
    | [], _ => O.le_refl _
    | a :: l, h => by
      have := O.add_le_add _ _ _ _ (h a (Or.inl rfl)) (zero_le_sum' K O f l (fun b hb => h b (Or.inr hb)))
      rw [K.zero_add] at this; exact this

/-- Double sums of products split: `Σ_c Σ_c' f(c) g(c') = (Σ f)(Σ g)`. -/
theorem dsum (f g : List Bool → R) (l : List (List Bool)) :
    sumK K (fun c => sumK K (fun c' => K.mul (f c) (g c')) l) l = K.mul (sumK K f l) (sumK K g l) :=
  BridgeChain.double_sum K f g l l

/-- **Monotonicity in the lattice.** Switching on one more plaquette `q` with weight `a + b U_q` (`b ≥ 0`) does not
    decrease any Wilson loop: `⟨W⟩_P ≤ ⟨W⟩_(P+q)`, cross-multiplied:
    `(Σ W w)(Σ w (a + b U_q)) ≤ (Σ W w (a + b U_q))(Σ w)`. -/
theorem monotone_plaquette (h1 : O.le K.zero K.one) (L : Nat) (P : List (List Nat × R × R))
    (hP : ∀ t, memL t P → t.1.length = L ∧ O.le K.zero t.2.2 ∧ O.le t.2.2 t.2.1)
    (nW q : List Nat) (hW : nW.length = L) (hq : q.length = L) (a b : R) (hb : O.le K.zero b) :
    O.le (K.mul (sumK K (fun c => K.mul (mono K nW c) (prodQ' K P c)) (bools L))
            (sumK K (fun c => K.mul (prodQ' K P c) (K.add a (K.mul b (mono K q c)))) (bools L)))
         (K.mul (sumK K (fun c => K.mul (K.mul (mono K nW c) (prodQ' K P c)) (K.add a (K.mul b (mono K q c)))) (bools L))
            (sumK K (prodQ' K P) (bools L))) := by
  -- GKS II with A = W, B = U_q
  have g := gks2 K O h1 L P hP nW q hW hq
  -- rewrite both double sums as products of single sums
  have eY : sumK K (fun c => sumK K (fun c' => K.mul (K.mul (mono K nW c) (mono K q c'))
      (K.mul (prodQ' K P c) (prodQ' K P c'))) (bools L)) (bools L)
      = K.mul (sumK K (fun c => K.mul (mono K nW c) (prodQ' K P c)) (bools L))
          (sumK K (fun c => K.mul (mono K q c) (prodQ' K P c)) (bools L)) := by
    rw [← dsum]
    exact sumK_ext K _ _ (fun c => sumK_ext K _ _ (fun c' => mul_mid4 K _ _ _ _) _) _
  have eX : sumK K (fun c => sumK K (fun c' => K.mul (K.mul (mono K nW c) (mono K q c))
      (K.mul (prodQ' K P c) (prodQ' K P c'))) (bools L)) (bools L)
      = K.mul (sumK K (fun c => K.mul (K.mul (mono K nW c) (mono K q c)) (prodQ' K P c)) (bools L))
          (sumK K (prodQ' K P) (bools L)) := by
    rw [← dsum]
    exact sumK_ext K _ _ (fun c => sumK_ext K _ _ (fun c' => by
      rw [K.mul_assoc (K.mul (mono K nW c) (mono K q c)) (prodQ' K P c) (prodQ' K P c'), K.mul_assoc (mono K nW c) (mono K q c)]) _) _
  rw [eY, eX] at g
  -- expand both sides: the a-parts agree, the b-parts are b·Y ≤ b·X
  have hb' := O.mul_le_mul_right _ _ b g hb
  -- the two single sums with the new plaquette
  have hS1 : sumK K (fun c => K.mul (prodQ' K P c) (K.add a (K.mul b (mono K q c)))) (bools L)
      = K.add (K.mul a (sumK K (prodQ' K P) (bools L))) (K.mul b (sumK K (fun c => K.mul (mono K q c) (prodQ' K P c)) (bools L))) := by
    rw [mul_sumK, mul_sumK, ← sumK_add]
    exact sumK_ext K _ _ (fun c => by
      show K.mul (prodQ' K P c) (K.add a (K.mul b (mono K q c))) = K.add (K.mul a (prodQ' K P c)) (K.mul b (K.mul (mono K q c) (prodQ' K P c)))
      rw [K.distrib, K.mul_comm (prodQ' K P c) a, K.mul_comm (prodQ' K P c) (K.mul b (mono K q c)), K.mul_assoc]) _
  have hS2 : sumK K (fun c => K.mul (K.mul (mono K nW c) (prodQ' K P c)) (K.add a (K.mul b (mono K q c)))) (bools L)
      = K.add (K.mul a (sumK K (fun c => K.mul (mono K nW c) (prodQ' K P c)) (bools L)))
          (K.mul b (sumK K (fun c => K.mul (K.mul (mono K nW c) (mono K q c)) (prodQ' K P c)) (bools L))) := by
    rw [mul_sumK, mul_sumK, ← sumK_add]
    exact sumK_ext K _ _ (fun c => by
      show K.mul (K.mul (mono K nW c) (prodQ' K P c)) (K.add a (K.mul b (mono K q c)))
        = K.add (K.mul a (K.mul (mono K nW c) (prodQ' K P c))) (K.mul b (K.mul (K.mul (mono K nW c) (mono K q c)) (prodQ' K P c)))
      rw [K.distrib, K.mul_comm (K.mul (mono K nW c) (prodQ' K P c)) a]
      congr 1
      rw [K.mul_comm (K.mul (mono K nW c) (prodQ' K P c)) (K.mul b (mono K q c)), K.mul_assoc b, ← K.mul_assoc (mono K q c),
        K.mul_comm (mono K q c) (mono K nW c), K.mul_assoc (mono K nW c) (mono K q c), ← K.mul_assoc (mono K nW c)]) _
  rw [hS1, hS2, K.distrib, DetChain.right_distrib]
  -- (ΣWw)(aΣw) = (aΣWw)(Σw);  (ΣWw)(bΣUw) = (ΣWw ΣUw) b;  (bΣWUw)(Σw) = (ΣWUw Σw) b
  have e1 : K.mul (sumK K (fun c => K.mul (mono K nW c) (prodQ' K P c)) (bools L)) (K.mul a (sumK K (prodQ' K P) (bools L)))
      = K.mul (K.mul a (sumK K (fun c => K.mul (mono K nW c) (prodQ' K P c)) (bools L))) (sumK K (prodQ' K P) (bools L)) := by
    rw [swap3 K, ← K.mul_assoc]
  have e2 : K.mul (sumK K (fun c => K.mul (mono K nW c) (prodQ' K P c)) (bools L))
      (K.mul b (sumK K (fun c => K.mul (mono K q c) (prodQ' K P c)) (bools L)))
      = K.mul (K.mul (sumK K (fun c => K.mul (mono K nW c) (prodQ' K P c)) (bools L))
          (sumK K (fun c => K.mul (mono K q c) (prodQ' K P c)) (bools L))) b := by
    rw [swap3 K, K.mul_comm b]
  have e3 : K.mul (K.mul b (sumK K (fun c => K.mul (K.mul (mono K nW c) (mono K q c)) (prodQ' K P c)) (bools L)))
      (sumK K (prodQ' K P) (bools L))
      = K.mul (K.mul (sumK K (fun c => K.mul (K.mul (mono K nW c) (mono K q c)) (prodQ' K P c)) (bools L))
          (sumK K (prodQ' K P) (bools L))) b := by
    rw [K.mul_assoc, K.mul_comm b]
  rw [e1, e2, e3]
  exact O.add_le_add _ _ _ _ (O.le_refl _) hb'

end GKS2

#print axioms GKS2.sgn_bx
#print axioms GKS2.pwR_mul
#print axioms GKS2.mono_zx
#print axioms GKS2.sgn_sq
#print axioms GKS2.mono_sq
#print axioms GKS2.mono_pm
#print axioms GKS2.prodQ'_double
#print axioms GKS2.nn_add
#print axioms GKS2.dbl_nn
#print axioms GKS2.gks2
#print axioms GKS2.dsum
#print axioms GKS2.monotone_plaquette

ym/GPerm.lean

lean_all/ym/GPerm.lean

/-
  ym/GPerm — T27, cycle 73: the surface sum does not depend on the order of the plaquettes.
    G_swap     G t n (x :: y :: l) = G t n (y :: x :: l)
    G_perm     P ~ P' (List.Perm) ⇒ G t n P = G t n P'
  Lean 4 core only, proofs by hand, no axioms.
-/
import ym.AreaBox

namespace GPerm

open YMChain GKS StrongZ2

section Main
variable {R : Type} (K : DetChain.CRing R)

theorem G_swap (t : R) (n x y : List Nat) (l : List (List Nat)) : G K t n (x :: y :: l) = G K t n (y :: x :: l) := by
  show K.add (K.add (G K t n l) (K.mul t (G K t (zadd n y) l))) (K.mul t (K.add (G K t (zadd n x) l) (K.mul t (G K t (zadd (zadd n x) y) l)))) =
    K.add (K.add (G K t n l) (K.mul t (G K t (zadd n x) l))) (K.mul t (K.add (G K t (zadd n y) l) (K.mul t (G K t (zadd (zadd n y) x) l))))
  have e : zadd (zadd n x) y = zadd (zadd n y) x := by
    rw [S2cDec.zadd_assoc, S2cDec.zadd_assoc, S2cDec.zadd_comm x y]
  rw [e]
  generalize G K t n l = a
  generalize G K t (zadd n y) l = b
  generalize G K t (zadd n x) l = c
  generalize G K t (zadd (zadd n y) x) l = d
  rw [K.distrib, K.distrib, ← K.add_assoc, ← K.add_assoc, K.add_assoc a, K.add_comm (K.mul t b), ← K.add_assoc a]

/-- **G is invariant under permutations of the plaquette list.** -/
theorem G_perm (t : R) : ∀ (P P' : List (List Nat)), P.Perm P' → ∀ n, G K t n P = G K t n P' := by
  intro P P' h
  induction h with
  | nil => intro n; rfl
  | cons x _ ih =>
    intro n
    show K.add (G K t n _) (K.mul t (G K t (zadd n x) _)) = K.add (G K t n _) (K.mul t (G K t (zadd n x) _))
    rw [ih n, ih (zadd n x)]
  | swap x y l => intro n; exact G_swap K t n y x l
  | trans _ _ ih1 ih2 => intro n; rw [ih1 n, ih2 n]

end Main

end GPerm

#print axioms GPerm.G_swap
#print axioms GPerm.G_perm

ym/GRungA0.lean

lean_all/ym/GRungA0.lean

/-
  ym/GRungA0 — T45, G78g rung 0: kernel check of the head cross inequalities (RungCheck.rungsLU), heat head q = 7/8,
  tail ratios in [1/10, 50561/500000], next head q' = 124/143, N = 14, exact part 30 characters. Generated by
  cert/A/top/geo_ladder.py. Lean 4 core only, no axioms.
-/
import ym.RungCheck

namespace GRungA0

set_option maxRecDepth 400000 in
set_option maxHeartbeats 0 in
theorem ok : RungCheck.rungsLU [966134380754314586173837972732996836074731832426608749664308812862879785572390106134048441645480644490615904007875544294341269665260746913935727168366770187174245203705856000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, 129446911171378868381885322127897622958450397860283906693303876098424908770050705626554146673593695  -- (+16211 chars; full line in the Zenodo source)

end GRungA0

#print axioms GRungA0.ok

ym/Gap.lean

lean_all/ym/Gap.lean

/-
  ym/Gap — T45, cycle 41 (Lad1, ℤ₂, every dimension): exponential clustering uniform in the volume.

  Two observables U_p, U_q (link vectors p, q), balls B_p, B_q (masks) that are disjoint and share no link with each
  other or with the other observable. Pm ⊇ B_p ∪ B_q is the volume.
    G_shift'        G (a + b) Q = [a even] · G b Q        when a shares no link with b or with any plaquette of Q
    bd_disj         ∂Y shares no link with r if no plaquette of Y does
    decouple_mask   G_{p+q}(B_p ∪ B_q) = G_p(B_p) · G_q(B_q)
    gap_upper       G_{p+q}(Pm) G_0(Pm) ≤ G_p(Pm) G_q(Pm) + T · G_0(Pm)²,
                    i.e.  ⟨U_p U_q⟩ − ⟨U_p⟩⟨U_q⟩ ≤ T ≤ u^R (1 + y)^s      (Reach.T_tail, ball R ⊆ B_p ∪ B_q)
  Together with GKS II (⟨U_pU_q⟩ − ⟨U_p⟩⟨U_q⟩ ≥ 0, ym/GKS2) this is the strong-coupling clustering with a
  rate −ln u per closure step, uniform in the volume: the "gap" half of rung Lad1.

  Lean 4 core only, proofs by hand, no axioms.
-/
import ym.Reach

namespace Gap

open YMChain LinkIntegral GKS StrongZ2 MaskSum Closure Factor Seeds Count GPerm MaskMono Tail Ratio Cluster Approx
  AreaUpper Reach

variable {R : Type} (K : DetChain.CRing R)

theorem G_shift' (t : R) : ∀ (Q : List (List Nat)) (a b : List Nat), disjN a b → (∀ r, memL r Q → disjN a r) →
    G K t (zadd a b) Q = (if evenAll a = true then G K t b Q else K.zero)
  | [], a, b, hab, _ => by
    show (if evenAll (zadd a b) = true then K.one else K.zero)
      = (if evenAll a = true then (if evenAll b = true then K.one else K.zero) else K.zero)
    rw [even_split a b hab]
    cases evenAll a <;> cases evenAll b <;> rfl
  | r :: Q, a, b, hab, hQ => by
    show K.add (G K t (zadd a b) Q) (K.mul t (G K t (zadd (zadd a b) r) Q))
      = (if evenAll a = true then K.add (G K t b Q) (K.mul t (G K t (zadd b r) Q)) else K.zero)
    rw [Decouple.zadd_assoc, G_shift' t Q a b hab (fun r' hr => hQ r' (Or.inr hr)),
      G_shift' t Q a (zadd b r) (disj_zadd_right a b r hab (hQ r (Or.inl rfl))) (fun r' hr => hQ r' (Or.inr hr))]
    cases evenAll a
    · show K.add K.zero (K.mul t K.zero) = K.zero; rw [DetChain.mul_zero, K.zero_add]
    · rfl

theorem bd_disj (r : List Nat) : ∀ (P : List (List Nat)) (Y : List Bool),
    (∀ i, i < P.length → nthB Y i = true → disjN (nthL P i) r) → disjN (bdS P Y) r
  | [], _, _ => trivial
  | _ :: _, [], _ => trivial
  | q :: P, true :: Y, h => disj_zadd_left q (bdS P Y) r (h 0 (Nat.succ_pos _) rfl)
      (bd_disj r P Y (fun i hi hY => h (i + 1) (Nat.succ_lt_succ hi) hY))
  | _ :: P, false :: Y, h => bd_disj r P Y (fun i hi hY => h (i + 1) (Nat.succ_lt_succ hi) hY)

theorem or_and_self : ∀ A D : List Bool, A.length = D.length → andB (orB A D) A = A
  | [], [], _ => rfl
  | [], _ :: _, h => absurd h Nat.noConfusion
  | _ :: _, [], h => absurd h Nat.noConfusion
  | a :: A, d :: D, h => by
    show ((a || d) && a) :: andB (orB A D) A = a :: A
    rw [or_and_self A D (Nat.succ.inj h)]
    cases a <;> cases d <;> rfl

/-- **Two detached balls decouple.** -/
theorem decouple_mask (t : R) (P : List (List Nat)) (Bp Bq : List Bool) (hp : Bp.length = P.length)
    (hq : Bq.length = P.length) (hd : disjM Bp Bq) (p q : List Nat) (hpq : disjN p q)
    (hBp : ∀ i, i < P.length → nthB Bp i = true → disjN (nthL P i) q)
    (hBq : ∀ j, j < P.length → nthB Bq j = true → disjN p (nthL P j))
    (hBB : ∀ i j, i < P.length → j < P.length → nthB Bp i = true → nthB Bq j = true → disjN (nthL P i) (nthL P j)) :
    G K t (zadd p q) (selL P (orB Bp Bq)) = K.mul (G K t p (selL P Bp)) (G K t q (selL P Bq)) := by
  have hM : (orB Bp Bq).length = P.length := len_orB _ _ _ hp hq
  rw [expand_X K t P (orB Bp Bq) Bp hM hp, or_and_self Bp Bq (hp.trans hq.symm),
    rest_eq Bp Bq (hp.trans hq.symm) hd, G_sel K t P Bp p hp, sumK_mul]
  refine sumK_ext_mem K _ _ (bools P.length) (fun Y hY => ?_)
  have hYl := ChangeVar2D.mem_bools_len P.length Y hY
  by_cases cY : andB Y Bp = Y
  · rw [ip cY, ip cY, term_eq K t P p Y hYl]
    have hYi : ∀ i, i < P.length → nthB Y i = true → nthB Bp i = true := fun i _ hi => by
      have := congrArg (fun z => nthB z i) cY
      simp only [nth_andB] at this
      rw [hi] at this
      cases e : nthB Bp i
      · rw [e] at this; exact absurd this Bool.noConfusion
      · rfl
    have e1 : zadd (zadd p q) (bdS P Y) = zadd (zadd p (bdS P Y)) q := by
      rw [Decouple.zadd_assoc, AreaLower.zadd_comm q, ← Decouple.zadd_assoc]
    have hab : disjN (zadd p (bdS P Y)) q :=
      disj_zadd_left p _ q hpq (bd_disj q P Y (fun i hi hy => hBp i hi (hYi i hi hy)))
    have hQ : ∀ r, memL r (selL P Bq) → disjN (zadd p (bdS P Y)) r := fun r hr => by
      obtain ⟨j, hj, hj1, hj2⟩ := sel_nth P Bq r hr
      rw [hj2]
      exact disj_zadd_left p _ _ (hBq j hj hj1) (bd_disj _ P Y (fun i hi hy => hBB i j hi hj (hYi i hi hy) hj1))
    rw [e1, G_shift' K t _ _ q hab hQ]
    cases evenAll (zadd p (bdS P Y))
    · show K.mul (pwR K t (cnt Y)) K.zero = K.mul K.zero (G K t q (selL P Bq))
      rw [DetChain.mul_zero, DetChain.zero_mul']
    · rfl
  · rw [ineg cY, ineg cY, DetChain.zero_mul']

variable (O : ORing K)

theorem mul_le_mul4 (a a' b b' : R) (ha : O.le K.zero a) (hb : O.le K.zero b) (hb' : O.le K.zero b')
    (h1 : O.le a a') (h2 : O.le b b') : O.le (K.mul a b) (K.mul a' b') := by
  have x := O.mul_le_mul_right _ _ _ h1 hb
  have y := O.mul_le_mul_right _ _ _ h2 (O.le_trans _ _ _ ha h1)
  rw [K.mul_comm b a', K.mul_comm b' a'] at y
  exact O.le_trans _ _ _ x y

/-- **Clustering, upper half**: `⟨U_pU_q⟩ − ⟨U_p⟩⟨U_q⟩ ≤ T`, in cross-multiplied form. -/
theorem gap_upper (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero) (t : R) (ht0 : O.le K.zero t) (ht1 : O.le t K.one)
    (L : Nat) (P : List (List Nat)) (hP : ∀ r, memL r P → r.length = L)
    (p q : List Nat) (hpL : p.length = L) (hqL : q.length = L)
    (Bp Bq Pm : List Bool) (hp : Bp.length = P.length) (hq : Bq.length = P.length) (hPm : Pm.length = P.length)
    (hd : disjM Bp Bq) (hpq : disjN p q)
    (hBp : ∀ i, i < P.length → nthB Bp i = true → disjN (nthL P i) q)
    (hBq : ∀ j, j < P.length → nthB Bq j = true → disjN p (nthL P j))
    (hBB : ∀ i j, i < P.length → j < P.length → nthB Bp i = true → nthB Bq j = true → disjN (nthL P i) (nthL P j))
    (hsub : leB (orB Bp Bq) Pm) :
    O.le (K.mul (G K t (zadd p q) (selL P Pm)) (G K t (zl L) (selL P Pm)))
      (K.add (K.mul (G K t p (selL P Pm)) (G K t q (selL P Pm)))
        (K.mul (T K t (zadd p q) P (orB Bp Bq) Pm) (K.mul (G K t (zl L) (selL P Pm)) (G K t (zl L) (selL P Pm))))) := by
  let G0 : List Bool → R := fun M => G K t (zl L) (selL P M)
  have G0p : ∀ M, O.le K.one (G0 M) := fun M => G0_ge_one K O h1 t ht0 L _
  have G0n : ∀ M, O.le K.zero (G0 M) := fun M => O.le_trans _ _ _ h1 (G0p M)
  have Gn : ∀ n M, O.le K.zero (G K t n (selL P M)) := fun n M => G_nn K O h1 t ht0 _ n
  have hM : (orB Bp Bq).length = P.length := len_orB _ _ _ hp hq
  have hpqL : (zadd p q).length = L := (AreaLower.len_zadd_le p q (by rw [hpL, hqL]; exact Nat.le_refl _)).trans hpL
  -- (1) finite-volume comparison
  have a := approx K O h1 h10 t ht0 ht1 L (zadd p q) hpqL P hP (orB Bp Bq) Pm hM hPm hsub
  -- (2) decoupling
  have dW := decouple_mask K t P Bp Bq hp hq hd p q hpq hBp hBq hBB
  have d0 := decouple_mask K t P Bp Bq hp hq hd (zl L) (zl L) (disj_zl _ _)
    (fun i _ _ => disj_zl _ _) (fun j hj _ => disj_comm _ _ (disj_zl _ _)) hBB
  have ezz : zadd (zl L) (zl L) = zl L := by
    have := Decouple.zadd_zl (zl L); rw [len_zl] at this; exact this
  rw [ezz] at d0
  rw [dW, d0] at a
  -- (3) monotonicity of each factor
  have leBp : leB Bp Pm := leB_trans _ _ _ (leB_of _ _ (hp.trans hM.symm) (fun i hi => by
    rw [nth_orB Bp Bq i (hp.trans hq.symm), hi]; rfl)) hsub
  have leBq : leB Bq Pm := leB_trans _ _ _ (leB_of _ _ (hq.trans hM.symm) (fun i hi => by
    rw [nth_orB Bp Bq i (hp.trans hq.symm), hi, Bool.or_true])) hsub
  have mp := mask_mono K O h1 h10 t ht0 ht1 L p hpL P hP Pm hPm (cnt Pm) Bp hp leBp (Nat.le_add_left _ _)
  have mq := mask_mono K O h1 h10 t ht0 ht1 L q hqL P hP Pm hPm (cnt Pm) Bq hq leBq (Nat.le_add_left _ _)
  -- names
  let W := G K t (zadd p q) (selL P Pm)
  let gp := G K t p (selL P Bp)
  let gq := G K t q (selL P Bq)
  let Gp := G K t p (selL P Pm)
  let Gq := G K t q (selL P Pm)
  let z := G0 Pm
  let zp := G0 Bp
  let zq := G0 Bq
  let Tt := T K t (zadd p q) P (orB Bp Bq) Pm
  -- a : W (zp zq) ≤ (gp gq) z + Tt (z (zp zq))
  -- mp : gp z ≤ Gp zp ; mq : gq z ≤ Gq zq
  have a' := O.mul_le_mul_right _ _ _ a (G0n Pm)
  have prod := mul_le_mul4 K O (K.mul gp z) (K.mul Gp zp) (K.mul gq z) (K.mul Gq zq)
    (O.mul_nonneg _ _ (Gn _ _) (G0n _)) (O.mul_nonneg _ _ (Gn _ _) (G0n _)) (O.mul_nonneg _ _ (Gn _ _) (G0n _)) mp mq
  -- rewrite both sides as (…) · (zp zq)
  have eL : K.mul (K.mul W (K.mul zp zq)) z = K.mul (K.mul W z) (K.mul zp zq) := by
    rw [K.mul_assoc, K.mul_comm (K.mul zp zq) z, ← K.mul_assoc]
  have mul4 : ∀ a b c d : R, K.mul (K.mul a b) (K.mul c d) = K.mul (K.mul a c) (K.mul b d) := fun a b c d => by
    rw [K.mul_assoc, ← K.mul_assoc b c d, K.mul_comm b c, K.mul_assoc c b d, ← K.mul_assoc]
  have eR1 : K.mul (K.mul (K.mul gp gq) z) z = K.mul (K.mul gp z) (K.mul gq z) := by
    rw [K.mul_assoc, mul4]
  have eR2 : K.mul (K.mul Gp zp) (K.mul Gq zq) = K.mul (K.mul Gp Gq) (K.mul zp zq) := mul4 _ _ _ _
  have eR3 : K.mul (K.mul Tt (K.mul z (K.mul zp zq))) z = K.mul (K.mul Tt (K.mul z z)) (K.mul zp zq) := by
    rw [K.mul_assoc Tt, K.mul_assoc Tt]
    congr 1
    rw [K.mul_assoc, K.mul_comm (K.mul zp zq) z, ← K.mul_assoc]
  rw [eL, DetChain.right_distrib, eR1, eR3] at a'
  have c := O.le_trans _ _ _ a' (O.add_le_add _ _ _ _ prod (O.le_refl _))
  rw [eR2, ← DetChain.right_distrib] at c
  have zz1 : O.le K.one (K.mul zp zq) := one_le_mul K O zp zq (G0p Bp) (G0p Bq) h1
  have zzn : O.le K.zero (K.mul zp zq) := O.le_trans _ _ _ h1 zz1
  have zzne : K.mul zp zq ≠ K.zero := fun hz => by rw [hz] at zz1; exact h10 (O.le_antisymm _ _ zz1 h1)
  exact O.pos_cancel _ _ _ zzn zzne c

end Gap

#print axioms Gap.G_shift'
#print axioms Gap.bd_disj
#print axioms Gap.decouple_mask
#print axioms Gap.gap_upper

ym/GapBothBoxD4.lean

lean_all/ym/GapBothBoxD4.lean

/-
  ym/GapBothBoxD4 — T45, G22: Z⁴, box filling order (CauchyBox) — all numeric conditions, including the decay 2⁻⁷·81 ≤ 1, discharged: every β ∈ [0, 4] and every truncation 29 + m: from one Migdal step k₀ on, the SAME flowed
  SU(2) plaquette weight has both the uniform infinite-volume Cauchy estimate (CauchyCone8) and exponential clustering
  in every finite volume (GapCone8). Lean 4 core only, no axioms.
-/
import ym.GapBothGen
import ym.CauchyBox
import ym.R7

namespace GapBothBoxD4

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **Z⁴**: Cone(2⁻⁸) coefficients ⇒ one weight with the box-order infinite-volume Cauchy estimate and clustering. -/
theorem both_box_d4 (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (cf : List R) (hcf : ConeBound.Bd K O (pwR K h 8) 0 (K.one :: cf)) :
    (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 : Pq)
    (tr : Nat → List G → R) (Ob : List G → R) (K1 : R)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Ob)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Ob)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.one K1) (hUpb : ∀ x, O.le (K.neg K1) (Ob x) ∧ O.le (Ob x) K1)
    (hp0 : p0.1.length = 4)
    (n : Nat) (y : Nat → Nat) (M0 : List Bool) (hM0 : M0.length = Pn.length)
    (hyl : ∀ j, y j < Pn.length) (hoff : ∀ i, i < n → nthB M0 (y i) = false)
    (hyinj : ∀ i j, i < n → j < n → y i = y j → i = j)
    (Kk N : Nat) (hfar : ∀ i, i < n → Kk + 2 ≤ LinfDist.dist p0.1 (VolOrder.nthP Pn (y i)).1 ∧
      LinfDist.dist p0.1 (VolOrder.nthP Pn (y i)).1 < N + 2),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 cf (ChiBound.c K (tr i x))
    let sw := F.inv (K.add K.one (pwR K h (5 + 6 + 7)))
    let κ := K.add K.one (pwR K h (5 + 6 + 4))
    let w : Nat → List G → R := fun i x => K.add sw (K.mul sw (f0 i x))
    let a : Nat → R := fun i => E K O F (ZxH K O H w (VolOrder.Ms M0 y i) Ob) (ZxH K O H w (VolOrder.Ms M0 y i) (fun _ => K.one))
    let C := K.mul h (K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) (4 * (2 * 4) + 4 * (2 * 4))))
      (pwR K (K.add K.one (pwR K h (5 + 1))) (4 * (2 * 4) + 4 * (2 * 4))))
    let s := 4 * 4 * 5 ^ p0.1.length
    let r := K.mul (pwR K h (6 + 1)) (natR K (3 ^ p0.1.length))
    let T := K.mul (K.mul (K.mul κ C) (natR K s)) (Geom.tail K r Kk N)
    O.le (K.neg T) (K.add (a n) (K.neg (a 0))) ∧ O.le (K.add (a n) (K.neg (a 0))) T ∧
      O.le (K.mul (K.add K.one (K.neg r)) T) (K.mul (K.mul (K.mul κ C) (natR K s)) (pwR K r Kk)))
    ∧ (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 cf (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h (5 + 6 + 7)))
    let κ := K.add K.one (pwR K h (5 + 6 + 4))
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h (5 + 6 + 1))) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) := by
  refine ⟨fun LL hLL hL Pn hnd hv p0 tr Ob K1 htd hUp hta hUpa htr hK1 hUpb hp0 n y M0 hM0 hyl hoff hyinj Kk N hfar => ?_, (GapBothGen.both_of_cone8 K O F H 4 5 6 (by decide) (by decide) (by decide) (by decide) DH h1 h10 h hh h0 cf hcf).2⟩
  have hr1 : O.le (K.mul (pwR K h (6 + 1)) (natR K (3 ^ p0.1.length))) K.one := by
    rw [hp0]; exact R7.r7_le K O h1 h hh h0
  exact CauchyBox.cauchy_box K O F H 4 5 6 (by decide) (by decide) (by decide) DH h1 h10 h hh h0 LL hLL hL Pn hnd hv p0 cf hcf
    tr Ob K1 htd hUp hta hUpa htr hK1 hUpb hp0 n y M0 hM0 hyl hoff hyinj Kk N hfar hr1

end GapBothBoxD4

#print axioms GapBothBoxD4.both_box_d4

ym/GapBothBoxFlow04.lean

lean_all/ym/GapBothBoxFlow04.lean

/-
  ym/GapBothBoxFlow04 — T45, G22: Z⁴, β ∈ [0,4], every truncation 29 + m: one flowed weight with the box-order Cauchy
  estimate and clustering (GapBothBoxD4 + Cover04T8): every β ∈ [0, 4] and every truncation 29 + m: from one Migdal step k₀ on, the SAME flowed
  SU(2) plaquette weight has both the uniform infinite-volume Cauchy estimate (CauchyCone8) and exponential clustering
  in every finite volume (GapCone8). Lean 4 core only, no axioms.
-/
import ym.GapBothBoxD4
import ym.Cover04T8

namespace GapBothBoxFlow04

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **Z⁴, β ∈ [0,4], every truncation**: from one Migdal step on, one weight with the box-order infinite-volume Cauchy estimate and clustering. -/
theorem both_box_flow04 (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (cN K 2)) (mm : Nat) :
    ∃ k0, ∀ jj,
    (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 : Pq)
    (tr : Nat → List G → R) (Ob : List G → R) (K1 : R)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Ob)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Ob)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.one K1) (hUpb : ∀ x, O.le (K.neg K1) (Ob x) ∧ O.le (Ob x) K1)
    (hp0 : p0.1.length = 4)
    (n : Nat) (y : Nat → Nat) (M0 : List Bool) (hM0 : M0.length = Pn.length)
    (hyl : ∀ j, y j < Pn.length) (hoff : ∀ i, i < n → nthB M0 (y i) = false)
    (hyinj : ∀ i j, i < n → j < n → y i = y j → i = j)
    (Kk N : Nat) (hfar : ∀ i, i < n → Kk + 2 ≤ LinfDist.dist p0.1 (VolOrder.nthP Pn (y i)).1 ∧
      LinfDist.dist p0.1 (VolOrder.nthP Pn (y i)).1 < N + 2),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (29 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let sw := F.inv (K.add K.one (pwR K h (5 + 6 + 7)))
    let κ := K.add K.one (pwR K h (5 + 6 + 4))
    let w : Nat → List G → R := fun i x => K.add sw (K.mul sw (f0 i x))
    let a : Nat → R := fun i => E K O F (ZxH K O H w (VolOrder.Ms M0 y i) Ob) (ZxH K O H w (VolOrder.Ms M0 y i) (fun _ => K.one))
    let C := K.mul h (K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) (4 * (2 * 4) + 4 * (2 * 4))))
      (pwR K (K.add K.one (pwR K h (5 + 1))) (4 * (2 * 4) + 4 * (2 * 4))))
    let s := 4 * 4 * 5 ^ p0.1.length
    let r := K.mul (pwR K h (6 + 1)) (natR K (3 ^ p0.1.length))
    let T := K.mul (K.mul (K.mul κ C) (natR K s)) (Geom.tail K r Kk N)
    O.le (K.neg T) (K.add (a n) (K.neg (a 0))) ∧ O.le (K.add (a n) (K.neg (a 0))) T ∧
      O.le (K.mul (K.add K.one (K.neg r)) T) (K.mul (K.mul (K.mul κ C) (natR K s)) (pwR K r Kk)))
    ∧ (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (29 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h (5 + 6 + 7)))
    let κ := K.add K.one (pwR K h (5 + 6 + 4))
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h (5 + 6 + 1))) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) := by
  obtain ⟨k0, hk0⟩ := Cover04T8.cover04T8 K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, fun jj => GapBothBoxD4.both_box_d4 K O F H DH h1 h10 h hh h0 _ (hk0 jj)⟩

end GapBothBoxFlow04

#print axioms GapBothBoxFlow04.both_box_flow04

ym/GapBothBoxFlow04B.lean

lean_all/ym/GapBothBoxFlow04B.lean

/-
  ym/GapBothBoxFlow04B — T45, G22: Z⁴, β ∈ [0,4], every truncation 29 + m: one flowed weight with the box-order Cauchy
  estimate and clustering (GapBothBoxD4 + Cover04T8B: k₀ ≤ 17): every β ∈ [0, 4] and every truncation 29 + m: from one Migdal step k₀ on, the SAME flowed
  SU(2) plaquette weight has both the uniform infinite-volume Cauchy estimate (CauchyCone8) and exponential clustering
  in every finite volume (GapCone8). Lean 4 core only, no axioms.
-/
import ym.GapBothBoxD4
import ym.Cover04T8B

namespace GapBothBoxFlow04B

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **Z⁴, β ∈ [0,4], every truncation**: from one Migdal step on, one weight with the box-order infinite-volume Cauchy estimate and clustering. -/
theorem both_box_flow04B (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (cN K 2)) (mm : Nat) :
    ∃ k0, k0 ≤ 17 ∧ ∀ jj,
    (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 : Pq)
    (tr : Nat → List G → R) (Ob : List G → R) (K1 : R)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Ob)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Ob)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.one K1) (hUpb : ∀ x, O.le (K.neg K1) (Ob x) ∧ O.le (Ob x) K1)
    (hp0 : p0.1.length = 4)
    (n : Nat) (y : Nat → Nat) (M0 : List Bool) (hM0 : M0.length = Pn.length)
    (hyl : ∀ j, y j < Pn.length) (hoff : ∀ i, i < n → nthB M0 (y i) = false)
    (hyinj : ∀ i j, i < n → j < n → y i = y j → i = j)
    (Kk N : Nat) (hfar : ∀ i, i < n → Kk + 2 ≤ LinfDist.dist p0.1 (VolOrder.nthP Pn (y i)).1 ∧
      LinfDist.dist p0.1 (VolOrder.nthP Pn (y i)).1 < N + 2),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (29 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let sw := F.inv (K.add K.one (pwR K h (5 + 6 + 7)))
    let κ := K.add K.one (pwR K h (5 + 6 + 4))
    let w : Nat → List G → R := fun i x => K.add sw (K.mul sw (f0 i x))
    let a : Nat → R := fun i => E K O F (ZxH K O H w (VolOrder.Ms M0 y i) Ob) (ZxH K O H w (VolOrder.Ms M0 y i) (fun _ => K.one))
    let C := K.mul h (K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) (4 * (2 * 4) + 4 * (2 * 4))))
      (pwR K (K.add K.one (pwR K h (5 + 1))) (4 * (2 * 4) + 4 * (2 * 4))))
    let s := 4 * 4 * 5 ^ p0.1.length
    let r := K.mul (pwR K h (6 + 1)) (natR K (3 ^ p0.1.length))
    let T := K.mul (K.mul (K.mul κ C) (natR K s)) (Geom.tail K r Kk N)
    O.le (K.neg T) (K.add (a n) (K.neg (a 0))) ∧ O.le (K.add (a n) (K.neg (a 0))) T ∧
      O.le (K.mul (K.add K.one (K.neg r)) T) (K.mul (K.mul (K.mul κ C) (natR K s)) (pwR K r Kk)))
    ∧ (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (29 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h (5 + 6 + 7)))
    let κ := K.add K.one (pwR K h (5 + 6 + 4))
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h (5 + 6 + 1))) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) := by
  obtain ⟨k0, hk17, hk0⟩ := Cover04T8B.cover04T8B K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, hk17, fun jj => GapBothBoxD4.both_box_d4 K O F H DH h1 h10 h hh h0 _ (hk0 jj)⟩

end GapBothBoxFlow04B

#print axioms GapBothBoxFlow04B.both_box_flow04B

ym/GapBothBoxFlow08.lean

lean_all/ym/GapBothBoxFlow08.lean

/-
  ym/GapBothBoxFlow08 — T45, G22: Z⁴, β ∈ [0,8], every truncation 40 + m: one flowed weight with the box-order Cauchy
  estimate and clustering (GapBothBoxD4 + Cover08T8): every β ∈ [0, 4] and every truncation 40 + m: from one Migdal step k₀ on, the SAME flowed
  SU(2) plaquette weight has both the uniform infinite-volume Cauchy estimate (CauchyCone8) and exponential clustering
  in every finite volume (GapCone8). Lean 4 core only, no axioms.
-/
import ym.GapBothBoxD4
import ym.Cover08T8

namespace GapBothBoxFlow08

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **Z⁴, β ∈ [0,8], every truncation**: from one Migdal step on, one weight with the box-order infinite-volume Cauchy estimate and clustering. -/
theorem both_box_flow08 (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (cN K 4)) (mm : Nat) :
    ∃ k0, ∀ jj,
    (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 : Pq)
    (tr : Nat → List G → R) (Ob : List G → R) (K1 : R)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Ob)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Ob)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.one K1) (hUpb : ∀ x, O.le (K.neg K1) (Ob x) ∧ O.le (Ob x) K1)
    (hp0 : p0.1.length = 4)
    (n : Nat) (y : Nat → Nat) (M0 : List Bool) (hM0 : M0.length = Pn.length)
    (hyl : ∀ j, y j < Pn.length) (hoff : ∀ i, i < n → nthB M0 (y i) = false)
    (hyinj : ∀ i j, i < n → j < n → y i = y j → i = j)
    (Kk N : Nat) (hfar : ∀ i, i < n → Kk + 2 ≤ LinfDist.dist p0.1 (VolOrder.nthP Pn (y i)).1 ∧
      LinfDist.dist p0.1 (VolOrder.nthP Pn (y i)).1 < N + 2),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (40 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let sw := F.inv (K.add K.one (pwR K h (5 + 6 + 7)))
    let κ := K.add K.one (pwR K h (5 + 6 + 4))
    let w : Nat → List G → R := fun i x => K.add sw (K.mul sw (f0 i x))
    let a : Nat → R := fun i => E K O F (ZxH K O H w (VolOrder.Ms M0 y i) Ob) (ZxH K O H w (VolOrder.Ms M0 y i) (fun _ => K.one))
    let C := K.mul h (K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) (4 * (2 * 4) + 4 * (2 * 4))))
      (pwR K (K.add K.one (pwR K h (5 + 1))) (4 * (2 * 4) + 4 * (2 * 4))))
    let s := 4 * 4 * 5 ^ p0.1.length
    let r := K.mul (pwR K h (6 + 1)) (natR K (3 ^ p0.1.length))
    let T := K.mul (K.mul (K.mul κ C) (natR K s)) (Geom.tail K r Kk N)
    O.le (K.neg T) (K.add (a n) (K.neg (a 0))) ∧ O.le (K.add (a n) (K.neg (a 0))) T ∧
      O.le (K.mul (K.add K.one (K.neg r)) T) (K.mul (K.mul (K.mul κ C) (natR K s)) (pwR K r Kk)))
    ∧ (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (40 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h (5 + 6 + 7)))
    let κ := K.add K.one (pwR K h (5 + 6 + 4))
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h (5 + 6 + 1))) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) := by
  obtain ⟨k0, hk0⟩ := Cover08T8.cover08T8 K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, fun jj => GapBothBoxD4.both_box_d4 K O F H DH h1 h10 h hh h0 _ (hk0 jj)⟩

end GapBothBoxFlow08

#print axioms GapBothBoxFlow08.both_box_flow08

ym/GapBothBoxFlow08B.lean

lean_all/ym/GapBothBoxFlow08B.lean

/-
  ym/GapBothBoxFlow08B — T45, G22: Z⁴, β ∈ [0,8], every truncation 40 + m: one flowed weight with the box-order Cauchy
  estimate and clustering (GapBothBoxD4 + Cover08T8B: k₀ ≤ 30): every β ∈ [0, 4] and every truncation 40 + m: from one Migdal step k₀ on, the SAME flowed
  SU(2) plaquette weight has both the uniform infinite-volume Cauchy estimate (CauchyCone8) and exponential clustering
  in every finite volume (GapCone8). Lean 4 core only, no axioms.
-/
import ym.GapBothBoxD4
import ym.Cover08T8B

namespace GapBothBoxFlow08B

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **Z⁴, β ∈ [0,8], every truncation**: from one Migdal step on, one weight with the box-order infinite-volume Cauchy estimate and clustering. -/
theorem both_box_flow08B (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (cN K 4)) (mm : Nat) :
    ∃ k0, k0 ≤ 30 ∧ ∀ jj,
    (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 : Pq)
    (tr : Nat → List G → R) (Ob : List G → R) (K1 : R)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Ob)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Ob)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.one K1) (hUpb : ∀ x, O.le (K.neg K1) (Ob x) ∧ O.le (Ob x) K1)
    (hp0 : p0.1.length = 4)
    (n : Nat) (y : Nat → Nat) (M0 : List Bool) (hM0 : M0.length = Pn.length)
    (hyl : ∀ j, y j < Pn.length) (hoff : ∀ i, i < n → nthB M0 (y i) = false)
    (hyinj : ∀ i j, i < n → j < n → y i = y j → i = j)
    (Kk N : Nat) (hfar : ∀ i, i < n → Kk + 2 ≤ LinfDist.dist p0.1 (VolOrder.nthP Pn (y i)).1 ∧
      LinfDist.dist p0.1 (VolOrder.nthP Pn (y i)).1 < N + 2),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (40 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let sw := F.inv (K.add K.one (pwR K h (5 + 6 + 7)))
    let κ := K.add K.one (pwR K h (5 + 6 + 4))
    let w : Nat → List G → R := fun i x => K.add sw (K.mul sw (f0 i x))
    let a : Nat → R := fun i => E K O F (ZxH K O H w (VolOrder.Ms M0 y i) Ob) (ZxH K O H w (VolOrder.Ms M0 y i) (fun _ => K.one))
    let C := K.mul h (K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) (4 * (2 * 4) + 4 * (2 * 4))))
      (pwR K (K.add K.one (pwR K h (5 + 1))) (4 * (2 * 4) + 4 * (2 * 4))))
    let s := 4 * 4 * 5 ^ p0.1.length
    let r := K.mul (pwR K h (6 + 1)) (natR K (3 ^ p0.1.length))
    let T := K.mul (K.mul (K.mul κ C) (natR K s)) (Geom.tail K r Kk N)
    O.le (K.neg T) (K.add (a n) (K.neg (a 0))) ∧ O.le (K.add (a n) (K.neg (a 0))) T ∧
      O.le (K.mul (K.add K.one (K.neg r)) T) (K.mul (K.mul (K.mul κ C) (natR K s)) (pwR K r Kk)))
    ∧ (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (40 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h (5 + 6 + 7)))
    let κ := K.add K.one (pwR K h (5 + 6 + 4))
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h (5 + 6 + 1))) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) := by
  obtain ⟨k0, hk30, hk0⟩ := Cover08T8B.cover08T8 K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, hk30, fun jj => GapBothBoxD4.both_box_d4 K O F H DH h1 h10 h hh h0 _ (hk0 jj)⟩

end GapBothBoxFlow08B

#print axioms GapBothBoxFlow08B.both_box_flow08B

ym/GapBothBoxFlow08J.lean

lean_all/ym/GapBothBoxFlow08J.lean

/-
  ym/GapBothBoxFlow08J — T45, G34: Z⁴, β ∈ [0,8], every truncation 40 + m: the flow enters Cone(2⁻⁸) at some step k₀ ≤ 30
  (Cover08T8B), and for every j the weight after k₀ + j steps has the box-order Cauchy estimate and clustering with decay
  2^{-(7+16j)} (FlowAfterJ.after_k): the lattice mass grows linearly along the flow. Lean 4 core only, no axioms.
-/
import ym.FlowAfterJ
import ym.Cover08T8B

namespace GapBothBoxFlow08J

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **Z⁴, β ∈ [0,8], every truncation:** ∃ k₀ ≤ 30, ∀ j, BoxBoth j at step k₀ + j (decay 2^{-(7+16j)}). -/
theorem both_box_flow08J (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (cN K 4)) (mm : Nat) :
    ∃ k0, k0 ≤ 30 ∧ ∀ j, FlowAfterJ.BoxBoth K O F H h j
      (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (40 + mm) 11).tail (k0 + j)) := by
  obtain ⟨k0, hk, hk0⟩ := Cover08T8B.cover08T8 K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, hk, fun j => FlowAfterJ.after_k K O F H DH h1 h10 h hh h0 10 _ k0 (hk0 0) j⟩

end GapBothBoxFlow08J

#print axioms GapBothBoxFlow08J.both_box_flow08J

ym/GapBothBoxFlow08JR.lean

lean_all/ym/GapBothBoxFlow08JR.lean

/-
  ym/GapBothBoxFlow08JR — T45, G40: Z⁴, every β ∈ [0,8], every truncation 40 + m: there is k₀ ≤ 30 such that for every j
  the flowed weight after k₀ + j Migdal steps is reflection positive (on unit quaternions, any normalisation s ≥ 0) AND
  has the box-order Cauchy estimate and clustering with decay 2^{-(7+16j)}. Lean 4 core only, no axioms.
-/
import ym.GapBothBoxFlow08J
import ym.RPFlow

namespace GapBothBoxFlow08JR

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **β ∈ [0,8]: reflection positivity + Cauchy estimate + clustering (decay 2^{-(7+16j)}) for one flowed weight.** -/
theorem both_rp_flow08J (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (cN K 4)) (mm : Nat) :
    ∃ k0, k0 ≤ 30 ∧ ∀ j,
      FlowAfterJ.BoxBoth K O F H h j (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (40 + mm) 11).tail (k0 + j)) ∧
      ∀ (Fx : CxPair.SU R → R) (xs : List (CxPair.SU R)), (∀ x, memL x xs → CxPair.snrm K x = K.one) →
        ∀ s, O.le K.zero s → O.le K.zero (RPDot.Q K Fx xs (fun x y => K.add s (K.mul s
          (SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (40 + mm) 11).tail (k0 + j))
            (fun n => RPDot.chiK K n x y))))) := by
  obtain ⟨k0, hk, hk0⟩ := Cover08T8B.cover08T8 K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, hk, fun j => ⟨FlowAfterJ.after_k K O F H DH h1 h10 h hh h0 10 _ k0 (hk0 0) j,
    fun Fx xs hu s hs => RPFlow.rp_of_cone K O F h1 h10 _ _ (hk0 j) Fx xs hu s hs⟩⟩

end GapBothBoxFlow08JR

#print axioms GapBothBoxFlow08JR.both_rp_flow08J

ym/GapBothBoxFlow16.lean

lean_all/ym/GapBothBoxFlow16.lean

/-
  ym/GapBothBoxFlow16 — T45, G22: Z⁴, β ∈ [0,16], every truncation 60 + m: one flowed weight with the box-order Cauchy
  estimate and clustering (GapBothBoxD4 + Cover16T8): every β ∈ [0, 4] and every truncation 60 + m: from one Migdal step k₀ on, the SAME flowed
  SU(2) plaquette weight has both the uniform infinite-volume Cauchy estimate (CauchyCone8) and exponential clustering
  in every finite volume (GapCone8). Lean 4 core only, no axioms.
-/
import ym.GapBothBoxD4
import ym.Cover16T8

namespace GapBothBoxFlow16

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **Z⁴, β ∈ [0,16], every truncation**: from one Migdal step on, one weight with the box-order infinite-volume Cauchy estimate and clustering. -/
theorem both_box_flow16 (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (cN K 8)) (mm : Nat) :
    ∃ k0, ∀ jj,
    (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 : Pq)
    (tr : Nat → List G → R) (Ob : List G → R) (K1 : R)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Ob)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Ob)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.one K1) (hUpb : ∀ x, O.le (K.neg K1) (Ob x) ∧ O.le (Ob x) K1)
    (hp0 : p0.1.length = 4)
    (n : Nat) (y : Nat → Nat) (M0 : List Bool) (hM0 : M0.length = Pn.length)
    (hyl : ∀ j, y j < Pn.length) (hoff : ∀ i, i < n → nthB M0 (y i) = false)
    (hyinj : ∀ i j, i < n → j < n → y i = y j → i = j)
    (Kk N : Nat) (hfar : ∀ i, i < n → Kk + 2 ≤ LinfDist.dist p0.1 (VolOrder.nthP Pn (y i)).1 ∧
      LinfDist.dist p0.1 (VolOrder.nthP Pn (y i)).1 < N + 2),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (60 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let sw := F.inv (K.add K.one (pwR K h (5 + 6 + 7)))
    let κ := K.add K.one (pwR K h (5 + 6 + 4))
    let w : Nat → List G → R := fun i x => K.add sw (K.mul sw (f0 i x))
    let a : Nat → R := fun i => E K O F (ZxH K O H w (VolOrder.Ms M0 y i) Ob) (ZxH K O H w (VolOrder.Ms M0 y i) (fun _ => K.one))
    let C := K.mul h (K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) (4 * (2 * 4) + 4 * (2 * 4))))
      (pwR K (K.add K.one (pwR K h (5 + 1))) (4 * (2 * 4) + 4 * (2 * 4))))
    let s := 4 * 4 * 5 ^ p0.1.length
    let r := K.mul (pwR K h (6 + 1)) (natR K (3 ^ p0.1.length))
    let T := K.mul (K.mul (K.mul κ C) (natR K s)) (Geom.tail K r Kk N)
    O.le (K.neg T) (K.add (a n) (K.neg (a 0))) ∧ O.le (K.add (a n) (K.neg (a 0))) T ∧
      O.le (K.mul (K.add K.one (K.neg r)) T) (K.mul (K.mul (K.mul κ C) (natR K s)) (pwR K r Kk)))
    ∧ (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (60 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h (5 + 6 + 7)))
    let κ := K.add K.one (pwR K h (5 + 6 + 4))
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h (5 + 6 + 1))) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) := by
  obtain ⟨k0, hk0⟩ := Cover16T8.cover16T8 K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, fun jj => GapBothBoxD4.both_box_d4 K O F H DH h1 h10 h hh h0 _ (hk0 jj)⟩

end GapBothBoxFlow16

#print axioms GapBothBoxFlow16.both_box_flow16

ym/GapBothBoxFlow16B.lean

lean_all/ym/GapBothBoxFlow16B.lean

/-
  ym/GapBothBoxFlow16B — T45, G22: Z⁴, β ∈ [0,16], every truncation 60 + m: one flowed weight with the box-order Cauchy
  estimate and clustering (GapBothBoxD4 + Cover16T8B: k₀ ≤ 35): every β ∈ [0, 4] and every truncation 60 + m: from one Migdal step k₀ on, the SAME flowed
  SU(2) plaquette weight has both the uniform infinite-volume Cauchy estimate (CauchyCone8) and exponential clustering
  in every finite volume (GapCone8). Lean 4 core only, no axioms.
-/
import ym.GapBothBoxD4
import ym.Cover16T8B

namespace GapBothBoxFlow16B

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **Z⁴, β ∈ [0,16], every truncation**: from one Migdal step on, one weight with the box-order infinite-volume Cauchy estimate and clustering. -/
theorem both_box_flow16B (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (cN K 8)) (mm : Nat) :
    ∃ k0, k0 ≤ 35 ∧ ∀ jj,
    (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 : Pq)
    (tr : Nat → List G → R) (Ob : List G → R) (K1 : R)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Ob)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Ob)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.one K1) (hUpb : ∀ x, O.le (K.neg K1) (Ob x) ∧ O.le (Ob x) K1)
    (hp0 : p0.1.length = 4)
    (n : Nat) (y : Nat → Nat) (M0 : List Bool) (hM0 : M0.length = Pn.length)
    (hyl : ∀ j, y j < Pn.length) (hoff : ∀ i, i < n → nthB M0 (y i) = false)
    (hyinj : ∀ i j, i < n → j < n → y i = y j → i = j)
    (Kk N : Nat) (hfar : ∀ i, i < n → Kk + 2 ≤ LinfDist.dist p0.1 (VolOrder.nthP Pn (y i)).1 ∧
      LinfDist.dist p0.1 (VolOrder.nthP Pn (y i)).1 < N + 2),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (60 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let sw := F.inv (K.add K.one (pwR K h (5 + 6 + 7)))
    let κ := K.add K.one (pwR K h (5 + 6 + 4))
    let w : Nat → List G → R := fun i x => K.add sw (K.mul sw (f0 i x))
    let a : Nat → R := fun i => E K O F (ZxH K O H w (VolOrder.Ms M0 y i) Ob) (ZxH K O H w (VolOrder.Ms M0 y i) (fun _ => K.one))
    let C := K.mul h (K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) (4 * (2 * 4) + 4 * (2 * 4))))
      (pwR K (K.add K.one (pwR K h (5 + 1))) (4 * (2 * 4) + 4 * (2 * 4))))
    let s := 4 * 4 * 5 ^ p0.1.length
    let r := K.mul (pwR K h (6 + 1)) (natR K (3 ^ p0.1.length))
    let T := K.mul (K.mul (K.mul κ C) (natR K s)) (Geom.tail K r Kk N)
    O.le (K.neg T) (K.add (a n) (K.neg (a 0))) ∧ O.le (K.add (a n) (K.neg (a 0))) T ∧
      O.le (K.mul (K.add K.one (K.neg r)) T) (K.mul (K.mul (K.mul κ C) (natR K s)) (pwR K r Kk)))
    ∧ (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (60 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h (5 + 6 + 7)))
    let κ := K.add K.one (pwR K h (5 + 6 + 4))
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h (5 + 6 + 1))) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) := by
  obtain ⟨k0, hk35, hk0⟩ := Cover16T8B.cover16T8 K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, hk35, fun jj => GapBothBoxD4.both_box_d4 K O F H DH h1 h10 h hh h0 _ (hk0 jj)⟩

end GapBothBoxFlow16B

#print axioms GapBothBoxFlow16B.both_box_flow16B

ym/GapBothBoxFlow16J.lean

lean_all/ym/GapBothBoxFlow16J.lean

/-
  ym/GapBothBoxFlow16J — T45, G34: Z⁴, β ∈ [0,16], every truncation 60 + m: the flow enters Cone(2⁻⁸) at some step k₀ ≤ 35
  (Cover16T8B), and for every j the weight after k₀ + j steps has the box-order Cauchy estimate and clustering with decay
  2^{-(7+16j)} (FlowAfterJ.after_k): the lattice mass grows linearly along the flow. Lean 4 core only, no axioms.
-/
import ym.FlowAfterJ
import ym.Cover16T8B

namespace GapBothBoxFlow16J

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **Z⁴, β ∈ [0,16], every truncation:** ∃ k₀ ≤ 35, ∀ j, BoxBoth j at step k₀ + j (decay 2^{-(7+16j)}). -/
theorem both_box_flow16J (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (cN K 8)) (mm : Nat) :
    ∃ k0, k0 ≤ 35 ∧ ∀ j, FlowAfterJ.BoxBoth K O F H h j
      (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (60 + mm) 11).tail (k0 + j)) := by
  obtain ⟨k0, hk, hk0⟩ := Cover16T8B.cover16T8 K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, hk, fun j => FlowAfterJ.after_k K O F H DH h1 h10 h hh h0 10 _ k0 (hk0 0) j⟩

end GapBothBoxFlow16J

#print axioms GapBothBoxFlow16J.both_box_flow16J

ym/GapBothBoxFlow16JR.lean

lean_all/ym/GapBothBoxFlow16JR.lean

/-
  ym/GapBothBoxFlow16JR — T45, G40: Z⁴, every β ∈ [0,16], every truncation 60 + m: there is k₀ ≤ 35 such that for every j
  the flowed weight after k₀ + j Migdal steps is reflection positive (on unit quaternions, any normalisation s ≥ 0) AND
  has the box-order Cauchy estimate and clustering with decay 2^{-(7+16j)}. Lean 4 core only, no axioms.
-/
import ym.GapBothBoxFlow16J
import ym.RPFlow

namespace GapBothBoxFlow16JR

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **β ∈ [0,16]: reflection positivity + Cauchy estimate + clustering (decay 2^{-(7+16j)}) for one flowed weight.** -/
theorem both_rp_flow16J (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (cN K 8)) (mm : Nat) :
    ∃ k0, k0 ≤ 35 ∧ ∀ j,
      FlowAfterJ.BoxBoth K O F H h j (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (60 + mm) 11).tail (k0 + j)) ∧
      ∀ (Fx : CxPair.SU R → R) (xs : List (CxPair.SU R)), (∀ x, memL x xs → CxPair.snrm K x = K.one) →
        ∀ s, O.le K.zero s → O.le K.zero (RPDot.Q K Fx xs (fun x y => K.add s (K.mul s
          (SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (60 + mm) 11).tail (k0 + j))
            (fun n => RPDot.chiK K n x y))))) := by
  obtain ⟨k0, hk, hk0⟩ := Cover16T8B.cover16T8 K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, hk, fun j => ⟨FlowAfterJ.after_k K O F H DH h1 h10 h hh h0 10 _ k0 (hk0 0) j,
    fun Fx xs hu s hs => RPFlow.rp_of_cone K O F h1 h10 _ _ (hk0 j) Fx xs hu s hs⟩⟩

end GapBothBoxFlow16JR

#print axioms GapBothBoxFlow16JR.both_rp_flow16J

ym/GapBothBoxFlow32JR.lean

lean_all/ym/GapBothBoxFlow32JR.lean

/-
  ym/GapBothBoxFlow32JR — T45, G26: Z⁴, every β ∈ [0,32], every truncation 160 + m: there is k₀ such that for every j
  the flowed weight after k₀ + j Migdal steps is reflection positive AND has the box-order Cauchy estimate and clustering
  with decay 2^{-(7+16j)}. Lean 4 core only, no axioms. (Built on Kamiak after Cover32T8.)
-/
import ym.Cover32T8
import ym.FlowAfterJ
import ym.RPFlow

namespace GapBothBoxFlow32JR

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

theorem both_rp_flow32J (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (cN K 16)) (mm : Nat) :
    ∃ k0, ∀ j,
      FlowAfterJ.BoxBoth K O F H h j (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (160 + mm) 11).tail (k0 + j)) ∧
      ∀ (Fx : CxPair.SU R → R) (xs : List (CxPair.SU R)), (∀ x, memL x xs → CxPair.snrm K x = K.one) →
        ∀ s, O.le K.zero s → O.le K.zero (RPDot.Q K Fx xs (fun x y => K.add s (K.mul s
          (SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (160 + mm) 11).tail (k0 + j))
            (fun n => RPDot.chiK K n x y))))) := by
  obtain ⟨k0, hk0⟩ := Cover32T8.cover32T8 K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, fun j => ⟨FlowAfterJ.after_k K O F H DH h1 h10 h hh h0 10 _ k0 (hk0 0) j,
    fun Fx xs hu s hs => RPFlow.rp_of_cone K O F h1 h10 _ _ (hk0 j) Fx xs hu s hs⟩⟩

end GapBothBoxFlow32JR

#print axioms GapBothBoxFlow32JR.both_rp_flow32J

ym/GapBothBoxFlow64JR.lean

lean_all/ym/GapBothBoxFlow64JR.lean

/-
  ym/GapBothBoxFlow64JR — T45, G75: Z⁴, every β ∈ [0, 64], every truncation 320 + m: there is k₀ such that for every j
  the flowed weight after k₀ + j Migdal steps is reflection positive AND has the box-order Cauchy estimate and clustering
  with decay 2^{-(7+16j)}. Lean 4 core only, no axioms. (Built on Kamiak after Cover64T8.)
-/
import ym.Cover64T8
import ym.FlowAfterJ
import ym.RPFlow

namespace GapBothBoxFlow64JR

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

theorem both_rp_flow64J (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (cN K 32)) (mm : Nat) :
    ∃ k0, ∀ j,
      FlowAfterJ.BoxBoth K O F H h j (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (320 + mm) 11).tail (k0 + j)) ∧
      ∀ (Fx : CxPair.SU R → R) (xs : List (CxPair.SU R)), (∀ x, memL x xs → CxPair.snrm K x = K.one) →
        ∀ s, O.le K.zero s → O.le K.zero (RPDot.Q K Fx xs (fun x y => K.add s (K.mul s
          (SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (320 + mm) 11).tail (k0 + j))
            (fun n => RPDot.chiK K n x y))))) := by
  obtain ⟨k0, hk0⟩ := Cover64T8.cover64T8 K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, fun j => ⟨FlowAfterJ.after_k K O F H DH h1 h10 h hh h0 10 _ k0 (hk0 0) j,
    fun Fx xs hu s hs => RPFlow.rp_of_cone K O F h1 h10 _ _ (hk0 j) Fx xs hu s hs⟩⟩

end GapBothBoxFlow64JR

#print axioms GapBothBoxFlow64JR.both_rp_flow64J

ym/GapBothBoxJ.lean

lean_all/ym/GapBothBoxJ.lean

/-
  ym/GapBothBoxJ — T45, G33: Z⁴, flow started in Cone(2⁻⁸): after j Migdal steps the SAME weight has the box-order
  infinite-volume Cauchy estimate and clustering, k = 5, clustering exponent ad = 6 + 16j (decay 2^{-(7+16j)});
  hr1 from R7.r7_le and h^{7+16j} ≤ h⁷. Lean 4 core only, no axioms.
-/
import ym.GapBothJ
import ym.CauchyBoxJ
import ym.R7

set_option linter.unusedVariables false

namespace GapBothBoxJ

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **Z⁴, after j Migdal steps from Cone(2⁻⁸)**: box-order Cauchy estimate and clustering with decay 2^{-(7+16j)}. -/
theorem both_box_flow_d4_j (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (a0 : List R) (ha0 : ConeBound.Bd K O (pwR K h 8) 0 (K.one :: a0)) (Lm j : Nat) :
    (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 : Pq)
    (tr : Nat → List G → R) (Ob : List G → R) (K1 : R)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Ob)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Ob)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.one K1) (hUpb : ∀ x, O.le (K.neg K1) (Ob x) ∧ O.le (Ob x) K1)
    (hp0 : p0.1.length = 4)
    (n : Nat) (y : Nat → Nat) (M0 : List Bool) (hM0 : M0.length = Pn.length)
    (hyl : ∀ j, y j < Pn.length) (hoff : ∀ i, i < n → nthB M0 (y i) = false)
    (hyinj : ∀ i j, i < n → j < n → y i = y j → i = j)
    (Kk N : Nat) (hfar : ∀ i, i < n → Kk + 2 ≤ LinfDist.dist p0.1 (VolOrder.nthP Pn (y i)).1 ∧
      LinfDist.dist p0.1 (VolOrder.nthP Pn (y i)).1 < N + 2),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F Lm a0 j) (ChiBound.c K (tr i x))
    let sw := F.inv (K.add K.one (pwR K h (5 + (6 + 16 * j) + 7)))
    let κ := K.add K.one (pwR K h (5 + (6 + 16 * j) + 4))
    let w : Nat → List G → R := fun i x => K.add sw (K.mul sw (f0 i x))
    let a : Nat → R := fun i => E K O F (ZxH K O H w (VolOrder.Ms M0 y i) Ob) (ZxH K O H w (VolOrder.Ms M0 y i) (fun _ => K.one))
    let C := K.mul h (K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) (4 * (2 * 4) + 4 * (2 * 4))))
      (pwR K (K.add K.one (pwR K h (5 + 1))) (4 * (2 * 4) + 4 * (2 * 4))))
    let s := 4 * 4 * 5 ^ p0.1.length
    let r := K.mul (pwR K h (6 + 16 * j + 1)) (natR K (3 ^ p0.1.length))
    let T := K.mul (K.mul (K.mul κ C) (natR K s)) (Geom.tail K r Kk N)
    O.le (K.neg T) (K.add (a n) (K.neg (a 0))) ∧ O.le (K.add (a n) (K.neg (a 0))) T ∧
      O.le (K.mul (K.add K.one (K.neg r)) T) (K.mul (K.mul (K.mul κ C) (natR K s)) (pwR K r Kk)))
    ∧ (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F Lm a0 j) (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h (5 + (6 + 16 * j) + 7)))
    let κ := K.add K.one (pwR K h (5 + (6 + 16 * j) + 4))
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h (5 + (6 + 16 * j) + 1))) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) := by
  have hka : 5 + (6 + 16 * j) + 7 ≤ 16 * j + 29 := by lib_nat_le
  have hd8' : 4 * (2 * 4) ≤ 2 ^ (5 + (6 + 16 * j)) :=
    Nat.le_trans (by decide) (GapBothJ.pow2_le_add 5 (6 + 16 * j))
  have e : 5 + (6 + 16 * j) + 2 = 7 + (6 + 16 * j) := by lib_nat
  have hd16 : 2 * (4 * (2 * 4) + 1) ≤ 2 ^ (5 + (6 + 16 * j) + 2) := by
    rw [e]; exact Nat.le_trans (by decide) (GapBothJ.pow2_le_add 7 (6 + 16 * j))
  have hcf := MigdalDecay.mk_decay K O F h1 h10 h hh h0 a0 ha0 Lm j
  refine ⟨fun LL hLL hL Pn hnd hv p0 tr Ob K1 htd hUp hta hUpa htr hK1 hUpb hp0 n y M0 hM0 hyl hoff hyinj Kk N hfar => ?_,
    (GapBothJ.both_of_coneJ K O F H 4 5 (6 + 16 * j) j hka (by decide) hd8' hd16 DH h1 h10 h hh h0 _ hcf).2⟩
  have hl := GapInputs.hle_one K O h1 h hh h0
  have hr1 : O.le (K.mul (pwR K h (6 + 16 * j + 1)) (natR K (3 ^ p0.1.length))) K.one := by
    rw [hp0]
    have m := ConeBound.pw_anti K O h1 h h0 hl (6 + 16 * j + 1) 7 (by lib_nat_le)
    have n0 : O.le K.zero (natR K (3 ^ 4)) := Geom.natR_nn K O h1 _
    exact O.le_trans _ _ _ (O.mul_le_mul_right _ _ _ m n0) (R7.r7_le K O h1 h hh h0)
  exact CauchyBoxJ.cauchy_boxJ K O F H 4 5 (6 + 16 * j) j hka (by decide) hd16 DH h1 h10 h hh h0 LL hLL hL Pn hnd hv p0 _ hcf
    tr Ob K1 htd hUp hta hUpa htr hK1 hUpb hp0 n y M0 hM0 hyl hoff hyinj Kk N hfar hr1

end GapBothBoxJ

#print axioms GapBothBoxJ.both_box_flow_d4_j

ym/GapBothD4.lean

lean_all/ym/GapBothD4.lean

/-
  ym/GapBothD4 — T45, G21 (d = 4, k = 5, a = 6 fixed; numeric side conditions discharged): every β ∈ [0, 4] and every truncation 29 + m: from one Migdal step k₀ on, the SAME flowed
  SU(2) plaquette weight has both the uniform infinite-volume Cauchy estimate (CauchyCone8) and exponential clustering
  in every finite volume (GapCone8). Lean 4 core only, no axioms.
-/
import ym.GapCone8
import ym.GapBothGen

namespace GapBothD4

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **Z⁴, decay 2⁻⁷**: Cone(2⁻⁸) coefficients ⇒ Cauchy estimate and clustering for one weight. -/
theorem both_d4 (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (cf : List R) (hcf : ConeBound.Bd K O (pwR K h 8) 0 (K.one :: cf)) :
    (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 : Pq)
    (tr : Nat → List G → R) (Ob : List G → R) (K1 : R)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Ob)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Ob)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.one K1) (hUpb : ∀ x, O.le (K.neg K1) (Ob x) ∧ O.le (Ob x) K1)
    (n : Nat) (y : Nat → Nat) (q : Nat → Pq) (sh : Nat → Nat) (Ms : Nat → List Bool)
    (hMs : ∀ i, Ms (i + 1) = upd (Ms i) (y i) true)
    (hlen : ∀ i, i < n → (Ms i).length = Pn.length) (hyl : ∀ i, i < n → y i < (Ms i).length)
    (hyM : ∀ i, i < n → nthB (Ms i) (y i) = false)
    (hpq : ∀ i, i < n → disjN (vec LL p0) (vec LL (q i)))
    (hq : ∀ i, i < n → nthL (Pn.map (vec LL)) (y i) = vec LL (q i))
    (hdist : ∀ i, i < n → ¬ dcl (sh (y i) + 1) p0.1 (q i).1)
    (Kk N : Nat) (hsh : ∀ i, i < n → Kk ≤ sh (y i) ∧ sh (y i) < N)
    (plaq : Nat → Pq) (hndy : nodupL ((ShellSum.rng n).map y))
    (hshell : ∀ kk z, memL z ((ShellSum.rng n).map y) → sh z = kk → (plaq z).1.length = p0.1.length ∧
      dcl (kk + 2) p0.1 (plaq z).1 ∧ (plaq z).2.1 < (plaq z).2.2 ∧ (plaq z).2.2 < 4)
    (hinj : ∀ z z', memL z ((ShellSum.rng n).map y) → memL z' ((ShellSum.rng n).map y) → plaq z = plaq z' → z = z')
    (hr1 : O.le (K.mul (pwR K h (6 + 1)) (natR K (3 ^ p0.1.length))) K.one),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 cf (ChiBound.c K (tr i x))
    let sw := F.inv (K.add K.one (pwR K h (5 + 6 + 7)))
    let κ := K.add K.one (pwR K h (5 + 6 + 4))
    let w : Nat → List G → R := fun i x => K.add sw (K.mul sw (f0 i x))
    let a : Nat → R := fun i => E K O F (ZxH K O H w (Ms i) Ob) (ZxH K O H w (Ms i) (fun _ => K.one))
    let C := K.mul h (K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) (4 * (2 * 4) + 4 * (2 * 4))))
      (pwR K (K.add K.one (pwR K h (5 + 1))) (4 * (2 * 4) + 4 * (2 * 4))))
    let s := 4 * 4 * 5 ^ p0.1.length
    let r := K.mul (pwR K h (6 + 1)) (natR K (3 ^ p0.1.length))
    let T := K.mul (K.mul (K.mul κ C) (natR K s)) (Geom.tail K r Kk N)
    O.le (K.neg T) (K.add (a n) (K.neg (a 0))) ∧ O.le (K.add (a n) (K.neg (a 0))) T ∧
      O.le (K.mul (K.add K.one (K.neg r)) T) (K.mul (K.mul (K.mul κ C) (natR K s)) (pwR K r Kk)))
    ∧ (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 cf (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h (5 + 6 + 7)))
    let κ := K.add K.one (pwR K h (5 + 6 + 4))
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h (5 + 6 + 1))) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) := by
  exact GapBothGen.both_of_cone8 K O F H 4 5 6 (by decide) (by decide) (by decide) (by decide) DH h1 h10 h hh h0 cf hcf

end GapBothD4

#print axioms GapBothD4.both_d4

ym/GapBothFlow04.lean

lean_all/ym/GapBothFlow04.lean

/-
  ym/GapBothFlow04 — T45, G20: every β ∈ [0, 4] and every truncation 29 + m: from one Migdal step k₀ on, the SAME flowed
  SU(2) plaquette weight has both the uniform infinite-volume Cauchy estimate (CauchyCone8) and exponential clustering
  in every finite volume (GapCone8). Lean 4 core only, no axioms.
-/
import ym.GapBothGen
import ym.Cover04T8

namespace GapBothFlow04

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **β ∈ [0,4], every truncation: one flowed weight with the Cauchy estimate and clustering.** -/
theorem both_flow04 (d k ad : Nat) (hka : k + ad + 7 ≤ 29) (hd8 : 4 * (2 * d) ≤ 2 ^ k) (hd8' : 4 * (2 * d) ≤ 2 ^ (k + ad))
    (hd16 : 2 * (4 * (2 * d) + 1) ≤ 2 ^ (k + ad + 2))
    (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (cN K 2)) (mm : Nat) :
    ∃ k0, ∀ jj,
    (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 : Pq)
    (tr : Nat → List G → R) (Ob : List G → R) (K1 : R)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Ob)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Ob)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.one K1) (hUpb : ∀ x, O.le (K.neg K1) (Ob x) ∧ O.le (Ob x) K1)
    (n : Nat) (y : Nat → Nat) (q : Nat → Pq) (sh : Nat → Nat) (Ms : Nat → List Bool)
    (hMs : ∀ i, Ms (i + 1) = upd (Ms i) (y i) true)
    (hlen : ∀ i, i < n → (Ms i).length = Pn.length) (hyl : ∀ i, i < n → y i < (Ms i).length)
    (hyM : ∀ i, i < n → nthB (Ms i) (y i) = false)
    (hpq : ∀ i, i < n → disjN (vec LL p0) (vec LL (q i)))
    (hq : ∀ i, i < n → nthL (Pn.map (vec LL)) (y i) = vec LL (q i))
    (hdist : ∀ i, i < n → ¬ dcl (sh (y i) + 1) p0.1 (q i).1)
    (Kk N : Nat) (hsh : ∀ i, i < n → Kk ≤ sh (y i) ∧ sh (y i) < N)
    (plaq : Nat → Pq) (hndy : nodupL ((ShellSum.rng n).map y))
    (hshell : ∀ kk z, memL z ((ShellSum.rng n).map y) → sh z = kk → (plaq z).1.length = p0.1.length ∧
      dcl (kk + 2) p0.1 (plaq z).1 ∧ (plaq z).2.1 < (plaq z).2.2 ∧ (plaq z).2.2 < d)
    (hinj : ∀ z z', memL z ((ShellSum.rng n).map y) → memL z' ((ShellSum.rng n).map y) → plaq z = plaq z' → z = z')
    (hr1 : O.le (K.mul (pwR K h (ad + 1)) (natR K (3 ^ p0.1.length))) K.one),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (29 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let sw := F.inv (K.add K.one (pwR K h (k + ad + 7)))
    let κ := K.add K.one (pwR K h (k + ad + 4))
    let w : Nat → List G → R := fun i x => K.add sw (K.mul sw (f0 i x))
    let a : Nat → R := fun i => E K O F (ZxH K O H w (Ms i) Ob) (ZxH K O H w (Ms i) (fun _ => K.one))
    let C := K.mul h (K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) (4 * (2 * d) + 4 * (2 * d))))
      (pwR K (K.add K.one (pwR K h (k + 1))) (4 * (2 * d) + 4 * (2 * d))))
    let s := d * d * 5 ^ p0.1.length
    let r := K.mul (pwR K h (ad + 1)) (natR K (3 ^ p0.1.length))
    let T := K.mul (K.mul (K.mul κ C) (natR K s)) (Geom.tail K r Kk N)
    O.le (K.neg T) (K.add (a n) (K.neg (a 0))) ∧ O.le (K.add (a n) (K.neg (a 0))) T ∧
      O.le (K.mul (K.add K.one (K.neg r)) T) (K.mul (K.mul (K.mul κ C) (natR K s)) (pwR K r Kk)))
    ∧ (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (29 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h (k + ad + 7)))
    let κ := K.add K.one (pwR K h (k + ad + 4))
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h (k + ad + 1))) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) := by
  obtain ⟨k0, hk0⟩ := Cover04T8.cover04T8 K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, fun jj => GapBothGen.both_of_cone8 K O F H d k ad hka hd8 hd8' hd16 DH h1 h10 h hh h0 _ (hk0 jj)⟩

end GapBothFlow04

#print axioms GapBothFlow04.both_flow04

ym/GapBothFlow08.lean

lean_all/ym/GapBothFlow08.lean

/-
  ym/GapBothFlow08 — T45: every β ∈ [0, 8] and every truncation 40 + m: from one Migdal step k₀ on, the same flowed SU(2)
  plaquette weight has the uniform infinite-volume Cauchy estimate and exponential clustering (GapBothGen.both_of_cone8
  with Cover08T8.cover08T8). Lean 4 core only, no axioms.
-/
import ym.GapBothFlow04
import ym.Cover08T8

namespace GapBothFlow08

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **β ∈ [0,8], every truncation: one flowed weight with the Cauchy estimate and clustering.** -/
theorem both_flow08 (d k ad : Nat) (hka : k + ad + 7 ≤ 29) (hd8 : 4 * (2 * d) ≤ 2 ^ k) (hd8' : 4 * (2 * d) ≤ 2 ^ (k + ad))
    (hd16 : 2 * (4 * (2 * d) + 1) ≤ 2 ^ (k + ad + 2))
    (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (cN K 4)) (mm : Nat) :
    ∃ k0, ∀ jj,
    (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 : Pq)
    (tr : Nat → List G → R) (Ob : List G → R) (K1 : R)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Ob)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Ob)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.one K1) (hUpb : ∀ x, O.le (K.neg K1) (Ob x) ∧ O.le (Ob x) K1)
    (n : Nat) (y : Nat → Nat) (q : Nat → Pq) (sh : Nat → Nat) (Ms : Nat → List Bool)
    (hMs : ∀ i, Ms (i + 1) = upd (Ms i) (y i) true)
    (hlen : ∀ i, i < n → (Ms i).length = Pn.length) (hyl : ∀ i, i < n → y i < (Ms i).length)
    (hyM : ∀ i, i < n → nthB (Ms i) (y i) = false)
    (hpq : ∀ i, i < n → disjN (vec LL p0) (vec LL (q i)))
    (hq : ∀ i, i < n → nthL (Pn.map (vec LL)) (y i) = vec LL (q i))
    (hdist : ∀ i, i < n → ¬ dcl (sh (y i) + 1) p0.1 (q i).1)
    (Kk N : Nat) (hsh : ∀ i, i < n → Kk ≤ sh (y i) ∧ sh (y i) < N)
    (plaq : Nat → Pq) (hndy : nodupL ((ShellSum.rng n).map y))
    (hshell : ∀ kk z, memL z ((ShellSum.rng n).map y) → sh z = kk → (plaq z).1.length = p0.1.length ∧
      dcl (kk + 2) p0.1 (plaq z).1 ∧ (plaq z).2.1 < (plaq z).2.2 ∧ (plaq z).2.2 < d)
    (hinj : ∀ z z', memL z ((ShellSum.rng n).map y) → memL z' ((ShellSum.rng n).map y) → plaq z = plaq z' → z = z')
    (hr1 : O.le (K.mul (pwR K h (ad + 1)) (natR K (3 ^ p0.1.length))) K.one),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (40 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let sw := F.inv (K.add K.one (pwR K h (k + ad + 7)))
    let κ := K.add K.one (pwR K h (k + ad + 4))
    let w : Nat → List G → R := fun i x => K.add sw (K.mul sw (f0 i x))
    let a : Nat → R := fun i => E K O F (ZxH K O H w (Ms i) Ob) (ZxH K O H w (Ms i) (fun _ => K.one))
    let C := K.mul h (K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) (4 * (2 * d) + 4 * (2 * d))))
      (pwR K (K.add K.one (pwR K h (k + 1))) (4 * (2 * d) + 4 * (2 * d))))
    let s := d * d * 5 ^ p0.1.length
    let r := K.mul (pwR K h (ad + 1)) (natR K (3 ^ p0.1.length))
    let T := K.mul (K.mul (K.mul κ C) (natR K s)) (Geom.tail K r Kk N)
    O.le (K.neg T) (K.add (a n) (K.neg (a 0))) ∧ O.le (K.add (a n) (K.neg (a 0))) T ∧
      O.le (K.mul (K.add K.one (K.neg r)) T) (K.mul (K.mul (K.mul κ C) (natR K s)) (pwR K r Kk)))
    ∧ (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (40 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h (k + ad + 7)))
    let κ := K.add K.one (pwR K h (k + ad + 4))
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h (k + ad + 1))) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) := by
  obtain ⟨k0, hk0⟩ := Cover08T8.cover08T8 K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, fun jj => GapBothGen.both_of_cone8 K O F H d k ad hka hd8 hd8' hd16 DH h1 h10 h hh h0 _ (hk0 jj)⟩

end GapBothFlow08

#print axioms GapBothFlow08.both_flow08

ym/GapBothFlow16.lean

lean_all/ym/GapBothFlow16.lean

/-
  ym/GapBothFlow16 — T45: every β ∈ [0, 16] and every truncation 60 + m: from one Migdal step k₀ on, the same flowed SU(2)
  plaquette weight has the uniform infinite-volume Cauchy estimate and exponential clustering (GapBothGen.both_of_cone8
  with Cover16T8.cover16T8). Lean 4 core only, no axioms.
-/
import ym.GapBothFlow04
import ym.Cover16T8

namespace GapBothFlow16

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **β ∈ [0,16], every truncation: one flowed weight with the Cauchy estimate and clustering.** -/
theorem both_flow16 (d k ad : Nat) (hka : k + ad + 7 ≤ 29) (hd8 : 4 * (2 * d) ≤ 2 ^ k) (hd8' : 4 * (2 * d) ≤ 2 ^ (k + ad))
    (hd16 : 2 * (4 * (2 * d) + 1) ≤ 2 ^ (k + ad + 2))
    (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (cN K 8)) (mm : Nat) :
    ∃ k0, ∀ jj,
    (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 : Pq)
    (tr : Nat → List G → R) (Ob : List G → R) (K1 : R)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Ob)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Ob)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.one K1) (hUpb : ∀ x, O.le (K.neg K1) (Ob x) ∧ O.le (Ob x) K1)
    (n : Nat) (y : Nat → Nat) (q : Nat → Pq) (sh : Nat → Nat) (Ms : Nat → List Bool)
    (hMs : ∀ i, Ms (i + 1) = upd (Ms i) (y i) true)
    (hlen : ∀ i, i < n → (Ms i).length = Pn.length) (hyl : ∀ i, i < n → y i < (Ms i).length)
    (hyM : ∀ i, i < n → nthB (Ms i) (y i) = false)
    (hpq : ∀ i, i < n → disjN (vec LL p0) (vec LL (q i)))
    (hq : ∀ i, i < n → nthL (Pn.map (vec LL)) (y i) = vec LL (q i))
    (hdist : ∀ i, i < n → ¬ dcl (sh (y i) + 1) p0.1 (q i).1)
    (Kk N : Nat) (hsh : ∀ i, i < n → Kk ≤ sh (y i) ∧ sh (y i) < N)
    (plaq : Nat → Pq) (hndy : nodupL ((ShellSum.rng n).map y))
    (hshell : ∀ kk z, memL z ((ShellSum.rng n).map y) → sh z = kk → (plaq z).1.length = p0.1.length ∧
      dcl (kk + 2) p0.1 (plaq z).1 ∧ (plaq z).2.1 < (plaq z).2.2 ∧ (plaq z).2.2 < d)
    (hinj : ∀ z z', memL z ((ShellSum.rng n).map y) → memL z' ((ShellSum.rng n).map y) → plaq z = plaq z' → z = z')
    (hr1 : O.le (K.mul (pwR K h (ad + 1)) (natR K (3 ^ p0.1.length))) K.one),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (60 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let sw := F.inv (K.add K.one (pwR K h (k + ad + 7)))
    let κ := K.add K.one (pwR K h (k + ad + 4))
    let w : Nat → List G → R := fun i x => K.add sw (K.mul sw (f0 i x))
    let a : Nat → R := fun i => E K O F (ZxH K O H w (Ms i) Ob) (ZxH K O H w (Ms i) (fun _ => K.one))
    let C := K.mul h (K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) (4 * (2 * d) + 4 * (2 * d))))
      (pwR K (K.add K.one (pwR K h (k + 1))) (4 * (2 * d) + 4 * (2 * d))))
    let s := d * d * 5 ^ p0.1.length
    let r := K.mul (pwR K h (ad + 1)) (natR K (3 ^ p0.1.length))
    let T := K.mul (K.mul (K.mul κ C) (natR K s)) (Geom.tail K r Kk N)
    O.le (K.neg T) (K.add (a n) (K.neg (a 0))) ∧ O.le (K.add (a n) (K.neg (a 0))) T ∧
      O.le (K.mul (K.add K.one (K.neg r)) T) (K.mul (K.mul (K.mul κ C) (natR K s)) (pwR K r Kk)))
    ∧ (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (60 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h (k + ad + 7)))
    let κ := K.add K.one (pwR K h (k + ad + 4))
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h (k + ad + 1))) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) := by
  obtain ⟨k0, hk0⟩ := Cover16T8.cover16T8 K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, fun jj => GapBothGen.both_of_cone8 K O F H d k ad hka hd8 hd8' hd16 DH h1 h10 h hh h0 _ (hk0 jj)⟩

end GapBothFlow16

#print axioms GapBothFlow16.both_flow16

ym/GapBothGen.lean

lean_all/ym/GapBothGen.lean

/-
  ym/GapBothGen — T45, G20 (hypothesis form): every β ∈ [0, 4] and every truncation 29 + m: from one Migdal step k₀ on, the SAME flowed
  SU(2) plaquette weight has both the uniform infinite-volume Cauchy estimate (CauchyCone8) and exponential clustering
  in every finite volume (GapCone8). Lean 4 core only, no axioms.
-/
import ym.GapCone8

namespace GapBothGen

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- Cone(2⁻⁸) coefficients ⇒ Cauchy estimate and clustering for one weight. -/
theorem both_of_cone8 (d k ad : Nat) (hka : k + ad + 7 ≤ 29) (hd8 : 4 * (2 * d) ≤ 2 ^ k) (hd8' : 4 * (2 * d) ≤ 2 ^ (k + ad))
    (hd16 : 2 * (4 * (2 * d) + 1) ≤ 2 ^ (k + ad + 2))
    (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (cf : List R) (hcf : ConeBound.Bd K O (pwR K h 8) 0 (K.one :: cf)) :
    (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 : Pq)
    (tr : Nat → List G → R) (Ob : List G → R) (K1 : R)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Ob)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Ob)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.one K1) (hUpb : ∀ x, O.le (K.neg K1) (Ob x) ∧ O.le (Ob x) K1)
    (n : Nat) (y : Nat → Nat) (q : Nat → Pq) (sh : Nat → Nat) (Ms : Nat → List Bool)
    (hMs : ∀ i, Ms (i + 1) = upd (Ms i) (y i) true)
    (hlen : ∀ i, i < n → (Ms i).length = Pn.length) (hyl : ∀ i, i < n → y i < (Ms i).length)
    (hyM : ∀ i, i < n → nthB (Ms i) (y i) = false)
    (hpq : ∀ i, i < n → disjN (vec LL p0) (vec LL (q i)))
    (hq : ∀ i, i < n → nthL (Pn.map (vec LL)) (y i) = vec LL (q i))
    (hdist : ∀ i, i < n → ¬ dcl (sh (y i) + 1) p0.1 (q i).1)
    (Kk N : Nat) (hsh : ∀ i, i < n → Kk ≤ sh (y i) ∧ sh (y i) < N)
    (plaq : Nat → Pq) (hndy : nodupL ((ShellSum.rng n).map y))
    (hshell : ∀ kk z, memL z ((ShellSum.rng n).map y) → sh z = kk → (plaq z).1.length = p0.1.length ∧
      dcl (kk + 2) p0.1 (plaq z).1 ∧ (plaq z).2.1 < (plaq z).2.2 ∧ (plaq z).2.2 < d)
    (hinj : ∀ z z', memL z ((ShellSum.rng n).map y) → memL z' ((ShellSum.rng n).map y) → plaq z = plaq z' → z = z')
    (hr1 : O.le (K.mul (pwR K h (ad + 1)) (natR K (3 ^ p0.1.length))) K.one),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 cf (ChiBound.c K (tr i x))
    let sw := F.inv (K.add K.one (pwR K h (k + ad + 7)))
    let κ := K.add K.one (pwR K h (k + ad + 4))
    let w : Nat → List G → R := fun i x => K.add sw (K.mul sw (f0 i x))
    let a : Nat → R := fun i => E K O F (ZxH K O H w (Ms i) Ob) (ZxH K O H w (Ms i) (fun _ => K.one))
    let C := K.mul h (K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) (4 * (2 * d) + 4 * (2 * d))))
      (pwR K (K.add K.one (pwR K h (k + 1))) (4 * (2 * d) + 4 * (2 * d))))
    let s := d * d * 5 ^ p0.1.length
    let r := K.mul (pwR K h (ad + 1)) (natR K (3 ^ p0.1.length))
    let T := K.mul (K.mul (K.mul κ C) (natR K s)) (Geom.tail K r Kk N)
    O.le (K.neg T) (K.add (a n) (K.neg (a 0))) ∧ O.le (K.add (a n) (K.neg (a 0))) T ∧
      O.le (K.mul (K.add K.one (K.neg r)) T) (K.mul (K.mul (K.mul κ C) (natR K s)) (pwR K r Kk)))
    ∧ (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 cf (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h (k + ad + 7)))
    let κ := K.add K.one (pwR K h (k + ad + 4))
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h (k + ad + 1))) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) := by
  refine ⟨fun LL hLL hL Pn hnd hv p0 => CauchyCone8.cauchy_of_cone8 K O F H d k ad hka hd8 hd16 DH h1 h10 h hh h0
    LL hLL hL Pn hnd hv p0 _ hcf, ?_⟩
  intro LL hLL hL Pn hnd hv p0 q0 hpq
  exact GapCone8.gap_of_cone8 K O F H d k ad hka hd8' hd16 DH h1 h10 h hh h0 LL hLL hL Pn hnd hv p0 q0 hpq cf hcf

end GapBothGen

#print axioms GapBothGen.both_of_cone8

ym/GapBothJ.lean

lean_all/ym/GapBothJ.lean

/-
  ym/GapBothJ — T45, G32: Cauchy estimate and clustering for the SAME weight after j Migdal steps (Both), from
  Cone(2^{-(4j+8)}) (both_of_coneJ), and on Z⁴ for the flow started in Cone(2⁻⁸) with k = 5 and clustering exponent
  ad = 6 + 16j (both_flow_d4_j): every numeric side condition discharged, the decay rate 2^{-(7+16j)} improving with j.
  Lean 4 core only, no axioms.
-/
import ym.GapConeJ
import ym.CauchyConeJ

set_option linter.unusedVariables false

namespace GapBothJ

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

theorem pow2_le_add (a : Nat) : ∀ b, 2 ^ a ≤ 2 ^ (a + b)
  | 0 => Nat.le_refl _
  | b + 1 => by
    have e : 2 ^ (a + (b + 1)) = 2 ^ (a + b) + 2 ^ (a + b) := by
      show 2 ^ (a + b) * 2 = 2 ^ (a + b) + 2 ^ (a + b); lib_nat
    exact Nat.le_trans (pow2_le_add a b) (LibNatLe.le_of_eq_add e)

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- Cauchy estimate (abstract volume order) and finite-volume clustering for the weight built from cf. -/
@[reducible] def Both (d k ad : Nat) (h : R) (cf : List R) : Prop :=
    (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 : Pq)
    (tr : Nat → List G → R) (Ob : List G → R) (K1 : R)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Ob)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Ob)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.one K1) (hUpb : ∀ x, O.le (K.neg K1) (Ob x) ∧ O.le (Ob x) K1)
    (n : Nat) (y : Nat → Nat) (q : Nat → Pq) (sh : Nat → Nat) (Ms : Nat → List Bool)
    (hMs : ∀ i, Ms (i + 1) = upd (Ms i) (y i) true)
    (hlen : ∀ i, i < n → (Ms i).length = Pn.length) (hyl : ∀ i, i < n → y i < (Ms i).length)
    (hyM : ∀ i, i < n → nthB (Ms i) (y i) = false)
    (hpq : ∀ i, i < n → disjN (vec LL p0) (vec LL (q i)))
    (hq : ∀ i, i < n → nthL (Pn.map (vec LL)) (y i) = vec LL (q i))
    (hdist : ∀ i, i < n → ¬ dcl (sh (y i) + 1) p0.1 (q i).1)
    (Kk N : Nat) (hsh : ∀ i, i < n → Kk ≤ sh (y i) ∧ sh (y i) < N)
    (plaq : Nat → Pq) (hndy : nodupL ((ShellSum.rng n).map y))
    (hshell : ∀ kk z, memL z ((ShellSum.rng n).map y) → sh z = kk → (plaq z).1.length = p0.1.length ∧
      dcl (kk + 2) p0.1 (plaq z).1 ∧ (plaq z).2.1 < (plaq z).2.2 ∧ (plaq z).2.2 < d)
    (hinj : ∀ z z', memL z ((ShellSum.rng n).map y) → memL z' ((ShellSum.rng n).map y) → plaq z = plaq z' → z = z')
    (hr1 : O.le (K.mul (pwR K h (ad + 1)) (natR K (3 ^ p0.1.length))) K.one),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 cf (ChiBound.c K (tr i x))
    let sw := F.inv (K.add K.one (pwR K h (k + ad + 7)))
    let κ := K.add K.one (pwR K h (k + ad + 4))
    let w : Nat → List G → R := fun i x => K.add sw (K.mul sw (f0 i x))
    let a : Nat → R := fun i => E K O F (ZxH K O H w (Ms i) Ob) (ZxH K O H w (Ms i) (fun _ => K.one))
    let C := K.mul h (K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) (4 * (2 * d) + 4 * (2 * d))))
      (pwR K (K.add K.one (pwR K h (k + 1))) (4 * (2 * d) + 4 * (2 * d))))
    let s := d * d * 5 ^ p0.1.length
    let r := K.mul (pwR K h (ad + 1)) (natR K (3 ^ p0.1.length))
    let T := K.mul (K.mul (K.mul κ C) (natR K s)) (Geom.tail K r Kk N)
    O.le (K.neg T) (K.add (a n) (K.neg (a 0))) ∧ O.le (K.add (a n) (K.neg (a 0))) T ∧
      O.le (K.mul (K.add K.one (K.neg r)) T) (K.mul (K.mul (K.mul κ C) (natR K s)) (pwR K r Kk)))
    ∧ (∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 cf (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h (k + ad + 7)))
    let κ := K.add K.one (pwR K h (k + ad + 4))
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h (k + ad + 1))) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) 

/-- Cone(2^{-(4j+8)}) coefficients ⇒ Cauchy estimate and clustering, for k + ad + 7 ≤ 16j + 29. -/
theorem both_of_coneJ (d k ad j : Nat) (hka : k + ad + 7 ≤ 16 * j + 29) (hd8 : 4 * (2 * d) ≤ 2 ^ k)
    (hd8' : 4 * (2 * d) ≤ 2 ^ (k + ad)) (hd16 : 2 * (4 * (2 * d) + 1) ≤ 2 ^ (k + ad + 2))
    (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (cf : List R) (hcf : ConeBound.Bd K O (pwR K h (4 * j + 8)) 0 (K.one :: cf)) :
    Both K O F H d k ad h cf := by
  refine ⟨fun LL hLL hL Pn hnd hv p0 => CauchyConeJ.cauchy_of_coneJ K O F H d k ad j hka hd8 hd16 DH h1 h10 h hh h0
    LL hLL hL Pn hnd hv p0 _ hcf, ?_⟩
  intro LL hLL hL Pn hnd hv p0 q0 hpq
  exact GapConeJ.gap_of_coneJ K O F H d k ad j hka hd8' hd16 DH h1 h10 h hh h0 LL hLL hL Pn hnd hv p0 q0 hpq cf hcf

/-- **Z⁴, after j Migdal steps from Cone(2⁻⁸): Cauchy estimate and clustering with exponent ad = 6 + 16j.** -/
theorem both_flow_d4_j (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (a0 : List R) (ha0 : ConeBound.Bd K O (pwR K h 8) 0 (K.one :: a0)) (Lm j : Nat) :
    Both K O F H 4 5 (6 + 16 * j) h (MigdalCone.mkIt K O F Lm a0 j) := by
  have hka : 5 + (6 + 16 * j) + 7 ≤ 16 * j + 29 := by lib_nat_le
  have hd8' : 4 * (2 * 4) ≤ 2 ^ (5 + (6 + 16 * j)) :=
    Nat.le_trans (by decide) (pow2_le_add 5 (6 + 16 * j))
  have e : 5 + (6 + 16 * j) + 2 = 7 + (6 + 16 * j) := by lib_nat
  have hd16 : 2 * (4 * (2 * 4) + 1) ≤ 2 ^ (5 + (6 + 16 * j) + 2) := by
    rw [e]; exact Nat.le_trans (by decide) (pow2_le_add 7 (6 + 16 * j))
  exact both_of_coneJ K O F H 4 5 (6 + 16 * j) j hka (by decide) hd8' hd16 DH h1 h10 h hh h0 _
    (MigdalDecay.mk_decay K O F h1 h10 h hh h0 a0 ha0 Lm j)

end GapBothJ

#print axioms GapBothJ.pow2_le_add
#print axioms GapBothJ.both_of_coneJ
#print axioms GapBothJ.both_flow_d4_j

ym/GapBoxFlow04.lean

lean_all/ym/GapBoxFlow04.lean

/-
  ym/GapBoxFlow04 — T45: every β ∈ [0, 4] and every truncation 29 + m: from some Migdal step k₀ on, the flowed
  SU(2) plaquette weight lies in Cone(2⁻⁸) (Cover04T8) and satisfies the uniform infinite-volume Cauchy estimate along
  any injective filling order of far plaquettes (CauchyBox; d = 4: k = 5, a = 6). Lean 4 core only, no axioms.
-/
import ym.CauchyBox
import ym.Cover04T8

namespace GapBoxFlow04

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

theorem box_flow04 (d k ad : Nat) (hka : k + ad + 7 ≤ 29) (hd8 : 4 * (2 * d) ≤ 2 ^ k) (hd16 : 2 * (4 * (2 * d) + 1) ≤ 2 ^ (k + ad + 2))
    (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (cN K 2)) (mm : Nat) :
    ∃ k0, ∀ jj, ∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 : Pq)
    (tr : Nat → List G → R) (Ob : List G → R) (K1 : R)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Ob)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Ob)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.one K1) (hUpb : ∀ x, O.le (K.neg K1) (Ob x) ∧ O.le (Ob x) K1)
    (hp0 : p0.1.length = d)
    (n : Nat) (y : Nat → Nat) (M0 : List Bool) (hM0 : M0.length = Pn.length)
    (hyl : ∀ j, y j < Pn.length) (hoff : ∀ i, i < n → nthB M0 (y i) = false)
    (hyinj : ∀ i j, i < n → j < n → y i = y j → i = j)
    (Kk N : Nat) (hfar : ∀ i, i < n → Kk + 2 ≤ LinfDist.dist p0.1 (VolOrder.nthP Pn (y i)).1 ∧
      LinfDist.dist p0.1 (VolOrder.nthP Pn (y i)).1 < N + 2)
    (hr1 : O.le (K.mul (pwR K h (ad + 1)) (natR K (3 ^ p0.1.length))) K.one),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (29 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let sw := F.inv (K.add K.one (pwR K h (k + ad + 7)))
    let κ := K.add K.one (pwR K h (k + ad + 4))
    let w : Nat → List G → R := fun i x => K.add sw (K.mul sw (f0 i x))
    let a : Nat → R := fun i => E K O F (ZxH K O H w (VolOrder.Ms M0 y i) Ob) (ZxH K O H w (VolOrder.Ms M0 y i) (fun _ => K.one))
    let C := K.mul h (K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) (4 * (2 * d) + 4 * (2 * d))))
      (pwR K (K.add K.one (pwR K h (k + 1))) (4 * (2 * d) + 4 * (2 * d))))
    let s := d * d * 5 ^ p0.1.length
    let r := K.mul (pwR K h (ad + 1)) (natR K (3 ^ p0.1.length))
    let T := K.mul (K.mul (K.mul κ C) (natR K s)) (Geom.tail K r Kk N)
    O.le (K.neg T) (K.add (a n) (K.neg (a 0))) ∧ O.le (K.add (a n) (K.neg (a 0))) T ∧
      O.le (K.mul (K.add K.one (K.neg r)) T) (K.mul (K.mul (K.mul κ C) (natR K s)) (pwR K r Kk)) := by
  obtain ⟨k0, hk0⟩ := Cover04T8.cover04T8 K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, fun jj LL hLL hL Pn hnd hv p0 => CauchyBox.cauchy_box K O F H d k ad hka hd8 hd16 DH h1 h10 h hh h0
    LL hLL hL Pn hnd hv p0 _ (hk0 jj)⟩

end GapBoxFlow04

#print axioms GapBoxFlow04.box_flow04

ym/GapCauchyFlow04.lean

lean_all/ym/GapCauchyFlow04.lean

/-
  ym/GapCauchyFlow04 — T45, G15: every β ∈ [0, 4] and every truncation 29 + m: from some Migdal step k₀ on, the flowed
  SU(2) plaquette weight lies in Cone(2⁻⁸) (Cover04T8) and therefore satisfies the uniform infinite-volume Cauchy
  estimate on Z^d with decay 2^{-(a+1)} (CauchyCone8; d = 4 with k = a = 5). Lean 4 core only, no axioms.
-/
import ym.CauchyCone8
import ym.Cover04T8

namespace GapCauchyFlow04

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

theorem cauchy_flow04 (d k ad : Nat) (hka : k + ad + 7 ≤ 29) (hd8 : 4 * (2 * d) ≤ 2 ^ k) (hd16 : 2 * (4 * (2 * d) + 1) ≤ 2 ^ (k + ad + 2))
    (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (cN K 2)) (mm : Nat) :
    ∃ k0, ∀ jj, ∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 : Pq)
    (tr : Nat → List G → R) (Ob : List G → R) (K1 : R)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Ob)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Ob)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.one K1) (hUpb : ∀ x, O.le (K.neg K1) (Ob x) ∧ O.le (Ob x) K1)
    (n : Nat) (y : Nat → Nat) (q : Nat → Pq) (sh : Nat → Nat) (Ms : Nat → List Bool)
    (hMs : ∀ i, Ms (i + 1) = upd (Ms i) (y i) true)
    (hlen : ∀ i, i < n → (Ms i).length = Pn.length) (hyl : ∀ i, i < n → y i < (Ms i).length)
    (hyM : ∀ i, i < n → nthB (Ms i) (y i) = false)
    (hpq : ∀ i, i < n → disjN (vec LL p0) (vec LL (q i)))
    (hq : ∀ i, i < n → nthL (Pn.map (vec LL)) (y i) = vec LL (q i))
    (hdist : ∀ i, i < n → ¬ dcl (sh (y i) + 1) p0.1 (q i).1)
    (Kk N : Nat) (hsh : ∀ i, i < n → Kk ≤ sh (y i) ∧ sh (y i) < N)
    (plaq : Nat → Pq) (hndy : nodupL ((ShellSum.rng n).map y))
    (hshell : ∀ kk z, memL z ((ShellSum.rng n).map y) → sh z = kk → (plaq z).1.length = p0.1.length ∧
      dcl (kk + 2) p0.1 (plaq z).1 ∧ (plaq z).2.1 < (plaq z).2.2 ∧ (plaq z).2.2 < d)
    (hinj : ∀ z z', memL z ((ShellSum.rng n).map y) → memL z' ((ShellSum.rng n).map y) → plaq z = plaq z' → z = z')
    (hr1 : O.le (K.mul (pwR K h (ad + 1)) (natR K (3 ^ p0.1.length))) K.one),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (29 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let sw := F.inv (K.add K.one (pwR K h (k + ad + 7)))
    let κ := K.add K.one (pwR K h (k + ad + 4))
    let w : Nat → List G → R := fun i x => K.add sw (K.mul sw (f0 i x))
    let a : Nat → R := fun i => E K O F (ZxH K O H w (Ms i) Ob) (ZxH K O H w (Ms i) (fun _ => K.one))
    let C := K.mul h (K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) (4 * (2 * d) + 4 * (2 * d))))
      (pwR K (K.add K.one (pwR K h (k + 1))) (4 * (2 * d) + 4 * (2 * d))))
    let s := d * d * 5 ^ p0.1.length
    let r := K.mul (pwR K h (ad + 1)) (natR K (3 ^ p0.1.length))
    let T := K.mul (K.mul (K.mul κ C) (natR K s)) (Geom.tail K r Kk N)
    O.le (K.neg T) (K.add (a n) (K.neg (a 0))) ∧ O.le (K.add (a n) (K.neg (a 0))) T ∧
      O.le (K.mul (K.add K.one (K.neg r)) T) (K.mul (K.mul (K.mul κ C) (natR K s)) (pwR K r Kk)) := by
  obtain ⟨k0, hk0⟩ := Cover04T8.cover04T8 K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, fun jj LL hLL hL Pn hnd hv p0 => CauchyCone8.cauchy_of_cone8 K O F H d k ad hka hd8 hd16 DH h1 h10 h hh h0
    LL hLL hL Pn hnd hv p0 _ (hk0 jj)⟩

end GapCauchyFlow04

#print axioms GapCauchyFlow04.cauchy_flow04

ym/GapCauchyFlow08.lean

lean_all/ym/GapCauchyFlow08.lean

/-
  ym/GapCauchyFlow08 — T45, G15: every β ∈ [0, 8] and every truncation 40 + m: from some Migdal step k₀ on, the flowed
  SU(2) plaquette weight lies in Cone(2⁻⁸) (Cover08T8) and therefore satisfies the uniform infinite-volume Cauchy
  estimate on Z^d with decay 2^{-(a+1)} (CauchyCone8; d = 4 with k = a = 5). Lean 4 core only, no axioms.
-/
import ym.CauchyCone8
import ym.Cover08T8

namespace GapCauchyFlow08

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

theorem cauchy_flow08 (d k ad : Nat) (hka : k + ad + 7 ≤ 29) (hd8 : 4 * (2 * d) ≤ 2 ^ k) (hd16 : 2 * (4 * (2 * d) + 1) ≤ 2 ^ (k + ad + 2))
    (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (cN K 4)) (mm : Nat) :
    ∃ k0, ∀ jj, ∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 : Pq)
    (tr : Nat → List G → R) (Ob : List G → R) (K1 : R)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Ob)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Ob)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.one K1) (hUpb : ∀ x, O.le (K.neg K1) (Ob x) ∧ O.le (Ob x) K1)
    (n : Nat) (y : Nat → Nat) (q : Nat → Pq) (sh : Nat → Nat) (Ms : Nat → List Bool)
    (hMs : ∀ i, Ms (i + 1) = upd (Ms i) (y i) true)
    (hlen : ∀ i, i < n → (Ms i).length = Pn.length) (hyl : ∀ i, i < n → y i < (Ms i).length)
    (hyM : ∀ i, i < n → nthB (Ms i) (y i) = false)
    (hpq : ∀ i, i < n → disjN (vec LL p0) (vec LL (q i)))
    (hq : ∀ i, i < n → nthL (Pn.map (vec LL)) (y i) = vec LL (q i))
    (hdist : ∀ i, i < n → ¬ dcl (sh (y i) + 1) p0.1 (q i).1)
    (Kk N : Nat) (hsh : ∀ i, i < n → Kk ≤ sh (y i) ∧ sh (y i) < N)
    (plaq : Nat → Pq) (hndy : nodupL ((ShellSum.rng n).map y))
    (hshell : ∀ kk z, memL z ((ShellSum.rng n).map y) → sh z = kk → (plaq z).1.length = p0.1.length ∧
      dcl (kk + 2) p0.1 (plaq z).1 ∧ (plaq z).2.1 < (plaq z).2.2 ∧ (plaq z).2.2 < d)
    (hinj : ∀ z z', memL z ((ShellSum.rng n).map y) → memL z' ((ShellSum.rng n).map y) → plaq z = plaq z' → z = z')
    (hr1 : O.le (K.mul (pwR K h (ad + 1)) (natR K (3 ^ p0.1.length))) K.one),
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (40 + mm) 11).tail (k0 + jj)) (ChiBound.c K (tr i x))
    let sw := F.inv (K.add K.one (pwR K h (k + ad + 7)))
    let κ := K.add K.one (pwR K h (k + ad + 4))
    let w : Nat → List G → R := fun i x => K.add sw (K.mul sw (f0 i x))
    let a : Nat → R := fun i => E K O F (ZxH K O H w (Ms i) Ob) (ZxH K O H w (Ms i) (fun _ => K.one))
    let C := K.mul h (K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) (4 * (2 * d) + 4 * (2 * d))))
      (pwR K (K.add K.one (pwR K h (k + 1))) (4 * (2 * d) + 4 * (2 * d))))
    let s := d * d * 5 ^ p0.1.length
    let r := K.mul (pwR K h (ad + 1)) (natR K (3 ^ p0.1.length))
    let T := K.mul (K.mul (K.mul κ C) (natR K s)) (Geom.tail K r Kk N)
    O.le (K.neg T) (K.add (a n) (K.neg (a 0))) ∧ O.le (K.add (a n) (K.neg (a 0))) T ∧
      O.le (K.mul (K.add K.one (K.neg r)) T) (K.mul (K.mul (K.mul κ C) (natR K s)) (pwR K r Kk)) := by
  obtain ⟨k0, hk0⟩ := Cover08T8.cover08T8 K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, fun jj LL hLL hL Pn hnd hv p0 => CauchyCone8.cauchy_of_cone8 K O F H d k ad hka hd8 hd16 DH h1 h10 h hh h0
    LL hLL hL Pn hnd hv p0 _ (hk0 jj)⟩

end GapCauchyFlow08

#print axioms GapCauchyFlow08.cauchy_flow08

ym/GapCone.lean

lean_all/ym/GapCone.lean

/-
  ym/GapCone — T45, G4: the strong-coupling gap on Z⁴ for any plaquette weight within 2⁻¹³ of 1.
  For a weight 1 + f₀ with |f₀| ≤ 2⁻¹³ (ChiBound.weight_near_one: every weight in Cone(1/16)), normalised by
  s = 1/(1 + 2⁻¹³), GapZd.gap_Zd at d = 4 holds with κ = 1 + 2⁻¹⁰, u = 1/2, x = 2⁻⁷, y = 2⁻⁶ (GapInputs):
  connected correlations of plaquettes at distance R + 2 are ≤ ½ B 2⁻ᴿ, uniformly in the volume.
  Lean 4 core only, no axioms.
-/
import ym.GapZd
import ym.GapInputs

namespace GapCone

open YMChain GKS LinkIntegral LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **Strong-coupling gap on Z⁴ for weights within 2⁻¹³ of 1** (normalised weight s(1 + f₀), decay 2⁻ᴿ). -/
theorem gap_cone (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (f0 : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (hfd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (f0 i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hfaG : ∀ i, H.adm (f0 i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (hf0 : ∀ i x, O.le (K.neg (pwR K h 13)) (f0 i x) ∧ O.le (f0 i x) (pwR K h 13))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length) :
    let s := F.inv (K.add K.one (pwR K h 13))
    let κ := K.add K.one (pwR K h 10)
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h 6)) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one)))) := by
  intro s κ
  obtain ⟨sb, mb, hκ, km, hw⟩ := GapInputs.norm_ok K O F h1 h10 h hh h0
  have hfd' : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (fun x => K.mul s (f0 i x)) :=
    fun i c c' hc => by show K.mul s (f0 i c) = K.mul s (f0 i c'); rw [hfd i c c' hc]
  have hfa' : ∀ i, H.adm (fun x => K.mul s (f0 i x)) := fun i => H.adm_mul _ _ (H.adm_const s) (hfaG i)
  exact GapZd.gap_Zd K O H DH h1 h10 4 LL hLL hL Pn hnd hv p0 q0 hpq (fun i x => K.mul s (f0 i x)) Up Uq
    s (F.inv κ) κ (pwR K h 13) K1 h (pwR K h 7) (pwR K h 6) Rr hfd' hUp hUq hfa' hUpa hUqa
    sb.1 sb.2 mb.1 mb.2 hκ km
    (fun i x => ((hw (f0 i x) (hf0 i x).1 (hf0 i x).2).1).1)
    (fun i x => ((hw (f0 i x) (hf0 i x).1 (hf0 i x).2).1).2)
    (AreaLower.pw_nn K O h h0 h1 13)
    (fun i x => (hw (f0 i x) (hf0 i x).1 (hf0 i x).2).2)
    hK1 hUpb hUqb h0 (GapInputs.hle_one K O h1 h hh h0)
    (AreaLower.pw_nn K O h h0 h1 7) (AreaLower.pw_nn K O h h0 h1 6)
    (GapInputs.hsmall4 K O h1 h hh h0) (GapInputs.hxy4 K O h1 h hh h0) hdist M hM

end GapCone

#print axioms GapCone.gap_cone

ym/GapCone8.lean

lean_all/ym/GapCone8.lean

/-
  ym/GapCone8 — T45, G19: the exponential clustering bound for the SAME weight as the Cauchy estimate
  CauchyCone8.cauchy_of_cone8: plaquette weight s + s·Σ cf_n χ_n(tr) with s = 1/(1 + 2^{-(k+a+7)}), cf in Cone(2⁻⁸).
  Lean 4 core only, no axioms.
-/
import ym.CauchyCone8
import ym.GapConeK

namespace GapCone8

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **Cone(2⁻⁸) ⇒ exponential clustering in every finite volume**, for the weight of `cauchy_of_cone8`. -/
theorem gap_of_cone8 (d k ad : Nat) (hka : k + ad + 7 ≤ 29) (hd8 : 4 * (2 * d) ≤ 2 ^ (k + ad))
    (hd16 : 2 * (4 * (2 * d) + 1) ≤ 2 ^ (k + ad + 2))
    (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (cf : List R) (hcf : ConeBound.Bd K O (pwR K h 8) 0 (K.one :: cf))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length) :
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 cf (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h (k + ad + 7)))
    let κ := K.add K.one (pwR K h (k + ad + 4))
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h (k + ad + 1))) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one)))) := by
  intro f0
  have hl := GapInputs.hle_one K O h1 h hh h0
  have hx : K.mul (MigdalCone.four K) (pwR K (pwR K h 8) 4) = pwR K h 30 := by
    rw [Migdal.pw_pw, show 8 * 4 = 30 + 2 from rfl, GKS.pwR_add]
    show K.mul (K.mul (K.add K.one K.one) (K.add K.one K.one)) (K.mul (pwR K h 30) (K.mul (K.mul K.one h) h)) = _
    have e : K.mul (K.mul (K.add K.one K.one) (K.add K.one K.one)) (K.mul (pwR K h 30) (K.mul (K.mul K.one h) h))
        = K.mul (pwR K h 30) (K.mul (K.add h h) (K.add h h)) := by lib_ring
    rw [e, hh, K.one_mul, K.mul_comm, K.one_mul]
  have x2 : K.add (pwR K h 30) (pwR K h 30) = pwR K h 29 := GapInputsK.dbl K h hh 29
  have hxx : O.le (K.add (pwR K h 30) (pwR K h 30)) K.one := by
    rw [x2]; exact ConeBound.pw_anti K O h1 h h0 hl 29 0 (Nat.zero_le _)
  have epsle : O.le (pwR K h 29) (pwR K h (k + ad + 7)) := ConeBound.pw_anti K O h1 h h0 hl _ _ hka
  have hf0 : ∀ i x, O.le (K.neg (pwR K h (k + ad + 7))) (f0 i x) ∧ O.le (f0 i x) (pwR K h (k + ad + 7)) := fun i x => by
    have := ConeGap.activity K O h1 (pwR K h 8) (pwR K h 30) (AreaLower.pw_nn K O h h0 h1 _) hx hxx 1
      _ hcf.2 (ChiBound.c K (tr i x)) (ChiBound.chi_bound K O h1 (tr i x) (htr i x))
    rw [show pwR K (pwR K h 30) 1 = K.mul K.one (pwR K h 30) from rfl, K.one_mul, x2] at this
    exact ⟨O.le_trans _ _ _ (ChiBound.neg_le K O _ _ epsle) this.1, O.le_trans _ _ _ this.2 epsle⟩
  have hfd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (f0 i) :=
    fun i c c' hcc => by show SU2Char.dot K 1 _ (ChiBound.c K (tr i c)) = _; rw [htd i c c' hcc]
  exact GapConeK.gap_cone_k K O F H d (k + ad) hd8 hd16 DH h1 h10 h hh h0 LL hLL hL Pn hnd hv p0 q0 hpq f0 Up Uq K1 Rr
    hfd hUp hUq (fun i => GapFlow.adm_dot K O H (tr i) (hta i) 1 _) hUpa hUqa hf0 hK1 hUpb hUqb hdist M hM

end GapCone8

#print axioms GapCone8.gap_of_cone8

ym/GapConeD.lean

lean_all/ym/GapConeD.lean

/-
  ym/GapConeD — T45: the strong-coupling gap on Z^d, every d ≤ 4, for any plaquette weight within 2⁻¹³ of 1.
  For a weight 1 + f₀ with |f₀| ≤ 2⁻¹³ (ChiBound.weight_near_one: every weight in Cone(1/16)), normalised by
  s = 1/(1 + 2⁻¹³), GapZd.gap_Zd at d = 4 holds with κ = 1 + 2⁻¹⁰, u = 1/2, x = 2⁻⁷, y = 2⁻⁶ (GapInputs):
  connected correlations of plaquettes at distance R + 2 are ≤ ½ B 2⁻ᴿ, uniformly in the volume.
  Lean 4 core only, no axioms.
-/
import ym.GapZd
import ym.GapInputs
import ym.Count

namespace GapConeD

open YMChain GKS LinkIntegral LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)


theorem le_pow (h1 : O.le K.zero K.one) (z : R) (hz : O.le K.one z) (a b : Nat) (hab : a ≤ b) :
    O.le (pwR K z a) (pwR K z b) := by
  obtain ⟨c, e⟩ := Nat.le.dest hab
  rw [← e]; exact Count.pw_mono K O h1 z hz a c

theorem hsmall_d (h1 : O.le K.zero K.one) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h) (d : Nat) (hd : d ≤ 4) :
    O.le (K.mul (K.add (K.add (pwR K h 13) (pwR K h 13)) (K.mul (pwR K h 13) (pwR K h 13)))
        (pwR K (K.mul (K.add K.one (pwR K h 10)) (K.add K.one (pwR K h 10))) (4 * (2 * d) + 1)))
      (K.mul h (pwR K h 7)) := by
  have p10 := AreaLower.pw_nn K O h h0 h1 10
  have k1 : O.le K.one (K.add K.one (pwR K h 10)) := by
    have := O.add_le_add _ _ _ _ (O.le_refl K.one) p10; rw [DetChain.add_zero'] at this; exact this
  have kk : O.le K.one (K.mul (K.add K.one (pwR K h 10)) (K.add K.one (pwR K h 10))) := by
    have := O.mul_le_mul_right _ _ _ k1 (O.le_trans _ _ _ h1 k1); rw [K.one_mul] at this
    exact O.le_trans _ _ _ k1 this
  have pe := AreaLower.pw_nn K O h h0 h1 13
  have c0 : O.le K.zero (K.add (K.add (pwR K h 13) (pwR K h 13)) (K.mul (pwR K h 13) (pwR K h 13))) := by
    have a := O.add_le_add _ _ _ _ pe pe; rw [K.zero_add] at a
    have b := O.add_le_add _ _ _ _ a (O.mul_nonneg _ _ pe pe); rw [K.zero_add] at b; exact b
  have m := le_pow K O h1 _ kk (4 * (2 * d) + 1) (4 * (2 * 4) + 1)
    (Nat.succ_le_succ (Nat.mul_le_mul_left 4 (Nat.mul_le_mul_left 2 hd)))
  have := O.mul_le_mul_right _ _ _ m c0
  rw [K.mul_comm _ (K.add (K.add _ _) _), K.mul_comm _ (K.add (K.add _ _) _)] at this
  exact O.le_trans _ _ _ this (GapInputs.hsmall4 K O h1 h hh h0)

theorem hxy_d (h1 : O.le K.zero K.one) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h) (d : Nat) (hd : d ≤ 4) :
    O.le (K.mul (pwR K h 7) (pwR K (K.add K.one (pwR K h 6)) (4 * (2 * d)))) (pwR K h 6) := by
  have p6 := AreaLower.pw_nn K O h h0 h1 6
  have y1 : O.le K.one (K.add K.one (pwR K h 6)) := by
    have := O.add_le_add _ _ _ _ (O.le_refl K.one) p6; rw [DetChain.add_zero'] at this; exact this
  have m := le_pow K O h1 _ y1 (4 * (2 * d)) (4 * (2 * 4)) (Nat.mul_le_mul_left 4 (Nat.mul_le_mul_left 2 hd))
  have := O.mul_le_mul_right _ _ _ m (AreaLower.pw_nn K O h h0 h1 7)
  rw [K.mul_comm _ (pwR K h 7), K.mul_comm _ (pwR K h 7)] at this
  exact O.le_trans _ _ _ this (GapInputs.hxy4 K O h1 h hh h0)

/-- **Strong-coupling gap on Z^d (d ≤ 4) for weights within 2⁻¹³ of 1** (normalised weight s(1 + f₀), decay 2⁻ᴿ). -/
theorem gap_cone_d (d : Nat) (hd : d ≤ 4) (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (f0 : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (hfd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (f0 i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hfaG : ∀ i, H.adm (f0 i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (hf0 : ∀ i x, O.le (K.neg (pwR K h 13)) (f0 i x) ∧ O.le (f0 i x) (pwR K h 13))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length) :
    let s := F.inv (K.add K.one (pwR K h 13))
    let κ := K.add K.one (pwR K h 10)
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h 6)) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one)))) := by
  intro s κ
  obtain ⟨sb, mb, hκ, km, hw⟩ := GapInputs.norm_ok K O F h1 h10 h hh h0
  have hfd' : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (fun x => K.mul s (f0 i x)) :=
    fun i c c' hc => by show K.mul s (f0 i c) = K.mul s (f0 i c'); rw [hfd i c c' hc]
  have hfa' : ∀ i, H.adm (fun x => K.mul s (f0 i x)) := fun i => H.adm_mul _ _ (H.adm_const s) (hfaG i)
  exact GapZd.gap_Zd K O H DH h1 h10 d LL hLL hL Pn hnd hv p0 q0 hpq (fun i x => K.mul s (f0 i x)) Up Uq
    s (F.inv κ) κ (pwR K h 13) K1 h (pwR K h 7) (pwR K h 6) Rr hfd' hUp hUq hfa' hUpa hUqa
    sb.1 sb.2 mb.1 mb.2 hκ km
    (fun i x => ((hw (f0 i x) (hf0 i x).1 (hf0 i x).2).1).1)
    (fun i x => ((hw (f0 i x) (hf0 i x).1 (hf0 i x).2).1).2)
    (AreaLower.pw_nn K O h h0 h1 13)
    (fun i x => (hw (f0 i x) (hf0 i x).1 (hf0 i x).2).2)
    hK1 hUpb hUqb h0 (GapInputs.hle_one K O h1 h hh h0)
    (AreaLower.pw_nn K O h h0 h1 7) (AreaLower.pw_nn K O h h0 h1 6)
    (hsmall_d K O h1 h hh h0 d hd) (hxy_d K O h1 h hh h0 d hd) hdist M hM

end GapConeD

#print axioms GapConeD.hsmall_d
#print axioms GapConeD.hxy_d
#print axioms GapConeD.gap_cone_d

ym/GapConeJ.lean

lean_all/ym/GapConeJ.lean

/-
  ym/GapConeJ — T45, G30: GapCone8.gap_of_cone8 for cf in Cone(2^{-(4j+8)}) — the cone reached after j Migdal steps
  (MigdalDecay.mk_decay). The admissible decay exponent grows with j: k + ad + 7 ≤ 16j + 29, so the clustering rate
  2^{-(ad+1)} per unit distance improves by 2⁻¹⁶ per step (gap_flow_j for the flowed weight).
  Lean 4 core only, no axioms.
-/
import ym.CauchyCone8
import ym.GapConeK
import ym.MigdalDecay
import ym.ActivityDecay

namespace GapConeJ

open YMChain LinkIntegral GKS LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist OField Volume
  WilsonCauchy

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **Cone(2⁻⁸) ⇒ exponential clustering in every finite volume**, for the weight of `cauchy_of_cone8`. -/
theorem gap_of_coneJ (d k ad j : Nat) (hka : k + ad + 7 ≤ 16 * j + 29) (hd8 : 4 * (2 * d) ≤ 2 ^ (k + ad))
    (hd16 : 2 * (4 * (2 * d) + 1) ≤ 2 ^ (k + ad + 2))
    (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (cf : List R) (hcf : ConeBound.Bd K O (pwR K h (4 * j + 8)) 0 (K.one :: cf))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length) :
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 cf (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h (k + ad + 7)))
    let κ := K.add K.one (pwR K h (k + ad + 4))
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h (k + ad + 1))) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one)))) := by
  intro f0
  have hl := GapInputs.hle_one K O h1 h hh h0
  have hx : K.mul (MigdalCone.four K) (pwR K (pwR K h (4 * j + 8)) 4) = pwR K h (16 * j + 30) := by
    have e : (4 * j + 8) * 4 = (16 * j + 30) + 2 := by lib_nat
    rw [Migdal.pw_pw, e, ActivityDecay.four_h K h hh]
  have e30 : 16 * j + 30 = (16 * j + 29) + 1 := by lib_nat
  have x2 : K.add (pwR K h (16 * j + 30)) (pwR K h (16 * j + 30)) = pwR K h (16 * j + 29) := by
    rw [e30]; exact ActivityDecay.half_add K h hh _
  have hxx : O.le (K.add (pwR K h (16 * j + 30)) (pwR K h (16 * j + 30))) K.one := by
    rw [x2]; exact ConeBound.pw_anti K O h1 h h0 hl _ 0 (Nat.zero_le _)
  have epsle : O.le (pwR K h (16 * j + 29)) (pwR K h (k + ad + 7)) := ConeBound.pw_anti K O h1 h h0 hl _ _ hka
  have hf0 : ∀ i x, O.le (K.neg (pwR K h (k + ad + 7))) (f0 i x) ∧ O.le (f0 i x) (pwR K h (k + ad + 7)) := fun i x => by
    have := ConeGap.activity K O h1 (pwR K h (4 * j + 8)) (pwR K h (16 * j + 30)) (AreaLower.pw_nn K O h h0 h1 _) hx hxx 1
      _ hcf.2 (ChiBound.c K (tr i x)) (ChiBound.chi_bound K O h1 (tr i x) (htr i x))
    rw [show pwR K (pwR K h (16 * j + 30)) 1 = K.mul K.one (pwR K h (16 * j + 30)) from rfl, K.one_mul, x2] at this
    exact ⟨O.le_trans _ _ _ (ChiBound.neg_le K O _ _ epsle) this.1, O.le_trans _ _ _ this.2 epsle⟩
  have hfd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (f0 i) :=
    fun i c c' hcc => by show SU2Char.dot K 1 _ (ChiBound.c K (tr i c)) = _; rw [htd i c c' hcc]
  exact GapConeK.gap_cone_k K O F H d (k + ad) hd8 hd16 DH h1 h10 h hh h0 LL hLL hL Pn hnd hv p0 q0 hpq f0 Up Uq K1 Rr
    hfd hUp hUq (fun i => GapFlow.adm_dot K O H (tr i) (hta i) 1 _) hUpa hUqa hf0 hK1 hUpb hUqb hdist M hM

/-- **Clustering for the flowed weight after j Migdal steps**, rate improving with j. -/
theorem gap_flow_j (d k ad j : Nat) (hka : k + ad + 7 ≤ 16 * j + 29) (hd8 : 4 * (2 * d) ≤ 2 ^ (k + ad))
    (hd16 : 2 * (4 * (2 * d) + 1) ≤ 2 ^ (k + ad + 2))
    (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (a : List R) (ha : ConeBound.Bd K O (pwR K h 8) 0 (K.one :: a)) (Lm : Nat)
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length) :
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (MigdalCone.mkIt K O F Lm a j) (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h (k + ad + 7)))
    let κ := K.add K.one (pwR K h (k + ad + 4))
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h (k + ad + 1))) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one)))) :=
  gap_of_coneJ K O F H d k ad j hka hd8 hd16 DH h1 h10 h hh h0 LL hLL hL Pn hnd hv p0 q0 hpq (MigdalCone.mkIt K O F Lm a j)
    (MigdalDecay.mk_decay K O F h1 h10 h hh h0 a ha Lm j) tr Up Uq K1 Rr htd hUp hUq hta hUpa hUqa htr hK1 hUpb hUqb hdist M hM

end GapConeJ

#print axioms GapConeJ.gap_of_coneJ
#print axioms GapConeJ.gap_flow_j

ym/GapConeK.lean

lean_all/ym/GapConeK.lean

/-
  ym/GapConeK — T45, G9: the strong-coupling gap on Z^d in every dimension d, uniformly in the volume: if
  8d ≤ 2^k and 2(8d+1) ≤ 2^{k+2}, every plaquette weight within 2^{-(k+7)} of 1 (≈ 1/(1024 d)), normalised by
  s = 1/(1 + 2^{-(k+7)}), satisfies GapZd.gap_Zd with κ = 1 + 2^{-(k+4)}, u = 1/2, x = 2^{-(k+2)}, y = 2^{-(k+1)}
  (GapInputsK): connected plaquette correlations at distance R + 2 are ≤ ½ B 2⁻ᴿ.
  Lean 4 core only, no axioms.
-/
import ym.GapZd
import ym.GapInputsK

namespace GapConeK

open YMChain GKS LinkIntegral LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **Strong-coupling gap on Z^d, every d, for weights within 2^{-(k+7)} of 1 (8d ≤ 2^k).** -/
theorem gap_cone_k (d k : Nat) (hd8 : 4 * (2 * d) ≤ 2 ^ k) (hd16 : 2 * (4 * (2 * d) + 1) ≤ 2 ^ (k + 2)) (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (f0 : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (hfd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (f0 i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hfaG : ∀ i, H.adm (f0 i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (hf0 : ∀ i x, O.le (K.neg (pwR K h (k + 7))) (f0 i x) ∧ O.le (f0 i x) (pwR K h (k + 7)))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length) :
    let s := F.inv (K.add K.one (pwR K h (k + 7)))
    let κ := K.add K.one (pwR K h (k + 4))
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h (k + 1))) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one)))) := by
  intro s κ
  obtain ⟨sb, mb, hκ, km, hw⟩ := GapInputsK.norm_okK K O F k h1 h10 h hh h0
  have hfd' : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (fun x => K.mul s (f0 i x)) :=
    fun i c c' hc => by show K.mul s (f0 i c) = K.mul s (f0 i c'); rw [hfd i c c' hc]
  have hfa' : ∀ i, H.adm (fun x => K.mul s (f0 i x)) := fun i => H.adm_mul _ _ (H.adm_const s) (hfaG i)
  exact GapZd.gap_Zd K O H DH h1 h10 d LL hLL hL Pn hnd hv p0 q0 hpq (fun i x => K.mul s (f0 i x)) Up Uq
    s (F.inv κ) κ (pwR K h (k + 7)) K1 h (pwR K h (k + 2)) (pwR K h (k + 1)) Rr hfd' hUp hUq hfa' hUpa hUqa
    sb.1 sb.2 mb.1 mb.2 hκ km
    (fun i x => ((hw (f0 i x) (hf0 i x).1 (hf0 i x).2).1).1)
    (fun i x => ((hw (f0 i x) (hf0 i x).1 (hf0 i x).2).1).2)
    (AreaLower.pw_nn K O h h0 h1 (k + 7))
    (fun i x => (hw (f0 i x) (hf0 i x).1 (hf0 i x).2).2)
    hK1 hUpb hUqb h0 (GapInputs.hle_one K O h1 h hh h0)
    (AreaLower.pw_nn K O h h0 h1 (k + 2)) (AreaLower.pw_nn K O h h0 h1 (k + 1))
    (GapInputsK.hsmallK K O h1 h hh h0 d k hd16) (GapInputsK.hxyK K O h1 h hh h0 d k hd8) hdist M hM

end GapConeK

#print axioms GapConeK.gap_cone_k

ym/GapConeKA.lean

lean_all/ym/GapConeKA.lean

/-
  ym/GapConeKA — T45, G14: gap_cone_k with decay rate u = 2^{-(a+1)} per lattice unit (ε = 2^{-(k+a+7)}): if
  8d ≤ 2^k and 2(8d+1) ≤ 2^{k+2}, every plaquette weight within 2^{-(k+7)} of 1 (≈ 1/(1024 d)), normalised by
  s = 1/(1 + 2^{-(k+7)}), satisfies GapZd.gap_Zd with κ = 1 + 2^{-(k+4)}, u = 1/2, x = 2^{-(k+2)}, y = 2^{-(k+1)}
  (GapInputsK): connected plaquette correlations at distance R + 2 are ≤ ½ B 2⁻ᴿ.
  Lean 4 core only, no axioms.
-/
import ym.GapZd
import ym.GapInputsK
import lib.Semi

namespace GapConeKA

open YMChain GKS LinkIntegral LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **Strong-coupling gap on Z^d, every d, for weights within 2^{-(k+7)} of 1 (8d ≤ 2^k).** -/
theorem gap_cone_ka (d k a : Nat) (hd8 : 4 * (2 * d) ≤ 2 ^ k) (hd16 : 2 * (4 * (2 * d) + 1) ≤ 2 ^ (k + a + 2)) (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (f0 : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (hfd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (f0 i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hfaG : ∀ i, H.adm (f0 i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (hf0 : ∀ i x, O.le (K.neg (pwR K h (k + a + 7))) (f0 i x) ∧ O.le (f0 i x) (pwR K h (k + a + 7)))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length) :
    let s := F.inv (K.add K.one (pwR K h (k + a + 7)))
    let κ := K.add K.one (pwR K h (k + a + 4))
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h (k + 1))) sc) (pwR K (pwR K h (a + 1)) Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one)))) := by
  intro s κ
  have hsm : O.le (K.mul (K.add (K.add (pwR K h (k + a + 7)) (pwR K h (k + a + 7))) (K.mul (pwR K h (k + a + 7)) (pwR K h (k + a + 7))))
      (pwR K (K.mul κ κ) (4 * (2 * d) + 1))) (K.mul (pwR K h (a + 1)) (pwR K h (k + 2))) := by
    have := GapInputsK.hsmallK K O h1 h hh h0 d (k + a) hd16
    have e : K.mul h (pwR K h (k + a + 2)) = K.mul (pwR K h (a + 1)) (pwR K h (k + 2)) := by
      rw [← GKS.pwR_add, show a + 1 + (k + 2) = (k + a + 2) + 1 from by lib_nat]
      show _ = K.mul (pwR K h (k + a + 2)) h; rw [K.mul_comm]
    rw [e] at this; exact this
  obtain ⟨sb, mb, hκ, km, hw⟩ := GapInputsK.norm_okK K O F (k + a) h1 h10 h hh h0
  have hfd' : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (fun x => K.mul s (f0 i x)) :=
    fun i c c' hc => by show K.mul s (f0 i c) = K.mul s (f0 i c'); rw [hfd i c c' hc]
  have hfa' : ∀ i, H.adm (fun x => K.mul s (f0 i x)) := fun i => H.adm_mul _ _ (H.adm_const s) (hfaG i)
  exact GapZd.gap_Zd K O H DH h1 h10 d LL hLL hL Pn hnd hv p0 q0 hpq (fun i x => K.mul s (f0 i x)) Up Uq
    s (F.inv κ) κ (pwR K h (k + a + 7)) K1 (pwR K h (a + 1)) (pwR K h (k + 2)) (pwR K h (k + 1)) Rr hfd' hUp hUq hfa' hUpa hUqa
    sb.1 sb.2 mb.1 mb.2 hκ km
    (fun i x => ((hw (f0 i x) (hf0 i x).1 (hf0 i x).2).1).1)
    (fun i x => ((hw (f0 i x) (hf0 i x).1 (hf0 i x).2).1).2)
    (AreaLower.pw_nn K O h h0 h1 (k + a + 7))
    (fun i x => (hw (f0 i x) (hf0 i x).1 (hf0 i x).2).2)
    hK1 hUpb hUqb (AreaLower.pw_nn K O h h0 h1 (a + 1))
    (ConeBound.pw_anti K O h1 h h0 (GapInputs.hle_one K O h1 h hh h0) (a + 1) 0 (Nat.zero_le _))
    (AreaLower.pw_nn K O h h0 h1 (k + 2)) (AreaLower.pw_nn K O h h0 h1 (k + 1))
    hsm (GapInputsK.hxyK K O h1 h hh h0 d k hd8) hdist M hM

end GapConeKA

#print axioms GapConeKA.gap_cone_ka

ym/GapFlow.lean

lean_all/ym/GapFlow.lean

/-
  ym/GapFlow — T45, G4: from "the flowed weights enter Cone(1/16)" to "the flowed weights have a volume-uniform
  gap on Z⁴". For a sequence of coefficient lists a_k with K.one :: a_k ∈ Cone(1/16) for all k ≥ k₀, and plaquette
  traces tr_i ∈ [−2, 2], the plaquette weights w_k = 1 + Σ_{n≥1} a_{k,n} χ_n(tr_i) satisfy GapCone.gap_cone for every
  k ≥ k₀. Lean 4 core only, no axioms.
-/
import ym.GapCone

namespace GapFlow

open YMChain GKS LinkIntegral LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

theorem adm_ev (g : List G → R) (hg : H.adm g) : ∀ p : List R, H.adm (fun x => SU2Char.ev K p (g x))
  | [] => H.adm_const K.zero
  | c :: p => H.adm_add _ _ (H.adm_const c) (H.adm_mul _ _ hg (adm_ev g hg p))

theorem adm_dot (g : List G → R) (hg : H.adm g) :
    ∀ (m : Nat) (a : List R), H.adm (fun x => SU2Char.dot K m a (ChiBound.c K (g x)))
  | _, [] => H.adm_const K.zero
  | m, c :: a => H.adm_add _ _ (H.adm_mul _ _ (H.adm_const c) (adm_ev K O H g hg (SU2Char.chiC K m))) (adm_dot g hg (m + 1) a)

theorem h14 (h : R) (hh : K.add h h = K.one) : K.add (pwR K h 14) (pwR K h 14) = pwR K h 13 := by
  show K.add (K.mul (pwR K h 13) h) (K.mul (pwR K h 13) h) = pwR K h 13
  have d : K.add (K.mul (pwR K h 13) h) (K.mul (pwR K h 13) h) = K.mul (pwR K h 13) (K.add h h) := by lib_ring
  rw [d, hh, K.mul_comm, K.one_mul]

/-- **Cone ⇒ gap, for every later flow step.** -/
theorem gap_of_cone (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (a : Nat → List R) (k0 : Nat) (hc : ∀ j, ConeBound.Bd K O (pwR K h 4) 0 (K.one :: a (k0 + j)))
    (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length) (j : Nat) :
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (a (k0 + j)) (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h 13))
    let κ := K.add K.one (pwR K h 10)
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h 6)) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one)))) := by
  intro f0
  have hf0 : ∀ i x, O.le (K.neg (pwR K h 13)) (f0 i x) ∧ O.le (f0 i x) (pwR K h 13) := fun i x => by
    have := (ChiBound.weight_near_one K O h1 h hh h0 (a (k0 + j)) (hc j) (tr i x) (htr i x)).2
    rw [h14 K h hh] at this; exact this
  have hfd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (f0 i) :=
    fun i c c' hcc => by show SU2Char.dot K 1 _ (ChiBound.c K (tr i c)) = _; rw [htd i c c' hcc]
  exact GapCone.gap_cone K O F H DH h1 h10 h hh h0 LL hLL hL Pn hnd hv p0 q0 hpq f0 Up Uq K1 Rr hfd hUp hUq
    (fun i => adm_dot K O H (tr i) (hta i) 1 (a (k0 + j))) hUpa hUqa hf0 hK1 hUpb hUqb hdist M hM

end GapFlow

#print axioms GapFlow.gap_of_cone

ym/GapFlow04.lean

lean_all/ym/GapFlow04.lean

/-
  ym/GapFlow04 — T45, G4: every β ∈ [0, 4]: after finitely many 4D Migdal steps (truncation Kk = 29, L = 10) the
  effective plaquette weight of SU(2) Wilson theory has a volume-uniform mass gap on Z⁴ (GapFlow.gap_of_cone with
  Cover04.cover04), and so does every later step. Lean 4 core only, no axioms.
-/
import ym.Cover04
import ym.GapFlow

namespace GapFlow04

open YMChain GKS LinkIntegral LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **β ∈ [0, 4] ⇒ the Migdal-flowed weight has a volume-uniform gap on Z⁴ from some step k₀ on.** -/
theorem gap_flow04 (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (SU2Char.cN K 2)) :
    ∃ k0, ∀ j, ConeBound.Bd K O (pwR K h 4) 0
      (K.one :: MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t 29 11).tail (k0 + j)) :=
  Cover04.cover04 K O F h1 h10 h hh h0 t ht0 ht

/-- the gap statement for each later step, with a_k the flowed coefficients -/
theorem gap_flow04_step (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (SU2Char.cN K 2)) :
    ∃ k0, ∀ j, ∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length),
    let a := MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t 29 11).tail (k0 + j)
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 a (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h 13))
    let κ := K.add K.one (pwR K h 10)
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h 6)) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one)))) := by
  obtain ⟨k0, hc⟩ := Cover04.cover04 K O F h1 h10 h hh h0 t ht0 ht
  exact ⟨k0, fun j LL hLL hL Pn hnd hv p0 q0 hpq tr Up Uq K1 Rr htd hUp hUq hta hUpa hUqa htr hK1 hUpb hUqb hdist M hM =>
    GapFlow.gap_of_cone K O F H DH h1 h10 h hh h0 (fun k => MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t 29 11).tail k)
      k0 hc LL hLL hL Pn hnd hv p0 q0 hpq tr Up Uq K1 Rr htd hUp hUq hta hUpa hUqa htr hK1 hUpb hUqb hdist M hM j⟩

end GapFlow04

#print axioms GapFlow04.gap_flow04_step

ym/GapFlow04T.lean

lean_all/ym/GapFlow04T.lean

/-
  ym/GapFlow04T — T45, G4: every β ∈ [0, 4] and every truncation 29 + m: after finitely many 4D Migdal steps (L = 10) the
  effective plaquette weight of SU(2) Wilson theory has a volume-uniform mass gap on Z⁴ (GapFlow.gap_of_cone with
  Cover04T.cover04T), and so does every later step. Lean 4 core only, no axioms.
-/
import ym.Cover04T
import ym.GapFlow

namespace GapFlow04T

open YMChain GKS LinkIntegral LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **β ∈ [0, 4] ⇒ the Migdal-flowed weight has a volume-uniform gap on Z⁴ from some step k₀ on.** -/
theorem gap_flow04 (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (SU2Char.cN K 2)) (mm : Nat) :
    ∃ k0, ∀ j, ConeBound.Bd K O (pwR K h 4) 0
      (K.one :: MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (29 + mm) 11).tail (k0 + j)) :=
  Cover04T.cover04T K O F h1 h10 h hh h0 t ht0 ht mm

/-- the gap statement for each later step, with a_k the flowed coefficients -/
theorem gap_flow04_step (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (SU2Char.cN K 2)) (mm : Nat) :
    ∃ k0, ∀ j, ∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length),
    let a := MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (29 + mm) 11).tail (k0 + j)
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 a (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h 13))
    let κ := K.add K.one (pwR K h 10)
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h 6)) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one)))) := by
  obtain ⟨k0, hc⟩ := Cover04T.cover04T K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, fun j LL hLL hL Pn hnd hv p0 q0 hpq tr Up Uq K1 Rr htd hUp hUq hta hUpa hUqa htr hK1 hUpb hUqb hdist M hM =>
    GapFlow.gap_of_cone K O F H DH h1 h10 h hh h0 (fun k => MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (29 + mm) 11).tail k)
      k0 hc LL hLL hL Pn hnd hv p0 q0 hpq tr Up Uq K1 Rr htd hUp hUq hta hUpa hUqa htr hK1 hUpb hUqb hdist M hM j⟩

end GapFlow04T

#print axioms GapFlow04T.gap_flow04_step

ym/GapFlow08T.lean

lean_all/ym/GapFlow08T.lean

/-
  ym/GapFlow08T — T45, G4: every β ∈ [0, 8] and every truncation 40 + m: after finitely many 4D Migdal steps (L = 10) the
  effective plaquette weight of SU(2) Wilson theory has a volume-uniform mass gap on Z⁴ (GapFlow.gap_of_cone with
  Cover08T.cover08T), and so does every later step. Lean 4 core only, no axioms.
-/
import ym.Cover08T
import ym.GapFlow

namespace GapFlow08T

open YMChain GKS LinkIntegral LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- **β ∈ [0, 8] ⇒ the Migdal-flowed weight has a volume-uniform gap on Z⁴ from some step k₀ on.** -/
theorem gap_flow08 (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (SU2Char.cN K 4)) (mm : Nat) :
    ∃ k0, ∀ j, ConeBound.Bd K O (pwR K h 4) 0
      (K.one :: MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (40 + mm) 11).tail (k0 + j)) :=
  Cover08T.cover08T K O F h1 h10 h hh h0 t ht0 ht mm

/-- the gap statement for each later step, with a_k the flowed coefficients -/
theorem gap_flow08_step (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (ht : O.le t (SU2Char.cN K 4)) (mm : Nat) :
    ∃ k0, ∀ j, ∀ (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length),
    let a := MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (40 + mm) 11).tail (k0 + j)
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 a (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h 13))
    let κ := K.add K.one (pwR K h 10)
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h 6)) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one)))) := by
  obtain ⟨k0, hc⟩ := Cover08T.cover08T K O F h1 h10 h hh h0 t ht0 ht mm
  exact ⟨k0, fun j LL hLL hL Pn hnd hv p0 q0 hpq tr Up Uq K1 Rr htd hUp hUq hta hUpa hUqa htr hK1 hUpb hUqb hdist M hM =>
    GapFlow.gap_of_cone K O F H DH h1 h10 h hh h0 (fun k => MigdalCone.mkIt K O F 10 (WilsonCone.wl K O F t (40 + mm) 11).tail k)
      k0 hc LL hLL hL Pn hnd hv p0 q0 hpq tr Up Uq K1 Rr htd hUp hUq hta hUpa hUqa htr hK1 hUpb hUqb hdist M hM j⟩

end GapFlow08T

#print axioms GapFlow08T.gap_flow08_step

ym/GapFlow16.lean

lean_all/ym/GapFlow16.lean

/-
  ym/GapFlow16 — T45, G78i: the volume-uniform gap of the Migdal–Kadanoff flow for β = 2t ≤ 16 (all characters,
  every list length M + 2 ≥ 257): the certified ladder LadderMain16 (planC) puts the flow in RC(1/7); GapFlow8.cone_gen
  gives the cone Bd(h⁴) from 4 steps later on; GapFlow.gap_of_cone gives the gap. Lean 4 core only, no axioms.
-/
import ym.LadderMain16
import ym.GapFlow8

namespace GapFlow16

open YMChain GKS LinkIntegral LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist
  SU2Char HeatPair MigdalCone

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- the number of rungs of the β ≤ 16 ladder -/
def K16 : Nat := 116

/-- the flow after the ladder -/
def X16 (t : R) (M j : Nat) : List R :=
  FlowIter.itX K O F (FlowIter.itX K O F (WilsonCone.wl K O F t 79 (M + 2)) M K16) (FlowIter.itM M K16) j

theorem cone16 (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (htne : t ≠ K.zero) (ht8 : O.le t (cN K 8)) (M : Nat) (hM : 255 ≤ M) :
    ∀ j, ConeBound.Bd K O (pwR K h 4) 0 (K.one :: GapFlow8.nrm K O F (X16 K O F t M (4 + j))) := by
  have w0 := WilsonFlowBig.wilson_flow16 K O F h1 h10 t ht0 ht8 htne M hM 0
  have Lf := LadderFin.ladder_fin K O F h1 h10 _ M w0.1 w0.2.1 w0.2.2 (LadderMain16.Ref K O F M) K16
    (LadderMain16.rungs K O F h1 h10 M hM) (LadderMain16.start K O F h1 h10 t ht0 htne ht8 M hM) K16 (Nat.le_refl _)
  have s0 := RefScalar.rat_nn K O F h1 h10 1 7 (by decide)
  have r0 := FlowRC.below_RC K O _ s0 _ _ Lf.1 (LadderMain16.finish K O F h1 h10 M hM)
  exact GapFlow8.cone_gen K O F h1 h10 h hh h0 _ _ Lf.2.1 Lf.2.2.1 Lf.2.2.2 r0

/-- **G78i: the volume-uniform gap of the flowed SU(2) plaquette weight for β = 2t ≤ 16** (MK model, every list
  length M + 2 ≥ 257, every step K16 + 4 + j): connected plaquette correlations ≤ ½·B·2⁻ᴿ (GapFlow.gap_of_cone) -/
theorem gap16 (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (htne : t ≠ K.zero) (ht8 : O.le t (cN K 8)) (M : Nat) (hM : 255 ≤ M)
    (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (Ml : List Bool) (hMl : Ml.length = Pn.length) (j : Nat) :
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (GapFlow8.nrm K O F (X16 K O F t M (4 + j))) (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h 13))
    let κ := K.add K.one (pwR K h 10)
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w Ml (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w Ml (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w Ml Up) (ZxH K O H w Ml Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h 6)) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w Ml (fun _ => K.one)) (ZxH K O H w Ml (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w Ml (fun _ => K.one)) (ZxH K O H w Ml (fun _ => K.one)))) :=
  GapFlow.gap_of_cone K O F H DH h1 h10 h hh h0 (fun j => GapFlow8.nrm K O F (X16 K O F t M j)) 4
    (cone16 K O F h1 h10 h hh h0 t ht0 htne ht8 M hM) LL hLL hL Pn hnd hv p0 q0 hpq tr Up Uq K1 Rr htd hUp hUq
    hta hUpa hUqa htr hK1 hUpb hUqb hdist Ml hMl j

end GapFlow16

#print axioms GapFlow16.cone16
#print axioms GapFlow16.gap16

ym/GapFlow24.lean

lean_all/ym/GapFlow24.lean

/-
  ym/GapFlow24 — T45, G78j: the volume-uniform gap of the Migdal–Kadanoff flow for β = 2t ≤ 24 (all characters,
  every list length M + 2 ≥ 4097): the certified ladder LadderMain24 (planD) puts the flow in RC(1/7); GapFlow8.cone_gen
  gives the cone Bd(h⁴) from 4 steps later on; GapFlow.gap_of_cone gives the gap. Lean 4 core only, no axioms.
-/
import ym.LadderMain24
import ym.GapFlow8

namespace GapFlow24

open YMChain GKS LinkIntegral LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist
  SU2Char HeatPair MigdalCone

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- the number of rungs of the β ≤ 24 ladder -/
def K24 : Nat := 305

/-- the flow after the ladder -/
def X24 (t : R) (M j : Nat) : List R :=
  FlowIter.itX K O F (FlowIter.itX K O F (WilsonCone.wl K O F t 319 (M + 2)) M K24) (FlowIter.itM M K24) j

theorem cone24 (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (htne : t ≠ K.zero) (ht8 : O.le t (cN K 12)) (M : Nat) (hM : 4095 ≤ M) :
    ∀ j, ConeBound.Bd K O (pwR K h 4) 0 (K.one :: GapFlow8.nrm K O F (X24 K O F t M (4 + j))) := by
  have w0 := WilsonFlowBig.wilson_flow64 K O F h1 h10 t ht0 (O.le_trans _ _ _ ht8 (SU2CharExp.cN_mono K O h1 _ _ (by decide : 12 ≤ 32))) htne M hM 0
  have Lf := LadderFin.ladder_fin K O F h1 h10 _ M w0.1 w0.2.1 w0.2.2 (LadderMain24.Ref K O F M) K24
    (LadderMain24.rungs K O F h1 h10 M hM) (LadderMain24.start K O F h1 h10 t ht0 htne ht8 M hM) K24 (Nat.le_refl _)
  have s0 := RefScalar.rat_nn K O F h1 h10 1 7 (by decide)
  have r0 := FlowRC.below_RC K O _ s0 _ _ Lf.1 (LadderMain24.finish K O F h1 h10 M hM)
  exact GapFlow8.cone_gen K O F h1 h10 h hh h0 _ _ Lf.2.1 Lf.2.2.1 Lf.2.2.2 r0

/-- **G78j: the volume-uniform gap of the flowed SU(2) plaquette weight for β = 2t ≤ 24** (MK model, every list
  length M + 2 ≥ 4097, every step K24 + 4 + j): connected plaquette correlations ≤ ½·B·2⁻ᴿ (GapFlow.gap_of_cone) -/
theorem gap24 (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (htne : t ≠ K.zero) (ht8 : O.le t (cN K 12)) (M : Nat) (hM : 4095 ≤ M)
    (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (Ml : List Bool) (hMl : Ml.length = Pn.length) (j : Nat) :
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (GapFlow8.nrm K O F (X24 K O F t M (4 + j))) (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h 13))
    let κ := K.add K.one (pwR K h 10)
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w Ml (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w Ml (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w Ml Up) (ZxH K O H w Ml Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h 6)) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w Ml (fun _ => K.one)) (ZxH K O H w Ml (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w Ml (fun _ => K.one)) (ZxH K O H w Ml (fun _ => K.one)))) :=
  GapFlow.gap_of_cone K O F H DH h1 h10 h hh h0 (fun j => GapFlow8.nrm K O F (X24 K O F t M j)) 4
    (cone24 K O F h1 h10 h hh h0 t ht0 htne ht8 M hM) LL hLL hL Pn hnd hv p0 q0 hpq tr Up Uq K1 Rr htd hUp hUq
    hta hUpa hUqa htr hK1 hUpb hUqb hdist Ml hMl j

end GapFlow24

#print axioms GapFlow24.cone24
#print axioms GapFlow24.gap24

ym/GapFlow32.lean

lean_all/ym/GapFlow32.lean

/-
  ym/GapFlow32 — T45, G78j: the volume-uniform gap of the Migdal–Kadanoff flow for β = 2t ≤ 32 (all characters,
  every list length M + 2 ≥ 4097): the certified ladder LadderMain32 (planE) puts the flow in RC(1/7); GapFlow8.cone_gen
  gives the cone Bd(h⁴) from 4 steps later on; GapFlow.gap_of_cone gives the gap. Lean 4 core only, no axioms.
-/
import ym.LadderMain32
import ym.GapFlow8

namespace GapFlow32

open YMChain GKS LinkIntegral LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist
  SU2Char HeatPair MigdalCone

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- the number of rungs of the β ≤ 32 ladder -/
def K32 : Nat := 273

/-- the flow after the ladder -/
def X32 (t : R) (M j : Nat) : List R :=
  FlowIter.itX K O F (FlowIter.itX K O F (WilsonCone.wl K O F t 319 (M + 2)) M K32) (FlowIter.itM M K32) j

theorem cone32 (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (htne : t ≠ K.zero) (ht8 : O.le t (cN K 16)) (M : Nat) (hM : 4095 ≤ M) :
    ∀ j, ConeBound.Bd K O (pwR K h 4) 0 (K.one :: GapFlow8.nrm K O F (X32 K O F t M (4 + j))) := by
  have w0 := WilsonFlowBig.wilson_flow64 K O F h1 h10 t ht0 (O.le_trans _ _ _ ht8 (SU2CharExp.cN_mono K O h1 _ _ (by decide : 16 ≤ 32))) htne M hM 0
  have Lf := LadderFin.ladder_fin K O F h1 h10 _ M w0.1 w0.2.1 w0.2.2 (LadderMain32.Ref K O F M) K32
    (LadderMain32.rungs K O F h1 h10 M hM) (LadderMain32.start K O F h1 h10 t ht0 htne ht8 M hM) K32 (Nat.le_refl _)
  have s0 := RefScalar.rat_nn K O F h1 h10 1 7 (by decide)
  have r0 := FlowRC.below_RC K O _ s0 _ _ Lf.1 (LadderMain32.finish K O F h1 h10 M hM)
  exact GapFlow8.cone_gen K O F h1 h10 h hh h0 _ _ Lf.2.1 Lf.2.2.1 Lf.2.2.2 r0

/-- **G78j: the volume-uniform gap of the flowed SU(2) plaquette weight for β = 2t ≤ 32** (MK model, every list
  length M + 2 ≥ 4097, every step K32 + 4 + j): connected plaquette correlations ≤ ½·B·2⁻ᴿ (GapFlow.gap_of_cone) -/
theorem gap32 (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (htne : t ≠ K.zero) (ht8 : O.le t (cN K 16)) (M : Nat) (hM : 4095 ≤ M)
    (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (Ml : List Bool) (hMl : Ml.length = Pn.length) (j : Nat) :
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (GapFlow8.nrm K O F (X32 K O F t M (4 + j))) (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h 13))
    let κ := K.add K.one (pwR K h 10)
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w Ml (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w Ml (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w Ml Up) (ZxH K O H w Ml Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h 6)) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w Ml (fun _ => K.one)) (ZxH K O H w Ml (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w Ml (fun _ => K.one)) (ZxH K O H w Ml (fun _ => K.one)))) :=
  GapFlow.gap_of_cone K O F H DH h1 h10 h hh h0 (fun j => GapFlow8.nrm K O F (X32 K O F t M j)) 4
    (cone32 K O F h1 h10 h hh h0 t ht0 htne ht8 M hM) LL hLL hL Pn hnd hv p0 q0 hpq tr Up Uq K1 Rr htd hUp hUq
    hta hUpa hUqa htr hK1 hUpb hUqb hdist Ml hMl j

end GapFlow32

#print axioms GapFlow32.cone32
#print axioms GapFlow32.gap32

ym/GapFlow8.lean

lean_all/ym/GapFlow8.lean

/-
  ym/GapFlow8 — T45, G78h: the volume-uniform gap of the Migdal–Kadanoff flow for β = 2t ≤ 8 (all characters,
  every list length M + 2 ≥ 72). After the certified ladder (LadderMain: 103 rungs) the flow is in RC(1/7); along the
  flow the ratio class sharpens (GapSig.sig: σ_{4+j} ≤ h²⁴ ≤ h¹⁶). The normalised flowed weight 1 :: a_j
  (a_j = flow coefficients 1, 2, … divided by coefficient 0) then lies in the cone Bd(h⁴) (RatioStep.RC_bd), and
  GapFlow.gap_of_cone gives the connected plaquette correlation bound at every step 103 + 4 + j.
  Lean 4 core only, no axioms.
-/
import ym.LadderMain
import ym.GapSig
import ym.GapFlow

namespace GapFlow8

open YMChain GKS LinkIntegral LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist
  SU2Char HeatPair MigdalCone

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O) {G : Type} {L : Nat} (H : Haar K O G L)

/-- the normalised tail: coefficients 1, 2, … of X divided by coefficient 0 -/
def nrm (X : List R) : List R := lmap (fun k => K.mul (co K X (k + 1)) (F.inv (co K X 0))) 0 X.length

theorem co_nrm (X : List R) (k : Nat) : co K (nrm K O F X) k = K.mul (co K X (k + 1)) (F.inv (co K X 0)) := by
  unfold nrm
  cases Nat.lt_or_ge k X.length with
  | inl hl => rw [RatioStep.co_lmap K _ X.length 0 k hl, Nat.zero_add]
  | inr hg =>
    rw [RatioStep.co_lmap_ge K _ X.length 0 k hg, HeatLR.co_out K X (k + 1) (Nat.le_trans hg (Nat.le_succ k))]
    lib_ring

/-- **normalisation keeps the ratio class** -/
theorem nrm_RC (h1 : O.le K.zero K.one) (σ : R) (hσ : O.le K.zero σ) (X : List R) (hX : RatioStep.RC K O σ X)
    (hne : co K X 0 ≠ K.zero) : RatioStep.RC K O σ (K.one :: nrm K O F X) := by
  have i0 := F.inv_pos _ (hX.1 0) hne
  have e0 := F.mul_inv _ hne
  refine ⟨fun k => ?_, fun k => ?_⟩
  · cases k with
    | zero => exact h1
    | succ k => show O.le K.zero (co K (nrm K O F X) k); rw [co_nrm]; exact O.mul_nonneg _ _ (hX.1 _) i0
  · cases k with
    | zero =>
      show O.le (co K (nrm K O F X) 0) (K.mul σ K.one)
      rw [co_nrm]
      have u := O.mul_le_mul_right _ _ _ (hX.2 0) i0
      refine O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ ?_)
      calc K.mul (K.mul σ (co K X 0)) (F.inv (co K X 0)) = K.mul σ (K.mul (co K X 0) (F.inv (co K X 0))) := by lib_ring
        _ = K.mul σ K.one := by rw [e0]
    | succ k =>
      show O.le (co K (nrm K O F X) (k + 1)) (K.mul σ (co K (nrm K O F X) k))
      rw [co_nrm, co_nrm]
      have u := O.mul_le_mul_right _ _ _ (hX.2 (k + 1)) i0
      exact O.le_trans _ _ _ u (TripleE.le_of_eq' K O _ _ (by lib_ring))

/-- the flow after the ladder: step j after the 103 certified rungs -/
def X8 (t : R) (M j : Nat) : List R :=
  FlowIter.itX K O F (FlowIter.itX K O F (WilsonCone.wl K O F t 28 (M + 2)) M 103) (FlowIter.itM M 103) j

/-- **generic**: a v-good, a-noninc list in RC(1/7) flows into the cone Bd(h⁴) from step 4 on -/
theorem cone_gen (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (X : List R) (M : Nat) (hXg : L1Full.Good K O X) (hXa : FlowStep.ANoninc K O X) (hX : X.length = M + 2)
    (hR : RatioStep.RC K O (RefScalar.rat K O F 1 7) X) :
    ∀ j, ConeBound.Bd K O (pwR K h 4) 0 (K.one :: nrm K O F (FlowIter.itX K O F X M (4 + j))) := by
  have FR := FlowRatio.flow_ratio K O F h1 h10 X M hXg hXa hX (GapSig.sig K O F)
    (GapSig.sig_nn K O F h1 h10) (fun i => O.le_refl _) hR
  intro j
  have fr := FR (4 + j)
  have b16 : O.le (GapSig.sig K O F (4 + j)) (pwR K (pwR K h 4) 4) := by
    rw [Migdal.pw_pw]
    exact O.le_trans _ _ _ (GapSig.sig_small K O F h1 h10 h hh h0 j) (GapSig.pw_anti K O h1 h hh h0 16 8)
  have rc := RatioStep.RC_mono K O _ _ b16 _ fr.2.2.2
  have hlen : 0 < (FlowIter.itX K O F X M (4 + j)).length := by rw [fr.2.2.1]; exact Nat.zero_lt_succ _
  have hne : co K (FlowIter.itX K O F X M (4 + j)) 0 ≠ K.zero := fr.1.2.1 0 hlen
  have hr4 := AreaLower.pw_nn K O h h0 h1 4
  exact RatioStep.RC_bd K O h1 _ _ (AreaLower.pw_nn K O _ hr4 h1 4) hr4 (O.le_refl _) _
    (nrm_RC K O F h1 _ (AreaLower.pw_nn K O _ hr4 h1 4) _ rc hne)

/-- **the flowed weight is in the cone Bd(h⁴) from step 103 + 4 on** (β ≤ 8) -/
theorem cone8 (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (htne : t ≠ K.zero) (ht4 : O.le t (cN K 4)) (M : Nat) (hM : 70 ≤ M) :
    ∀ j, ConeBound.Bd K O (pwR K h 4) 0 (K.one :: nrm K O F (X8 K O F t M (4 + j))) := by
  have hM63 : 63 ≤ M := Nat.le_trans (by decide) hM
  have w0 := WilsonFlowBig.wilson_flow8 K O F h1 h10 t ht0 ht4 htne M hM63 0
  have Lf := LadderFin.ladder_fin K O F h1 h10 _ M w0.1 w0.2.1 w0.2.2 (LadderMain.Ref K O F M) 103
    (LadderMain.rungs K O F h1 h10 M hM) (LadderMain.start K O F h1 h10 t ht0 htne ht4 M hM) 103 (Nat.le_refl _)
  have s0 := RefScalar.rat_nn K O F h1 h10 1 7 (by decide)
  have r0 := FlowRC.below_RC K O _ s0 _ _ Lf.1 (LadderMain.finish K O F h1 h10 M hM)
  exact cone_gen K O F h1 h10 h hh h0 _ _ Lf.2.1 Lf.2.2.1 Lf.2.2.2 r0

/-- **G78h: the volume-uniform gap of the flowed SU(2) plaquette weight for β = 2t ≤ 8** (MK model, every list
  length M + 2 ≥ 72, every step 107 + j): connected plaquette correlations ≤ ½·B·2⁻ᴿ, as in GapFlow.gap_of_cone -/
theorem gap8 (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h)
    (t : R) (ht0 : O.le K.zero t) (htne : t ≠ K.zero) (ht4 : O.le t (cN K 4)) (M : Nat) (hM : 70 ≤ M)
    (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid 4 p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (tr : Nat → List G → R) (Up Uq : List G → R) (K1 : R) (Rr : Nat)
    (htd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (tr i)) (hUp : depOn ((vec LL p0).map nzb) Up)
    (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hta : ∀ i, H.adm (tr i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (htr : ∀ i x, O.le (K.neg (K.add K.one K.one)) (tr i x) ∧ O.le (tr i x) (K.add K.one K.one))
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (Ml : List Bool) (hMl : Ml.length = Pn.length) (j : Nat) :
    let f0 : Nat → List G → R := fun i x => SU2Char.dot K 1 (nrm K O F (X8 K O F t M (4 + j))) (ChiBound.c K (tr i x))
    let s := F.inv (K.add K.one (pwR K h 13))
    let κ := K.add K.one (pwR K h 10)
    let w : Nat → List G → R := fun i x => K.add s (K.mul s (f0 i x))
    let Dd := K.add (K.mul (ZxH K O H w Ml (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w Ml (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w Ml Up) (ZxH K O H w Ml Uq)))
    let sc := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) sc))
      (K.mul (pwR K (K.add K.one (pwR K h 6)) sc) (pwR K h Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w Ml (fun _ => K.one)) (ZxH K O H w Ml (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w Ml (fun _ => K.one)) (ZxH K O H w Ml (fun _ => K.one)))) :=
  GapFlow.gap_of_cone K O F H DH h1 h10 h hh h0 (fun j => nrm K O F (X8 K O F t M j)) 4
    (cone8 K O F h1 h10 h hh h0 t ht0 htne ht4 M hM) LL hLL hL Pn hnd hv p0 q0 hpq tr Up Uq K1 Rr htd hUp hUq
    hta hUpa hUqa htr hK1 hUpb hUqb hdist Ml hMl j

end GapFlow8

#print axioms GapFlow8.co_nrm
#print axioms GapFlow8.nrm_RC
#print axioms GapFlow8.cone_gen
#print axioms GapFlow8.cone8
#print axioms GapFlow8.gap8

ym/GapG.lean

lean_all/ym/GapG.lean

/-
  ym/GapG — T45, cycle 56 (Lad2, any finite gauge group, any dimension): exponential clustering uniform in the volume.

  Original system: fields x ∈ cfgs els L, plaquette weights w_i = c₀ + f_i with m ≤ w_i ≤ 1, |f_i| ≤ ε, 0 ≤ c₀ ≤ 1,
  κ m = 1, 1 ≤ κ; observables U_p, U_q with |U| ≤ K₁ on the links of p resp. q (p, q share no link).
  Z_X = Σ_x X(x) Π_{i∈M} w_i(x)  (DupAlg.Zx).
  Hypotheses: every plaquette touches ≤ Dg plaquettes; ε̂ κ̂^{Dg+1} ≤ u x with ε̂ = ε + ε + ε², κ̂ = κ²;
  x(1+y)^Dg ≤ y; the ball of R closure steps around p contains no plaquette touching q.
    gap_G     −B Z_1² ≤ 2 (Z_{U_pU_q} Z_1 − Z_{U_p} Z_{U_q}) ≤ B Z_1²,   B = (2K₁)² κ̂^ŝ (1+y)^ŝ u^R
  i.e. |⟨U_pU_q⟩ − ⟨U_p⟩⟨U_q⟩| ≤ ½ B, decaying like u^R in the separation, uniformly in the volume — the
  strong-coupling mass gap for every finite gauge group (2I included), without GKS and without log Z.

  Lean 4 core only, proofs by hand, no axioms.
-/
import ym.DupAlg

namespace GapG

open YMChain GKS LinkIntegral LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed Dup DupAlg AreaG
  Join Reach

variable {R : Type} (K : DetChain.CRing R) {G : Type}

theorem depOn_add (S : List Bool) (F H : List G → R) (hF : depOn S F) (hH : depOn S H) :
    depOn S (fun c => K.add (F c) (H c)) := fun c c' h => by
  show K.add (F c) (H c) = K.add (F c') (H c'); rw [hF c c' h, hH c c' h]

theorem depOn_neg (S : List Bool) (F : List G → R) (hF : depOn S F) : depOn S (fun c => K.neg (F c)) :=
  fun c c' h => by show K.neg (F c) = K.neg (F c'); rw [hF c c' h]

theorem depOn_mul' (S : List Bool) (F H : List G → R) (hF : depOn S F) (hH : depOn S H) :
    depOn S (fun c => K.mul (F c) (H c)) := fun c c' h => by
  show K.mul (F c) (H c) = K.mul (F c') (H c'); rw [hF c c' h, hH c c' h]

theorem nzb_add (a b : Nat) : (nzb a || nzb b) = true → nzb (a + b) = true := by
  intro h
  cases a with
  | zero => cases b with
    | zero => exact absurd h (by decide)
    | succ b => rw [Nat.zero_add]; rfl
  | succ a => rw [Nat.succ_add]; rfl

theorem supp_zadd : ∀ p q : List Nat, p.length = q.length →
    leB (orB (p.map nzb) (q.map nzb)) ((zadd p q).map nzb)
  | [], [], _ => trivial
  | [], _ :: _, h => absurd h Nat.noConfusion
  | _ :: _, [], h => absurd h Nat.noConfusion
  | a :: p, b :: q, h => ⟨nzb_add a b, supp_zadd p q (Nat.succ.inj h)⟩

theorem prodW_congr (f g : Nat → List G → R) (h : ∀ i x, f i x = g i x) (x : List G) :
    ∀ (k : Nat) (M : List Bool), prodW K f k M x = prodW K g k M x
  | _, [] => rfl
  | k, b :: M => by
    show K.mul (if b = true then f k x else K.one) (prodW K f (k + 1) M x)
      = K.mul (if b = true then g k x else K.one) (prodW K g (k + 1) M x)
    rw [h, prodW_congr f g h x (k + 1) M]

variable (O : ORing K)

theorem bnd_add (a b α β : R) (ha : O.le (K.neg α) a ∧ O.le a α) (hb : O.le (K.neg β) b ∧ O.le b β) :
    O.le (K.neg (K.add α β)) (K.add a b) ∧ O.le (K.add a b) (K.add α β) := by
  rw [neg_add' K]
  exact ⟨O.add_le_add _ _ _ _ ha.1 hb.1, O.add_le_add _ _ _ _ ha.2 hb.2⟩

theorem bnd_neg (a α : R) (ha : O.le (K.neg α) a ∧ O.le a α) : O.le (K.neg α) (K.neg a) ∧ O.le (K.neg a) α := by
  have h1 := neg_le_neg K O _ _ ha.2
  have h2 := neg_le_neg K O _ _ ha.1
  rw [neg_neg' K] at h2
  exact ⟨h1, h2⟩

theorem bnd_unit (h1 : O.le K.zero K.one) (a : R) (ha0 : O.le K.zero a) (ha1 : O.le a K.one) :
    O.le (K.neg K.one) a ∧ O.le a K.one :=
  ⟨O.le_trans _ _ _ (le_of_neg O h1) ha0, ha1⟩
where
  le_of_neg (O : ORing K) (h1 : O.le K.zero K.one) : O.le (K.neg K.one) K.zero := by
    have := neg_le_neg K O _ _ h1
    have e : K.neg K.zero = K.zero := by have := K.add_neg K.zero; rw [K.zero_add] at this; exact this
    rw [e] at this; exact this

theorem wid (c0 a b : R) :
    K.add (K.mul c0 c0) (K.add (K.add (K.mul c0 a) (K.mul c0 b)) (K.mul a b)) = K.mul (K.add c0 a) (K.add c0 b) := by
  rw [K.distrib, DetChain.right_distrib, DetChain.right_distrib,
    K.add_assoc (K.mul c0 c0) (K.mul a c0) (K.add (K.mul c0 b) (K.mul a b)), K.mul_comm a c0,
    ← K.add_assoc (K.mul c0 a) (K.mul c0 b) (K.mul a b)]

/-- **Clustering for any finite gauge group** (uniform in the volume). -/
theorem gap_G (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero) (els : List G) (hels : 1 ≤ els.length)
    (L : Nat) (P : List (List Nat)) (hP : ∀ i, i < P.length → (nthL P i).length = L)
    (p q : List Nat) (hpL : p.length = L) (hqL : q.length = L) (hpq : disjN p q)
    (f : Nat → List G → R) (Up Uq : List G → R) (c0 m κ ε K1 u x y : R) (Dg Rr : Nat)
    (hfd : ∀ i, depOn (spP L P i) (f i)) (hUp : depOn (p.map nzb) Up) (hUq : depOn (q.map nzb) Uq)
    (hc0 : O.le K.zero c0) (hc1 : O.le c0 K.one) (hm : O.le K.zero m) (hm1 : O.le m K.one)
    (hκ1 : O.le K.one κ) (hκm : K.mul κ m = K.one)
    (hw : ∀ i x, O.le m (K.add c0 (f i x))) (hw1 : ∀ i x, O.le (K.add c0 (f i x)) K.one)
    (he : O.le K.zero ε) (hf : ∀ i x, O.le (K.neg ε) (f i x) ∧ O.le (f i x) ε)
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hu0 : O.le K.zero u) (hu1 : O.le u K.one) (hx : O.le K.zero x) (hy : O.le K.zero y)
    (hdeg : ∀ r, memL r P → cnt (P.map (fun q' => touch q' r)) ≤ Dg)
    (hsmall : O.le (K.mul (K.add (K.add ε ε) (K.mul ε ε)) (pwR K (K.mul κ κ) (Dg + 1))) (K.mul u x))
    (hxy : O.le (K.mul x (pwR K (K.add K.one y) Dg)) y)
    (hfar : ∀ i, i < P.length → nthB (ball (fun r => touch r p) P Rr) i = true → touch (nthL P i) q = false)
    (M : List Bool) (hM : M.length = P.length) :
    let w : Nat → List G → R := fun i x => K.add c0 (f i x)
    let D := K.add (K.mul (Zx K els L w M (fun x => K.mul (Up x) (Uq x))) (Zx K els L w M (fun _ => K.one)))
      (K.neg (K.mul (Zx K els L w M Up) (Zx K els L w M Uq)))
    let s := cnt (P.map (fun r => touch r (zadd p q)))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) s))
      (K.mul (pwR K (K.add K.one y) s) (pwR K u Rr))
    O.le (K.neg (K.mul B (K.mul (Zx K els L w M (fun _ => K.one)) (Zx K els L w M (fun _ => K.one))))) (K.add D D) ∧
      O.le (K.add D D) (K.mul B (K.mul (Zx K els L w M (fun _ => K.one)) (Zx K els L w M (fun _ => K.one)))) := by
  intro w D s B
  let fh : Nat → List (G × G) → R := fun i yy =>
    K.add (K.add (K.mul c0 (f i (fstL yy))) (K.mul c0 (f i (sndL yy)))) (K.mul (f i (fstL yy)) (f i (sndL yy)))
  let Fp : List (G × G) → R := fun yy => K.add (Up (fstL yy)) (K.neg (Up (sndL yy)))
  let Fq : List (G × G) → R := fun yy => K.add (Uq (fstL yy)) (K.neg (Uq (sndL yy)))
  let χh : List (G × G) → R := fun yy => K.mul (Fp yy) (Fq yy)
  have whd : ∀ i yy, K.add (K.mul c0 c0) (fh i yy) = What K w i yy := fun i yy => wid K c0 _ _
  -- dependence
  have hfd' : ∀ i, depOn (spP L P i) (fh i) := fun i =>
    depOn_add K _ _ _ (depOn_add K _ _ _
      (depOn_mul' K _ (fun _ => c0) _ (depOn_const _ _) (dep_fst _ _ (hfd i)))
      (depOn_mul' K _ (fun _ => c0) _ (depOn_const _ _) (dep_snd _ _ (hfd i))))
      (depOn_mul' K _ _ _ (dep_fst _ _ (hfd i)) (dep_snd _ _ (hfd i)))
  have hFp : depOn (p.map nzb) Fp := depOn_add K _ _ _ (dep_fst _ _ hUp) (depOn_neg K _ _ (dep_snd _ _ hUp))
  have hFq : depOn (q.map nzb) Fq := depOn_add K _ _ _ (dep_fst _ _ hUq) (depOn_neg K _ _ (dep_snd _ _ hUq))
  have hpn : (p.map nzb).length = (q.map nzb).length := (len_map' p).trans (hpL.trans (hqL.symm.trans (len_map' q).symm))
  have hχd : depOn ((zadd p q).map nzb) χh :=
    depOn_mono _ _ χh (supp_zadd p q (hpL.trans hqL.symm)) (depOn_mul K _ _ Fp Fq hpn hFp hFq)
  have hnL : (zadd p q).length = L := (AreaLower.len_zadd_le p q (by rw [hpL, hqL]; exact Nat.le_refl _)).trans hpL
  -- symmetry
  have hfs : ∀ i yy, fh i (swapL yy) = fh i yy := fun i yy => by
    show K.add (K.add (K.mul c0 (f i (fstL (swapL yy)))) (K.mul c0 (f i (sndL (swapL yy))))) (K.mul (f i (fstL (swapL yy))) (f i (sndL (swapL yy)))) = _
    rw [fst_swap, snd_swap, K.add_comm (K.mul c0 (f i (sndL yy))), K.mul_comm (f i (sndL yy))]
  have hFpa : ∀ yy, Fp (swapL yy) = K.neg (Fp yy) := fun yy => by
    show K.add (Up (fstL (swapL yy))) (K.neg (Up (sndL (swapL yy)))) = K.neg (K.add (Up (fstL yy)) (K.neg (Up (sndL yy))))
    rw [fst_swap, snd_swap, neg_add' K, neg_neg' K, K.add_comm]
  -- constants
  have hb1 : ∀ i x', O.le (K.neg K.one) (K.add c0 (f i x')) ∧ O.le (K.add c0 (f i x')) K.one := fun i x' =>
    bnd_unit K O h1 _ (O.le_trans _ _ _ hm (hw i x')) (hw1 i x')
  have hc0b := bnd_unit K O h1 c0 hc0 hc1
  have hfh : ∀ i yy, O.le (K.neg (K.add (K.add ε ε) (K.mul ε ε))) (fh i yy) ∧ O.le (fh i yy) (K.add (K.add ε ε) (K.mul ε ε)) := by
    intro i yy
    have a1 := bnd_mul K O _ _ _ _ h1 he hc0b (hf i (fstL yy))
    have a2 := bnd_mul K O _ _ _ _ h1 he hc0b (hf i (sndL yy))
    have a3 := bnd_mul K O _ _ _ _ he he (hf i (fstL yy)) (hf i (sndL yy))
    rw [K.one_mul] at a1 a2
    exact bnd_add K O _ _ _ _ (bnd_add K O _ _ _ _ a1 a2) a3
  have hwh : ∀ i yy, O.le (K.mul m m) (K.add (K.mul c0 c0) (fh i yy)) := fun i yy => by
    rw [whd]; exact Gap.mul_le_mul4 K O _ _ _ _ hm hm (O.le_trans _ _ _ hm (hw i _)) (hw i _) (hw i _)
  have hwh1 : ∀ i yy, O.le (K.add (K.mul c0 c0) (fh i yy)) K.one := fun i yy => by
    rw [whd]
    have := Gap.mul_le_mul4 K O _ _ _ _ (O.le_trans _ _ _ hm (hw i (fstL yy))) (O.le_trans _ _ _ hm (hw i (sndL yy))) h1
      (hw1 i _) (hw1 i _)
    rw [K.one_mul] at this; exact this
  have hκm' : K.mul (K.mul κ κ) (K.mul m m) = K.one := by
    rw [K.mul_assoc, ← K.mul_assoc κ m m, K.mul_comm κ m, K.mul_assoc m κ m, hκm, K.mul_comm m K.one, K.one_mul, hκm]
  have hFpb : ∀ yy, O.le (K.neg (K.add K1 K1)) (Fp yy) ∧ O.le (Fp yy) (K.add K1 K1) := fun yy =>
    bnd_add K O _ _ _ _ (hUpb _) (bnd_neg K O _ _ (hUpb _))
  have hFqb : ∀ yy, O.le (K.neg (K.add K1 K1)) (Fq yy) ∧ O.le (Fq yy) (K.add K1 K1) := fun yy =>
    bnd_add K O _ _ _ _ (hUqb _) (bnd_neg K O _ _ (hUqb _))
  have hK2 : O.le K.zero (K.add K1 K1) := by have := O.add_le_add _ _ _ _ hK1 hK1; rw [K.zero_add] at this; exact this
  have hχb : ∀ yy, O.le (K.neg (K.mul (K.add K1 K1) (K.add K1 K1))) (χh yy) ∧ O.le (χh yy) (K.mul (K.add K1 K1) (K.add K1 K1)) :=
    fun yy => bnd_mul K O _ _ _ _ hK2 hK2 (hFpb yy) (hFqb yy)
  have he2 : O.le K.zero (K.add (K.add ε ε) (K.mul ε ε)) := by
    have a := O.add_le_add _ _ _ _ he he; rw [K.zero_add] at a
    have b := O.add_le_add _ _ _ _ a (O.mul_nonneg _ _ he he); rw [K.zero_add] at b; exact b
  -- vanishing of small polymers
  have hvan : ∀ A : List Bool, A.length = P.length → clS (fun r => touch r (zadd p q)) P A = A → cnt A < Rr →
      aW K (pairs els) L fh χh A = K.zero := by
    intro A hA _ hsm
    refine vanish_join K O h1 h10 els hels L P hP p q hpL hqL hpq fh Fp Fq hfd' hFp hFq hfs hFpa A hA (fun i hi hcl => ?_)
    cases e : touch (nthL P i) q with
    | false => rfl
    | true =>
      exfalso
      let σp : List Nat → Bool := fun r => touch r p
      have hb : nthB (ball σp P Rr) i = false := by
        cases eb : nthB (ball σp P Rr) i
        · rfl
        · rw [hfar i hi eb] at e; exact absurd e Bool.noConfusion
      have hcl_len : (clS σp P A).length = P.length := cl_len (Vs σp P) P.length (hV σp P) A hA
      have hR := reach σp P (clS σp P A) hcl_len (cl_idem (Vs σp P) P.length (hV σp P) A hA) Rr i hcl hb
      have hle := leB_cnt _ _ (cl_le (Vs σp P) P.length (hV σp P) A hA)
      exact Nat.lt_irrefl _ (Nat.lt_of_lt_of_le hsm (Nat.le_trans hR hle))
  -- area_G in the duplicated system
  have ag := area_G K O h1 h10 (pairs els) (len_pairs els hels) L P (zadd p q) fh χh (K.mul c0 c0) (K.mul m m) (K.mul κ κ)
    (K.add (K.add ε ε) (K.mul ε ε)) (K.mul (K.add K1 K1) (K.add K1 K1)) u x y Dg Rr hP hnL hχd hfd'
    (O.mul_nonneg _ _ hc0 hc0) (by have := Gap.mul_le_mul4 K O _ _ _ _ hc0 hc0 h1 hc1 hc1; rw [K.one_mul] at this; exact this)
    (O.mul_nonneg _ _ hm hm) (by have := Gap.mul_le_mul4 K O _ _ _ _ hm hm h1 hm1 hm1; rw [K.one_mul] at this; exact this)
    (GPerm.one_le_mul K O _ _ hκ1 hκ1 h1) hκm' hwh hwh1 he2 hfh
    (O.mul_nonneg _ _ hK2 hK2) hχb hu0 hu1 hx hy hdeg hsmall hxy hvan M hM
  -- translate
  have eZ0 : Z0 K (pairs els) L fh (K.mul c0 c0) M = K.mul (Zx K els L w M (fun _ => K.one)) (Zx K els L w M (fun _ => K.one)) := by
    show sumK K (fun yy => prodW K (fun i yy => K.add (K.mul c0 c0) (fh i yy)) 0 M yy) _ = _
    rw [sumK_ext K _ _ (fun yy => prodW_congr K _ _ whd yy 0 M)]
    exact Zdup0 K els L w M
  have eZW : ZW K (pairs els) L fh χh (K.mul c0 c0) M = K.add D D := by
    show sumK K (fun yy => K.mul (χh yy) (prodW K (fun i yy => K.add (K.mul c0 c0) (fh i yy)) 0 M yy)) _ = _
    rw [sumK_ext K _ _ (fun yy => by rw [prodW_congr K _ _ whd yy 0 M])]
    exact ZdupW K els L w M Up Uq
  have ag' := ag
  simp only at ag'
  rw [eZ0, eZW] at ag'
  exact ag'

end GapG

#print axioms GapG.gap_G

ym/GapH.lean

lean_all/ym/GapH.lean

/-
  ym/GapH — T45, cycle 65 (compact groups with a Haar structure and its duplicate, any dimension): exponential
  clustering at strong coupling, uniform in the volume — GapG.gap_G over Haar.
    gap_H     −B Z₁² ≤ 2 (Z_{U_pU_q} Z₁ − Z_{U_p} Z_{U_q}) ≤ B Z₁²,   B = (2K₁)² κ̂^ŝ (1+y)^ŝ u^R
  For SU(2): the strong-coupling mass gap (clustering of plaquette correlations with rate −ln u per closure step) in
  every dimension, uniformly in the volume, given the cited Haar measure (H0) and its product (DupHaar).

  Lean 4 core only, proofs by hand, no axioms.
-/
import ym.DupAlgH
import ym.GapG

namespace GapH

open YMChain GKS LinkIntegral LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) {G : Type} {L : Nat} (H : Haar K O G L)

theorem gap_H (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero) (P : List (List Nat)) (hP : ∀ i, i < P.length → (nthL P i).length = L)
    (p q : List Nat) (hpL : p.length = L) (hqL : q.length = L) (hpq : disjN p q)
    (f : Nat → List G → R) (Up Uq : List G → R) (c0 m κ ε K1 u x y : R) (Dg Rr : Nat)
    (hfd : ∀ i, depOn (spP L P i) (f i)) (hUp : depOn (p.map nzb) Up) (hUq : depOn (q.map nzb) Uq)
    (hfaG : ∀ i, H.adm (f i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (hc0 : O.le K.zero c0) (hc1 : O.le c0 K.one) (hm : O.le K.zero m) (hm1 : O.le m K.one)
    (hκ1 : O.le K.one κ) (hκm : K.mul κ m = K.one)
    (hw : ∀ i x, O.le m (K.add c0 (f i x))) (hw1 : ∀ i x, O.le (K.add c0 (f i x)) K.one)
    (he : O.le K.zero ε) (hf : ∀ i x, O.le (K.neg ε) (f i x) ∧ O.le (f i x) ε)
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hu0 : O.le K.zero u) (hu1 : O.le u K.one) (hx : O.le K.zero x) (hy : O.le K.zero y)
    (hdeg : ∀ r, memL r P → cnt (P.map (fun q' => touch q' r)) ≤ Dg)
    (hsmall : O.le (K.mul (K.add (K.add ε ε) (K.mul ε ε)) (pwR K (K.mul κ κ) (Dg + 1))) (K.mul u x))
    (hxy : O.le (K.mul x (pwR K (K.add K.one y) Dg)) y)
    (hfar : ∀ i, i < P.length → nthB (ball (fun r => touch r p) P Rr) i = true → touch (nthL P i) q = false)
    (M : List Bool) (hM : M.length = P.length) :
    let w : Nat → List G → R := fun i x => K.add c0 (f i x)
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let s := cnt (P.map (fun r => touch r (zadd p q)))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) s))
      (K.mul (pwR K (K.add K.one y) s) (pwR K u Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one)))) := by
  intro w Dd s B
  let fh : Nat → List (G × G) → R := fun i yy =>
    K.add (K.add (K.mul c0 (f i (fstL yy))) (K.mul c0 (f i (sndL yy)))) (K.mul (f i (fstL yy)) (f i (sndL yy)))
  let Fp : List (G × G) → R := fun yy => K.add (Up (fstL yy)) (K.neg (Up (sndL yy)))
  let Fq : List (G × G) → R := fun yy => K.add (Uq (fstL yy)) (K.neg (Uq (sndL yy)))
  let χh : List (G × G) → R := fun yy => K.mul (Fp yy) (Fq yy)
  have whd : ∀ i yy, K.add (K.mul c0 c0) (fh i yy) = What K w i yy := fun i yy => wid K c0 _ _
  -- dependence
  have hfd' : ∀ i, depOn (spP L P i) (fh i) := fun i =>
    depOn_add K _ _ _ (depOn_add K _ _ _
      (depOn_mul' K _ (fun _ => c0) _ (depOn_const _ _) (dep_fst _ _ (hfd i)))
      (depOn_mul' K _ (fun _ => c0) _ (depOn_const _ _) (dep_snd _ _ (hfd i))))
      (depOn_mul' K _ _ _ (dep_fst _ _ (hfd i)) (dep_snd _ _ (hfd i)))
  have hFp : depOn (p.map nzb) Fp := depOn_add K _ _ _ (dep_fst _ _ hUp) (depOn_neg K _ _ (dep_snd _ _ hUp))
  have hFq : depOn (q.map nzb) Fq := depOn_add K _ _ _ (dep_fst _ _ hUq) (depOn_neg K _ _ (dep_snd _ _ hUq))
  have hpn : (p.map nzb).length = (q.map nzb).length := (len_map' p).trans (hpL.trans (hqL.symm.trans (len_map' q).symm))
  have hχd : depOn ((zadd p q).map nzb) χh :=
    depOn_mono _ _ χh (supp_zadd p q (hpL.trans hqL.symm)) (depOn_mul K _ _ Fp Fq hpn hFp hFq)
  have hnL : (zadd p q).length = L := (AreaLower.len_zadd_le p q (by rw [hpL, hqL]; exact Nat.le_refl _)).trans hpL
  -- symmetry
  have hfs : ∀ i yy, fh i (swapL yy) = fh i yy := fun i yy => by
    show K.add (K.add (K.mul c0 (f i (fstL (swapL yy)))) (K.mul c0 (f i (sndL (swapL yy))))) (K.mul (f i (fstL (swapL yy))) (f i (sndL (swapL yy)))) = _
    rw [fst_swap, snd_swap, K.add_comm (K.mul c0 (f i (sndL yy))), K.mul_comm (f i (sndL yy))]
  have hFpa : ∀ yy, Fp (swapL yy) = K.neg (Fp yy) := fun yy => by
    show K.add (Up (fstL (swapL yy))) (K.neg (Up (sndL (swapL yy)))) = K.neg (K.add (Up (fstL yy)) (K.neg (Up (sndL yy))))
    rw [fst_swap, snd_swap, neg_add' K, neg_neg' K, K.add_comm]
  have hfaH : ∀ i, DH.H2.adm (fh i) := fun i =>
    DH.H2.adm_add _ _ (DH.H2.adm_add _ _ (DH.H2.adm_mul _ _ (DH.H2.adm_const c0) (DH.lift_fst _ (hfaG i)))
      (DH.H2.adm_mul _ _ (DH.H2.adm_const c0) (DH.lift_snd _ (hfaG i))))
      (DH.H2.adm_mul _ _ (DH.lift_fst _ (hfaG i)) (DH.lift_snd _ (hfaG i)))
  have hFpad : DH.H2.adm Fp := DH.H2.adm_add _ _ (DH.lift_fst _ hUpa) (DH.H2.adm_neg _ (DH.lift_snd _ hUpa))
  have hFqad : DH.H2.adm Fq := DH.H2.adm_add _ _ (DH.lift_fst _ hUqa) (DH.H2.adm_neg _ (DH.lift_snd _ hUqa))
  have hχad : DH.H2.adm χh := DH.H2.adm_mul _ _ hFpad hFqad
  -- constants
  have hb1 : ∀ i x', O.le (K.neg K.one) (K.add c0 (f i x')) ∧ O.le (K.add c0 (f i x')) K.one := fun i x' =>
    bnd_unit K O h1 _ (O.le_trans _ _ _ hm (hw i x')) (hw1 i x')
  have hc0b := bnd_unit K O h1 c0 hc0 hc1
  have hfh : ∀ i yy, O.le (K.neg (K.add (K.add ε ε) (K.mul ε ε))) (fh i yy) ∧ O.le (fh i yy) (K.add (K.add ε ε) (K.mul ε ε)) := by
    intro i yy
    have a1 := bnd_mul K O _ _ _ _ h1 he hc0b (hf i (fstL yy))
    have a2 := bnd_mul K O _ _ _ _ h1 he hc0b (hf i (sndL yy))
    have a3 := bnd_mul K O _ _ _ _ he he (hf i (fstL yy)) (hf i (sndL yy))
    rw [K.one_mul] at a1 a2
    exact bnd_add K O _ _ _ _ (bnd_add K O _ _ _ _ a1 a2) a3
  have hwh : ∀ i yy, O.le (K.mul m m) (K.add (K.mul c0 c0) (fh i yy)) := fun i yy => by
    rw [whd]; exact Gap.mul_le_mul4 K O _ _ _ _ hm hm (O.le_trans _ _ _ hm (hw i _)) (hw i _) (hw i _)
  have hwh1 : ∀ i yy, O.le (K.add (K.mul c0 c0) (fh i yy)) K.one := fun i yy => by
    rw [whd]
    have := Gap.mul_le_mul4 K O _ _ _ _ (O.le_trans _ _ _ hm (hw i (fstL yy))) (O.le_trans _ _ _ hm (hw i (sndL yy))) h1
      (hw1 i _) (hw1 i _)
    rw [K.one_mul] at this; exact this
  have hκm' : K.mul (K.mul κ κ) (K.mul m m) = K.one := by
    rw [K.mul_assoc, ← K.mul_assoc κ m m, K.mul_comm κ m, K.mul_assoc m κ m, hκm, K.mul_comm m K.one, K.one_mul, hκm]
  have hFpb : ∀ yy, O.le (K.neg (K.add K1 K1)) (Fp yy) ∧ O.le (Fp yy) (K.add K1 K1) := fun yy =>
    bnd_add K O _ _ _ _ (hUpb _) (bnd_neg K O _ _ (hUpb _))
  have hFqb : ∀ yy, O.le (K.neg (K.add K1 K1)) (Fq yy) ∧ O.le (Fq yy) (K.add K1 K1) := fun yy =>
    bnd_add K O _ _ _ _ (hUqb _) (bnd_neg K O _ _ (hUqb _))
  have hK2 : O.le K.zero (K.add K1 K1) := by have := O.add_le_add _ _ _ _ hK1 hK1; rw [K.zero_add] at this; exact this
  have hχb : ∀ yy, O.le (K.neg (K.mul (K.add K1 K1) (K.add K1 K1))) (χh yy) ∧ O.le (χh yy) (K.mul (K.add K1 K1) (K.add K1 K1)) :=
    fun yy => bnd_mul K O _ _ _ _ hK2 hK2 (hFpb yy) (hFqb yy)
  have he2 : O.le K.zero (K.add (K.add ε ε) (K.mul ε ε)) := by
    have a := O.add_le_add _ _ _ _ he he; rw [K.zero_add] at a
    have b := O.add_le_add _ _ _ _ a (O.mul_nonneg _ _ he he); rw [K.zero_add] at b; exact b
  -- vanishing of small polymers
  have hvan : ∀ A : List Bool, A.length = P.length → clS (fun r => touch r (zadd p q)) P A = A → cnt A < Rr →
      aWH K O DH.H2 fh χh A = K.zero := by
    intro A hA _ hsm
    refine vanish_join_H K O H DH h1 P hP p q hpL hqL hpq fh Fp Fq hfd' hFp hFq hfs hFpa hfaH hFpad hFqad A hA (fun i hi hcl => ?_)
    cases e : touch (nthL P i) q with
    | false => rfl
    | true =>
      exfalso
      let σp : List Nat → Bool := fun r => touch r p
      have hb : nthB (ball σp P Rr) i = false := by
        cases eb : nthB (ball σp P Rr) i
        · rfl
        · rw [hfar i hi eb] at e; exact absurd e Bool.noConfusion
      have hcl_len : (clS σp P A).length = P.length := cl_len (Vs σp P) P.length (hV σp P) A hA
      have hR := reach σp P (clS σp P A) hcl_len (cl_idem (Vs σp P) P.length (hV σp P) A hA) Rr i hcl hb
      have hle := leB_cnt _ _ (cl_le (Vs σp P) P.length (hV σp P) A hA)
      exact Nat.lt_irrefl _ (Nat.lt_of_lt_of_le hsm (Nat.le_trans hR hle))
  -- area_G in the duplicated system
  have ag := area_H K O DH.H2 h1 h10 P (zadd p q) fh χh (K.mul c0 c0) (K.mul m m) (K.mul κ κ)
    (K.add (K.add ε ε) (K.mul ε ε)) (K.mul (K.add K1 K1) (K.add K1 K1)) u x y Dg Rr hP hnL hχd hfd' hfaH hχad
    (O.mul_nonneg _ _ hc0 hc0) (by have := Gap.mul_le_mul4 K O _ _ _ _ hc0 hc0 h1 hc1 hc1; rw [K.one_mul] at this; exact this)
    (O.mul_nonneg _ _ hm hm) (by have := Gap.mul_le_mul4 K O _ _ _ _ hm hm h1 hm1 hm1; rw [K.one_mul] at this; exact this)
    (GPerm.one_le_mul K O _ _ hκ1 hκ1 h1) hκm' hwh hwh1 he2 hfh
    (O.mul_nonneg _ _ hK2 hK2) hχb hu0 hu1 hx hy hdeg hsmall hxy hvan M hM
  -- translate
  have hwa : ∀ i, H.adm (w i) := fun i => H.adm_add _ _ (H.adm_const c0) (hfaG i)
  have eZ0 : Z0H K O DH.H2 fh (K.mul c0 c0) M = K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one)) := by
    show DH.H2.I (prodW K (fun i yy => K.add (K.mul c0 c0) (fh i yy)) 0 M) = _
    rw [DH.H2.I_ext _ _ (fun yy => prodW_congr K _ _ whd yy 0 M)]
    exact Zdup0_H K O H DH w M hwa
  have eZW : ZWH K O DH.H2 fh χh (K.mul c0 c0) M = K.add Dd Dd := by
    show DH.H2.I (fun yy => K.mul (χh yy) (prodW K (fun i yy => K.add (K.mul c0 c0) (fh i yy)) 0 M yy)) = _
    rw [DH.H2.I_ext _ _ (fun yy => by rw [prodW_congr K _ _ whd yy 0 M])]
    exact ZdupW_H K O H DH w M hwa Up Uq hUpa hUqa
  have ag' := ag
  simp only at ag'
  rw [eZ0, eZW] at ag'
  exact ag'

end GapH

#print axioms GapH.gap_H

ym/GapInputs.lean

lean_all/ym/GapInputs.lean

/-
  ym/GapInputs — T45, G4: the scalar hypotheses of the strong-coupling gap GapZd.gap_Zd at d = 4 hold for a weight
  within ε₀ = 2⁻¹³ of 1 (ChiBound.weight_near_one): with u = 1/2, x = 2⁻⁷, y = 2⁻⁶, κ = 1 + 2⁻¹⁰:
    hxy    x (1 + y)^{32} ≤ y              (Bernoulli: (1+z)^n (1 − n z) ≤ 1)
    hsmall (2ε + ε²)(κ²)^{33} ≤ u x        (ε = 2⁻¹³)
  and the normalisation w ↦ w/(1 + ε₀) gives c₀, m = 1/κ with m ≤ w ≤ 1. Lean 4 core only, no axioms.
-/
import ym.ChiBound

namespace GapInputs

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

abbrev two : R := K.add K.one K.one

/-- **Bernoulli, upper form:** (1 + z)^n (1 − n z) ≤ 1 for z ≥ 0. -/
theorem bern (h1 : O.le K.zero K.one) (z : R) (hz : O.le K.zero z) :
    ∀ n, O.le (K.mul (pwR K (K.add K.one z) n) (K.add K.one (K.neg (K.mul (cN K n) z)))) K.one
  | 0 => by
    show O.le (K.mul K.one (K.add K.one (K.neg (K.mul K.zero z)))) K.one
    have e : K.mul K.one (K.add K.one (K.neg (K.mul K.zero z))) = K.one := by lib_ring
    rw [e]; exact O.le_refl _
  | n + 1 => by
    have ih := bern h1 z hz n
    have P0 : O.le K.zero (pwR K (K.add K.one z) n) := by
      apply AreaLower.pw_nn K O _ _ h1
      have := O.add_le_add _ _ _ _ h1 hz; rw [K.zero_add] at this; exact this
    have N0 : O.le K.zero (K.add K.one (cN K n)) := by
      have := O.add_le_add _ _ _ _ h1 (SU2CharExp.cN_nn K O h1 n); rw [K.zero_add] at this; exact this
    have ee : O.le K.zero (K.mul (pwR K (K.add K.one z) n) (K.mul (K.add K.one (cN K n)) (K.mul z z))) :=
      O.mul_nonneg _ _ P0 (O.mul_nonneg _ _ N0 (O.mul_nonneg _ _ hz hz))
    have np : O.le (K.neg (K.mul (pwR K (K.add K.one z) n) (K.mul (K.add K.one (cN K n)) (K.mul z z)))) K.zero := by
      have := ChiBound.neg_le K O _ _ ee
      have e : K.neg K.zero = K.zero := by
        have := DetChain.add_neg' K K.zero; rw [DetChain.add_zero'] at this; exact this
      rw [e] at this; exact this
    have eq : K.mul (pwR K (K.add K.one z) (n + 1)) (K.add K.one (K.neg (K.mul (cN K (n + 1)) z)))
        = K.add (K.mul (pwR K (K.add K.one z) n) (K.add K.one (K.neg (K.mul (cN K n) z))))
            (K.neg (K.mul (pwR K (K.add K.one z) n) (K.mul (K.add K.one (cN K n)) (K.mul z z)))) := by
      show K.mul (K.mul (pwR K (K.add K.one z) n) (K.add K.one z)) (K.add K.one (K.neg (K.mul (K.add K.one (cN K n)) z))) = _
      lib_ring
    exact O.le_trans _ _ _ (ChiBound.le_of_eq_add K O _ _ _ eq np) ih

theorem cN_pow2 : ∀ k, cN K (2 ^ k) = pwR K (two K) k
  | 0 => SU2CharExp.cN_one K
  | k + 1 => by
    show cN K (2 ^ k * 2) = K.mul (pwR K (two K) k) (two K)
    rw [SU2CharExp.cN_mul, cN_pow2 k]
    show K.mul _ (K.add K.one (K.add K.one K.zero)) = _
    rw [DetChain.add_zero']

/-- 2^k h^k = 1 for h + h = 1 -/
theorem pow2_h (h : R) (hh : K.add h h = K.one) (k : Nat) : K.mul (pwR K (two K) k) (pwR K h k) = K.one := by
  rw [← GKS2.pwR_mul]
  have : K.mul (two K) h = K.one := by
    show K.mul (K.add K.one K.one) h = K.one
    have e : K.mul (K.add K.one K.one) h = K.add h h := by lib_ring
    rw [e, hh]
  rw [this, pw_one']

theorem hle_one (_h1 : O.le K.zero K.one) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h) : O.le h K.one := by
  have := O.add_le_add _ _ _ _ (O.le_refl h) h0; rw [DetChain.add_zero', hh] at this; exact this

theorem one_sub_h (h : R) (hh : K.add h h = K.one) : K.add K.one (K.neg h) = h := by
  rw [← hh]; lib_ring

/-- c·z ≤ h ⇒ h ≤ 1 − c·z -/
theorem h_le_sub (h : R) (hh : K.add h h = K.one) (cz : R) (hc : O.le cz h) : O.le h (K.add K.one (K.neg cz)) := by
  have := O.add_le_add _ _ _ _ (O.le_refl K.one) (ChiBound.neg_le K O _ _ hc)
  rw [one_sub_h K h hh] at this; exact this

/-- **hxy at d = 4:** 2⁻⁷ (1 + 2⁻⁶)^{32} ≤ 2⁻⁶. -/
theorem hxy4 (h1 : O.le K.zero K.one) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h) :
    O.le (K.mul (pwR K h 7) (pwR K (K.add K.one (pwR K h 6)) (4 * (2 * 4)))) (pwR K h 6) := by
  have p6 := AreaLower.pw_nn K O h h0 h1 6
  have b : O.le (K.mul (pwR K (K.add K.one (pwR K h 6)) 32) (K.add K.one (K.neg (K.mul (cN K (2 ^ 5)) (pwR K h 6))))) K.one :=
    bern K O h1 (pwR K h 6) p6 32
  have e1 : K.mul (cN K (2 ^ 5)) (pwR K h 6) = h := by
    rw [cN_pow2]
    show K.mul (pwR K (two K) 5) (K.mul (pwR K h 5) h) = h
    rw [← K.mul_assoc, pow2_h K h hh, K.one_mul]
  rw [e1, one_sub_h K h hh] at b
  have := O.mul_le_mul_right _ _ (pwR K h 6) b p6
  rw [K.one_mul] at this
  have e : K.mul (pwR K h 7) (pwR K (K.add K.one (pwR K h 6)) (4 * (2 * 4)))
      = K.mul (K.mul (pwR K (K.add K.one (pwR K h 6)) 32) h) (pwR K h 6) := by
    show K.mul (K.mul (pwR K h 6) h) (pwR K (K.add K.one (pwR K h 6)) 32) = _
    lib_ring
  rw [e]; exact this

/-- κ^66 · h ≤ 1 for κ = 1 + 2⁻¹⁰ -/
theorem k66 (h1 : O.le K.zero K.one) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h) :
    O.le (K.mul (pwR K (K.add K.one (pwR K h 10)) 66) h) K.one := by
  have hl := hle_one K O h1 h hh h0
  have p10 := AreaLower.pw_nn K O h h0 h1 10
  have b := bern K O h1 (pwR K h 10) p10 66
  have c1 : O.le (K.mul (cN K 66) (pwR K h 10)) (K.mul (cN K (2 ^ 7)) (pwR K h 10)) :=
    O.mul_le_mul_right _ _ _ (SU2CharExp.cN_mono K O h1 66 (2 ^ 7) (by decide)) p10
  have e1 : K.mul (cN K (2 ^ 7)) (pwR K h 10) = pwR K h 3 := by
    rw [cN_pow2]
    show K.mul (pwR K (two K) 7) (pwR K h (7 + 3)) = pwR K h 3
    rw [GKS.pwR_add, ← K.mul_assoc, pow2_h K h hh, K.one_mul]
  rw [e1] at c1
  have c2 : O.le (pwR K h 3) h := by
    have := ConeBound.pw_anti K O h1 h h0 hl 3 1 (by decide)
    rw [show pwR K h 1 = K.mul K.one h from rfl, K.one_mul] at this; exact this
  have hs := h_le_sub K O h hh _ (O.le_trans _ _ _ c1 c2)
  have P0 : O.le K.zero (pwR K (K.add K.one (pwR K h 10)) 66) := by
    apply AreaLower.pw_nn K O _ _ h1
    have := O.add_le_add _ _ _ _ h1 p10; rw [K.zero_add] at this; exact this
  have m := O.mul_le_mul_right _ _ _ hs P0
  rw [K.mul_comm h, K.mul_comm (K.add K.one _)] at m
  exact O.le_trans _ _ _ m b

/-- **hsmall at d = 4:** (2ε + ε²)(κ²)^{33} ≤ u x for ε = 2⁻¹³, κ = 1 + 2⁻¹⁰, u = 2⁻¹, x = 2⁻⁷. -/
theorem hsmall4 (h1 : O.le K.zero K.one) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h) :
    O.le (K.mul (K.add (K.add (pwR K h 13) (pwR K h 13)) (K.mul (pwR K h 13) (pwR K h 13)))
        (pwR K (K.mul (K.add K.one (pwR K h 10)) (K.add K.one (pwR K h 10))) (4 * (2 * 4) + 1)))
      (K.mul h (pwR K h 7)) := by
  have hl := hle_one K O h1 h hh h0
  have pe := AreaLower.pw_nn K O h h0 h1 13
  have e1 : O.le (pwR K h 13) K.one := by
    have := ConeBound.pw_anti K O h1 h h0 hl 13 0 (by decide); exact this
  -- ε² ≤ ε, so 2ε + ε² ≤ 4ε = h¹¹
  have sq : O.le (K.mul (pwR K h 13) (pwR K h 13)) (pwR K h 13) := by
    have := O.mul_le_mul_right _ _ _ e1 pe; rw [K.one_mul] at this; exact this
  have s3 : O.le (K.add (K.add (pwR K h 13) (pwR K h 13)) (K.mul (pwR K h 13) (pwR K h 13)))
      (K.add (K.add (pwR K h 13) (pwR K h 13)) (K.add (pwR K h 13) (pwR K h 13))) := by
    apply O.add_le_add _ _ _ _ (O.le_refl _)
    have := O.add_le_add _ _ _ _ sq pe; rw [DetChain.add_zero'] at this
    exact this
  have e4 : K.add (K.add (pwR K h 13) (pwR K h 13)) (K.add (pwR K h 13) (pwR K h 13)) = pwR K h 11 := by
    show K.add (K.add (K.mul (K.mul (pwR K h 11) h) h) (K.mul (K.mul (pwR K h 11) h) h))
      (K.add (K.mul (K.mul (pwR K h 11) h) h) (K.mul (K.mul (pwR K h 11) h) h)) = pwR K h 11
    have e : K.add (K.add (K.mul (K.mul (pwR K h 11) h) h) (K.mul (K.mul (pwR K h 11) h) h))
        (K.add (K.mul (K.mul (pwR K h 11) h) h) (K.mul (K.mul (pwR K h 11) h) h))
        = K.mul (pwR K h 11) (K.mul (K.add h h) (K.add h h)) := by lib_ring
    rw [e, hh, K.one_mul, K.mul_comm, K.one_mul]
  rw [e4] at s3
  have ek : pwR K (K.mul (K.add K.one (pwR K h 10)) (K.add K.one (pwR K h 10))) (4 * (2 * 4) + 1)
      = pwR K (K.add K.one (pwR K h 10)) 66 := by
    rw [GKS2.pwR_mul, ← GKS.pwR_add]
  rw [ek]
  have P0 : O.le K.zero (pwR K (K.add K.one (pwR K h 10)) 66) := by
    apply AreaLower.pw_nn K O _ _ h1
    have := O.add_le_add _ _ _ _ h1 (AreaLower.pw_nn K O h h0 h1 10); rw [K.zero_add] at this; exact this
  have a := O.mul_le_mul_right _ _ _ s3 P0
  -- h¹¹ κ⁶⁶ = h¹⁰ (κ⁶⁶ h) ≤ h¹⁰ ≤ h⁸ = h · h⁷
  have k := k66 K O h1 h hh h0
  have p10 := AreaLower.pw_nn K O h h0 h1 10
  have b := O.mul_le_mul_right _ _ (pwR K h 10) k p10
  rw [K.one_mul] at b
  have e5 : K.mul (pwR K h 11) (pwR K (K.add K.one (pwR K h 10)) 66)
      = K.mul (K.mul (pwR K (K.add K.one (pwR K h 10)) 66) h) (pwR K h 10) := by
    show K.mul (K.mul (pwR K h 10) h) _ = _; lib_ring
  rw [e5] at a
  have c := ConeBound.pw_anti K O h1 h h0 hl 10 8 (by decide)
  have e6 : K.mul h (pwR K h 7) = pwR K h 8 := by show _ = K.mul (pwR K h 7) h; rw [K.mul_comm]
  rw [e6]
  exact O.le_trans _ _ _ a (O.le_trans _ _ _ b c)

/-- 1 + 2⁻¹³ ≤ (1 + 2⁻¹⁰)(1 − 2⁻¹³) -/
theorem kappa_ineq (h1 : O.le K.zero K.one) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h) :
    O.le (K.add K.one (pwR K h 13)) (K.mul (K.add K.one (pwR K h 10)) (K.add K.one (K.neg (pwR K h 13)))) := by
  have hl := hle_one K O h1 h hh h0
  have e2 : K.add (pwR K h 13) (pwR K h 13) = pwR K h 12 := by
    show K.add (K.mul (pwR K h 12) h) (K.mul (pwR K h 12) h) = pwR K h 12
    have d : K.add (K.mul (pwR K h 12) h) (K.mul (pwR K h 12) h) = K.mul (pwR K h 12) (K.add h h) := by lib_ring
    rw [d, hh, K.mul_comm, K.one_mul]
  have e23 : K.mul (pwR K h 10) (pwR K h 13) = pwR K h 23 := (GKS.pwR_add K h 10 13).symm
  have e11 : K.add (pwR K h 12) (pwR K h 12) = pwR K h 11 := by
    show K.add (K.mul (pwR K h 11) h) (K.mul (pwR K h 11) h) = pwR K h 11
    have d : K.add (K.mul (pwR K h 11) h) (K.mul (pwR K h 11) h) = K.mul (pwR K h 11) (K.add h h) := by lib_ring
    rw [d, hh, K.mul_comm, K.one_mul]
  have X : O.le (K.add (pwR K h 12) (pwR K h 23)) (pwR K h 10) := by
    have a := O.add_le_add _ _ _ _ (O.le_refl (pwR K h 12)) (ConeBound.pw_anti K O h1 h h0 hl 23 12 (by decide))
    rw [e11] at a
    exact O.le_trans _ _ _ a (ConeBound.pw_anti K O h1 h h0 hl 11 10 (by decide))
  have br := ChiBound.sub_nonpos K O _ _ X
  have br0 : O.le K.zero (K.add (pwR K h 10) (K.neg (K.add (pwR K h 12) (pwR K h 23)))) := by
    have := ChiBound.neg_le K O _ _ br
    have e : K.neg K.zero = K.zero := by
      have := DetChain.add_neg' K K.zero; rw [DetChain.add_zero'] at this; exact this
    rw [e] at this
    have e' : K.neg (K.add (K.add (pwR K h 12) (pwR K h 23)) (K.neg (pwR K h 10)))
        = K.add (pwR K h 10) (K.neg (K.add (pwR K h 12) (pwR K h 23))) := by lib_ring
    rw [e'] at this; exact this
  have eq : K.mul (K.add K.one (pwR K h 10)) (K.add K.one (K.neg (pwR K h 13)))
      = K.add (K.add K.one (pwR K h 13)) (K.add (pwR K h 10)
          (K.neg (K.add (K.add (pwR K h 13) (pwR K h 13)) (K.mul (pwR K h 10) (pwR K h 13))))) := by lib_ring
  rw [eq, e2, e23]
  have := O.add_le_add _ _ _ _ (O.le_refl (K.add K.one (pwR K h 13))) br0
  rw [DetChain.add_zero'] at this; exact this

section Norm
variable (F : OField.OF K O)

/-- **Normalisation:** for a weight 1 + v with |v| ≤ ε = 2⁻¹³, s = 1/(1 + ε), κ = 1 + 2⁻¹⁰, m = 1/κ give every
  scalar hypothesis of GapZd.gap_Zd on (c₀, f) = (s, s v). -/
theorem norm_ok (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h) :
    let e := pwR K h 13
    let s := F.inv (K.add K.one e)
    let κ := K.add K.one (pwR K h 10)
    let m := F.inv κ
    (O.le K.zero s ∧ O.le s K.one) ∧ (O.le K.zero m ∧ O.le m K.one) ∧ O.le K.one κ ∧ K.mul κ m = K.one ∧
    ∀ v, O.le (K.neg e) v → O.le v e →
      (O.le m (K.add s (K.mul s v)) ∧ O.le (K.add s (K.mul s v)) K.one) ∧
      (O.le (K.neg e) (K.mul s v) ∧ O.le (K.mul s v) e) := by
  intro e s κ m
  have pe : O.le K.zero e := AreaLower.pw_nn K O h h0 h1 13
  have ge1 : ∀ a : R, O.le K.zero a → O.le K.one (K.add K.one a) := fun a ha => by
    have := O.add_le_add _ _ _ _ (O.le_refl K.one) ha; rw [DetChain.add_zero'] at this; exact this
  have ne0 : ∀ a : R, O.le K.one a → a ≠ K.zero := fun a ha hz => by
    rw [hz] at ha; exact h10 (O.le_antisymm _ _ ha h1)
  have nn : ∀ a : R, O.le K.one a → O.le K.zero a := fun a ha => O.le_trans _ _ _ h1 ha
  -- inverse of something ≥ 1 lies in [0, 1]
  have invb : ∀ a : R, O.le K.one a → O.le K.zero (F.inv a) ∧ O.le (F.inv a) K.one := fun a ha => by
    have p := F.inv_pos a (nn a ha) (ne0 a ha)
    refine ⟨p, ?_⟩
    have := O.mul_le_mul_right _ _ _ ha p
    rw [K.one_mul, F.mul_inv a (ne0 a ha)] at this; exact this
  have E1 := ge1 e pe
  have K1 : O.le K.one κ := ge1 _ (AreaLower.pw_nn K O h h0 h1 10)
  have sb := invb _ E1
  have mb := invb _ K1
  have km : K.mul κ m = K.one := F.mul_inv κ (ne0 κ K1)
  have se : K.mul (K.add K.one e) s = K.one := F.mul_inv _ (ne0 _ E1)
  refine ⟨sb, mb, K1, km, ?_⟩
  intro v hv1 hv2
  have hsv : K.add s (K.mul s v) = K.mul s (K.add K.one v) := by lib_ring
  -- m ≤ s (1 − e)
  have ms : O.le m (K.mul s (K.add K.one (K.neg e))) := by
    have c0 : O.le K.zero (K.mul κ (K.add K.one e)) := O.mul_nonneg _ _ (nn κ K1) (nn _ E1)
    have c1 : O.le K.one (K.mul κ (K.add K.one e)) := by
      have := O.mul_le_mul_right _ _ _ K1 (nn _ E1); rw [K.one_mul] at this; exact O.le_trans _ _ _ E1 this
    apply O.pos_cancel _ _ _ c0 (ne0 _ c1)
    have l : K.mul m (K.mul κ (K.add K.one e)) = K.add K.one e := by
      rw [← K.mul_assoc, K.mul_comm m, km, K.one_mul]
    have r : K.mul (K.mul s (K.add K.one (K.neg e))) (K.mul κ (K.add K.one e)) = K.mul κ (K.add K.one (K.neg e)) := by
      have : K.mul (K.mul s (K.add K.one (K.neg e))) (K.mul κ (K.add K.one e))
          = K.mul (K.mul (K.add K.one e) s) (K.mul κ (K.add K.one (K.neg e))) := by lib_ring
      rw [this, se, K.one_mul]
    rw [l, r]; exact kappa_ineq K O h1 h hh h0
  -- 1 − e ≤ 1 + v ≤ 1 + e
  have lo : O.le (K.add K.one (K.neg e)) (K.add K.one v) := O.add_le_add _ _ _ _ (O.le_refl _) hv1
  have hi : O.le (K.add K.one v) (K.add K.one e) := O.add_le_add _ _ _ _ (O.le_refl _) hv2
  have slo := O.mul_le_mul_right _ _ _ lo sb.1
  have shi := O.mul_le_mul_right _ _ _ hi sb.1
  rw [K.mul_comm _ s, K.mul_comm _ s] at slo shi
  rw [K.mul_comm _ s] at se
  refine ⟨⟨?_, ?_⟩, ⟨?_, ?_⟩⟩
  · rw [hsv]; exact O.le_trans _ _ _ ms slo
  · rw [hsv]; rw [se] at shi; exact shi
  · -- −e ≤ −(s e) ≤ s v
    have a := O.mul_le_mul_right _ _ _ hv1 sb.1
    rw [DetChain.neg_mul_left, K.mul_comm e, K.mul_comm v] at a
    have b := O.mul_le_mul_right _ _ _ sb.2 pe
    rw [K.one_mul] at b
    exact O.le_trans _ _ _ (ChiBound.neg_le K O _ _ b) a
  · have a := O.mul_le_mul_right _ _ _ hv2 sb.1
    rw [K.mul_comm v, K.mul_comm e] at a
    have b := O.mul_le_mul_right _ _ _ sb.2 pe
    rw [K.one_mul] at b
    exact O.le_trans _ _ _ a b

end Norm

end GapInputs

#print axioms GapInputs.bern
#print axioms GapInputs.pow2_h
#print axioms GapInputs.hxy4
#print axioms GapInputs.k66
#print axioms GapInputs.hsmall4
#print axioms GapInputs.kappa_ineq
#print axioms GapInputs.norm_ok

ym/GapInputsK.lean

lean_all/ym/GapInputsK.lean

/-
  ym/GapInputsK — T45, G9: the scalar hypotheses of GapZd.gap_Zd in every dimension d, with constants depending on
  k where 8d ≤ 2^k and 16d + 2 ≤ 2^{k+2}: ε = 2^{-(k+7)}, κ = 1 + 2^{-(k+4)}, u = 1/2, x = 2^{-(k+2)}, y = 2^{-(k+1)}.
    hxyK     x (1 + y)^{8d} ≤ y                (Bernoulli with n = 2^k)
    hsmallK  (2ε + ε²)(κ²)^{8d+1} ≤ u x         (Bernoulli with n = 2^{k+2})
    normK    w ↦ w/(1 + ε) gives c₀, m = 1/κ with m ≤ w ≤ 1 for |w − 1| ≤ ε
  Lean 4 core only, no axioms.
-/
import ym.GapInputs
import ym.GapConeD

namespace GapInputsK

open YMChain LinkIntegral SU2Char GapInputs

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

theorem pw_succ (h : R) (n : Nat) : pwR K h (n + 1) = K.mul (pwR K h n) h := rfl

/-- 2^k · h^{k+j} = h^j -/
theorem pow2_hk (h : R) (hh : K.add h h = K.one) (k j : Nat) : K.mul (cN K (2 ^ k)) (pwR K h (k + j)) = pwR K h j := by
  rw [cN_pow2, GKS.pwR_add, ← K.mul_assoc, pow2_h K h hh k, K.one_mul]

/-- p + p = h^{n} when p = h^{n+1} -/
theorem dbl (h : R) (hh : K.add h h = K.one) (n : Nat) : K.add (pwR K h (n + 1)) (pwR K h (n + 1)) = pwR K h n := by
  show K.add (K.mul (pwR K h n) h) (K.mul (pwR K h n) h) = pwR K h n
  have d : K.add (K.mul (pwR K h n) h) (K.mul (pwR K h n) h) = K.mul (pwR K h n) (K.add h h) := by lib_ring
  rw [d, hh, K.mul_comm, K.one_mul]

theorem hxyK (h1 : O.le K.zero K.one) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h) (d k : Nat)
    (hd : 4 * (2 * d) ≤ 2 ^ k) :
    O.le (K.mul (pwR K h (k + 2)) (pwR K (K.add K.one (pwR K h (k + 1))) (4 * (2 * d)))) (pwR K h (k + 1)) := by
  have py := AreaLower.pw_nn K O h h0 h1 (k + 1)
  have y1 : O.le K.one (K.add K.one (pwR K h (k + 1))) := by
    have := O.add_le_add _ _ _ _ (O.le_refl K.one) py; rw [DetChain.add_zero'] at this; exact this
  have b := bern K O h1 (pwR K h (k + 1)) py (2 ^ k)
  rw [pow2_hk K h hh k 1, show pwR K h 1 = h from by show K.mul K.one h = h; rw [K.one_mul], one_sub_h K h hh] at b
  have m := GapConeD.le_pow K O h1 _ y1 _ _ hd
  have P0 := AreaLower.pw_nn K O _ (O.le_trans _ _ _ h1 y1) h1 (4 * (2 * d))
  -- x (1+y)^{8d} = h^{k+1} · ((1+y)^{8d} h) ≤ h^{k+1} · ((1+y)^{2^k} h) ≤ h^{k+1}
  have a := O.mul_le_mul_right _ _ h m h0
  have c := O.le_trans _ _ _ a b
  have := O.mul_le_mul_right _ _ (pwR K h (k + 1)) c py
  rw [K.one_mul] at this
  have e : K.mul (pwR K h (k + 2)) (pwR K (K.add K.one (pwR K h (k + 1))) (4 * (2 * d)))
      = K.mul (K.mul (pwR K (K.add K.one (pwR K h (k + 1))) (4 * (2 * d))) h) (pwR K h (k + 1)) := by
    show K.mul (K.mul (pwR K h (k + 1)) h) _ = _; lib_ring
  rw [e]; exact this

/-- κ^{2^{k+2}} · h ≤ 1 for κ = 1 + h^{k+4} -/
theorem kpow (h1 : O.le K.zero K.one) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h) (k : Nat) :
    O.le (K.mul (pwR K (K.add K.one (pwR K h (k + 4))) (2 ^ (k + 2))) h) K.one := by
  have hl := hle_one K O h1 h hh h0
  have pz := AreaLower.pw_nn K O h h0 h1 (k + 4)
  have b := bern K O h1 (pwR K h (k + 4)) pz (2 ^ (k + 2))
  have e : K.mul (cN K (2 ^ (k + 2))) (pwR K h (k + 4)) = pwR K h 2 := by
    rw [show k + 4 = (k + 2) + 2 from by lib_nat]; exact pow2_hk K h hh (k + 2) 2
  rw [e] at b
  have c2 : O.le (pwR K h 2) h := by
    have := ConeBound.pw_anti K O h1 h h0 hl 2 1 (by decide)
    rw [show pwR K h 1 = h from by show K.mul K.one h = h; rw [K.one_mul]] at this; exact this
  have hs := h_le_sub K O h hh _ c2
  have P0 : O.le K.zero (pwR K (K.add K.one (pwR K h (k + 4))) (2 ^ (k + 2))) := by
    apply AreaLower.pw_nn K O _ _ h1
    have := O.add_le_add _ _ _ _ h1 pz; rw [K.zero_add] at this; exact this
  have m := O.mul_le_mul_right _ _ _ hs P0
  rw [K.mul_comm h, K.mul_comm (K.add K.one _)] at m
  exact O.le_trans _ _ _ m b

theorem hsmallK (h1 : O.le K.zero K.one) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h) (d k : Nat)
    (hd : 2 * (4 * (2 * d) + 1) ≤ 2 ^ (k + 2)) :
    O.le (K.mul (K.add (K.add (pwR K h (k + 7)) (pwR K h (k + 7))) (K.mul (pwR K h (k + 7)) (pwR K h (k + 7))))
        (pwR K (K.mul (K.add K.one (pwR K h (k + 4))) (K.add K.one (pwR K h (k + 4)))) (4 * (2 * d) + 1)))
      (K.mul h (pwR K h (k + 2))) := by
  have hl := hle_one K O h1 h hh h0
  have pe := AreaLower.pw_nn K O h h0 h1 (k + 7)
  have pz := AreaLower.pw_nn K O h h0 h1 (k + 4)
  have k1 : O.le K.one (K.add K.one (pwR K h (k + 4))) := by
    have := O.add_le_add _ _ _ _ (O.le_refl K.one) pz; rw [DetChain.add_zero'] at this; exact this
  have e1 : O.le (pwR K h (k + 7)) K.one := ConeBound.pw_anti K O h1 h h0 hl (k + 7) 0 (Nat.zero_le _)
  have sq : O.le (K.mul (pwR K h (k + 7)) (pwR K h (k + 7))) (pwR K h (k + 7)) := by
    have := O.mul_le_mul_right _ _ _ e1 pe; rw [K.one_mul] at this; exact this
  have pp : O.le (pwR K h (k + 7)) (K.add (pwR K h (k + 7)) (pwR K h (k + 7))) := by
    have := O.add_le_add _ _ _ _ (O.le_refl (pwR K h (k + 7))) pe; rw [DetChain.add_zero'] at this; exact this
  have d6 : K.add (pwR K h (k + 7)) (pwR K h (k + 7)) = pwR K h (k + 6) := dbl K h hh (k + 6)
  have d5 : K.add (pwR K h (k + 6)) (pwR K h (k + 6)) = pwR K h (k + 5) := dbl K h hh (k + 5)
  have s3 : O.le (K.add (K.add (pwR K h (k + 7)) (pwR K h (k + 7))) (K.mul (pwR K h (k + 7)) (pwR K h (k + 7))))
      (pwR K h (k + 5)) := by
    have a := O.add_le_add _ _ _ _ (O.le_refl (K.add (pwR K h (k + 7)) (pwR K h (k + 7)))) (O.le_trans _ _ _ sq pp)
    rw [d6, d5] at a
    rw [d6]; exact a
  -- (κ²)^{8d+1} = κ^{2(8d+1)} ≤ κ^{2^{k+2}}
  have ek : pwR K (K.mul (K.add K.one (pwR K h (k + 4))) (K.add K.one (pwR K h (k + 4)))) (4 * (2 * d) + 1)
      = pwR K (K.add K.one (pwR K h (k + 4))) (2 * (4 * (2 * d) + 1)) := by
    rw [GKS2.pwR_mul, ← GKS.pwR_add, show (4 * (2 * d) + 1) + (4 * (2 * d) + 1) = 2 * (4 * (2 * d) + 1) from by lib_nat]
  rw [ek]
  have m := GapConeD.le_pow K O h1 _ k1 _ _ hd
  have P0 : O.le K.zero (pwR K (K.add K.one (pwR K h (k + 4))) (2 * (4 * (2 * d) + 1))) :=
    AreaLower.pw_nn K O _ (O.le_trans _ _ _ h1 k1) h1 _
  have a := O.mul_le_mul_right _ _ _ s3 P0
  -- h^{k+5} κ^N = h^{k+4} (κ^N h) ≤ h^{k+4} (κ^{2^{k+2}} h) ≤ h^{k+4} ≤ h^{k+3} = h · h^{k+2}
  have b := O.mul_le_mul_right _ _ h m h0
  have c := O.le_trans _ _ _ b (kpow K O h1 h hh h0 k)
  have d4 := O.mul_le_mul_right _ _ (pwR K h (k + 4)) c pz
  rw [K.one_mul] at d4
  have e5 : K.mul (pwR K h (k + 5)) (pwR K (K.add K.one (pwR K h (k + 4))) (2 * (4 * (2 * d) + 1)))
      = K.mul (K.mul (pwR K (K.add K.one (pwR K h (k + 4))) (2 * (4 * (2 * d) + 1))) h) (pwR K h (k + 4)) := by
    show K.mul (K.mul (pwR K h (k + 4)) h) _ = _; lib_ring
  rw [e5] at a
  have f := ConeBound.pw_anti K O h1 h h0 hl (k + 4) (k + 3) (Nat.le_succ _)
  have e6 : K.mul h (pwR K h (k + 2)) = pwR K h (k + 3) := by show _ = K.mul (pwR K h (k + 2)) h; rw [K.mul_comm]
  rw [e6]
  exact O.le_trans _ _ _ a (O.le_trans _ _ _ d4 f)

theorem kappa_ineqK (h1 : O.le K.zero K.one) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h) (k : Nat) :
    O.le (K.add K.one (pwR K h (k + 7))) (K.mul (K.add K.one (pwR K h (k + 4))) (K.add K.one (K.neg (pwR K h (k + 7))))) := by
  have hl := hle_one K O h1 h hh h0
  have e2 : K.add (pwR K h (k + 7)) (pwR K h (k + 7)) = pwR K h (k + 6) := dbl K h hh (k + 6)
  have e23 : K.mul (pwR K h (k + 4)) (pwR K h (k + 7)) = pwR K h ((k + 4) + (k + 7)) := (GKS.pwR_add K h (k + 4) (k + 7)).symm
  have e11 : K.add (pwR K h (k + 6)) (pwR K h (k + 6)) = pwR K h (k + 5) := dbl K h hh (k + 5)
  have X : O.le (K.add (pwR K h (k + 6)) (pwR K h ((k + 4) + (k + 7)))) (pwR K h (k + 4)) := by
    have a := O.add_le_add _ _ _ _ (O.le_refl (pwR K h (k + 6)))
      (ConeBound.pw_anti K O h1 h h0 hl ((k + 4) + (k + 7)) (k + 6) (Nat.le.intro (show (k + 6) + (k + 5) = (k + 4) + (k + 7) by lib_nat)))
    rw [e11] at a
    exact O.le_trans _ _ _ a (ConeBound.pw_anti K O h1 h h0 hl (k + 5) (k + 4) (Nat.le_succ _))
  have br := ChiBound.sub_nonpos K O _ _ X
  have br0 : O.le K.zero (K.add (pwR K h (k + 4)) (K.neg (K.add (pwR K h (k + 6)) (pwR K h ((k + 4) + (k + 7)))))) := by
    have := ChiBound.neg_le K O _ _ br
    have e : K.neg K.zero = K.zero := by
      have := DetChain.add_neg' K K.zero; rw [DetChain.add_zero'] at this; exact this
    rw [e] at this
    have e' : K.neg (K.add (K.add (pwR K h (k + 6)) (pwR K h ((k + 4) + (k + 7)))) (K.neg (pwR K h (k + 4))))
        = K.add (pwR K h (k + 4)) (K.neg (K.add (pwR K h (k + 6)) (pwR K h ((k + 4) + (k + 7))))) := by lib_ring
    rw [e'] at this; exact this
  have eq : K.mul (K.add K.one (pwR K h (k + 4))) (K.add K.one (K.neg (pwR K h (k + 7))))
      = K.add (K.add K.one (pwR K h (k + 7))) (K.add (pwR K h (k + 4))
          (K.neg (K.add (K.add (pwR K h (k + 7)) (pwR K h (k + 7))) (K.mul (pwR K h (k + 4)) (pwR K h (k + 7)))))) := by lib_ring
  rw [eq, e2, e23]
  have := O.add_le_add _ _ _ _ (O.le_refl (K.add K.one (pwR K h (k + 7)))) br0
  rw [DetChain.add_zero'] at this; exact this

section Norm
variable (F : OField.OF K O)

/-- **Normalisation (k):** for a weight 1 + v with |v| ≤ ε = 2^{-(k+7)}, s = 1/(1 + ε), κ = 1 + 2^{-(k+4)}, m = 1/κ give every
  scalar hypothesis of GapZd.gap_Zd on (c₀, f) = (s, s v). -/
theorem norm_okK (k : Nat) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h) :
    let e := pwR K h (k + 7)
    let s := F.inv (K.add K.one e)
    let κ := K.add K.one (pwR K h (k + 4))
    let m := F.inv κ
    (O.le K.zero s ∧ O.le s K.one) ∧ (O.le K.zero m ∧ O.le m K.one) ∧ O.le K.one κ ∧ K.mul κ m = K.one ∧
    ∀ v, O.le (K.neg e) v → O.le v e →
      (O.le m (K.add s (K.mul s v)) ∧ O.le (K.add s (K.mul s v)) K.one) ∧
      (O.le (K.neg e) (K.mul s v) ∧ O.le (K.mul s v) e) := by
  intro e s κ m
  have pe : O.le K.zero e := AreaLower.pw_nn K O h h0 h1 (k + 7)
  have ge1 : ∀ a : R, O.le K.zero a → O.le K.one (K.add K.one a) := fun a ha => by
    have := O.add_le_add _ _ _ _ (O.le_refl K.one) ha; rw [DetChain.add_zero'] at this; exact this
  have ne0 : ∀ a : R, O.le K.one a → a ≠ K.zero := fun a ha hz => by
    rw [hz] at ha; exact h10 (O.le_antisymm _ _ ha h1)
  have nn : ∀ a : R, O.le K.one a → O.le K.zero a := fun a ha => O.le_trans _ _ _ h1 ha
  -- inverse of something ≥ 1 lies in [0, 1]
  have invb : ∀ a : R, O.le K.one a → O.le K.zero (F.inv a) ∧ O.le (F.inv a) K.one := fun a ha => by
    have p := F.inv_pos a (nn a ha) (ne0 a ha)
    refine ⟨p, ?_⟩
    have := O.mul_le_mul_right _ _ _ ha p
    rw [K.one_mul, F.mul_inv a (ne0 a ha)] at this; exact this
  have E1 := ge1 e pe
  have K1 : O.le K.one κ := ge1 _ (AreaLower.pw_nn K O h h0 h1 (k + 4))
  have sb := invb _ E1
  have mb := invb _ K1
  have km : K.mul κ m = K.one := F.mul_inv κ (ne0 κ K1)
  have se : K.mul (K.add K.one e) s = K.one := F.mul_inv _ (ne0 _ E1)
  refine ⟨sb, mb, K1, km, ?_⟩
  intro v hv1 hv2
  have hsv : K.add s (K.mul s v) = K.mul s (K.add K.one v) := by lib_ring
  -- m ≤ s (1 − e)
  have ms : O.le m (K.mul s (K.add K.one (K.neg e))) := by
    have c0 : O.le K.zero (K.mul κ (K.add K.one e)) := O.mul_nonneg _ _ (nn κ K1) (nn _ E1)
    have c1 : O.le K.one (K.mul κ (K.add K.one e)) := by
      have := O.mul_le_mul_right _ _ _ K1 (nn _ E1); rw [K.one_mul] at this; exact O.le_trans _ _ _ E1 this
    apply O.pos_cancel _ _ _ c0 (ne0 _ c1)
    have l : K.mul m (K.mul κ (K.add K.one e)) = K.add K.one e := by
      rw [← K.mul_assoc, K.mul_comm m, km, K.one_mul]
    have r : K.mul (K.mul s (K.add K.one (K.neg e))) (K.mul κ (K.add K.one e)) = K.mul κ (K.add K.one (K.neg e)) := by
      have : K.mul (K.mul s (K.add K.one (K.neg e))) (K.mul κ (K.add K.one e))
          = K.mul (K.mul (K.add K.one e) s) (K.mul κ (K.add K.one (K.neg e))) := by lib_ring
      rw [this, se, K.one_mul]
    rw [l, r]; exact kappa_ineqK K O h1 h hh h0 k
  -- 1 − e ≤ 1 + v ≤ 1 + e
  have lo : O.le (K.add K.one (K.neg e)) (K.add K.one v) := O.add_le_add _ _ _ _ (O.le_refl _) hv1
  have hi : O.le (K.add K.one v) (K.add K.one e) := O.add_le_add _ _ _ _ (O.le_refl _) hv2
  have slo := O.mul_le_mul_right _ _ _ lo sb.1
  have shi := O.mul_le_mul_right _ _ _ hi sb.1
  rw [K.mul_comm _ s, K.mul_comm _ s] at slo shi
  rw [K.mul_comm _ s] at se
  refine ⟨⟨?_, ?_⟩, ⟨?_, ?_⟩⟩
  · rw [hsv]; exact O.le_trans _ _ _ ms slo
  · rw [hsv]; rw [se] at shi; exact shi
  · -- −e ≤ −(s e) ≤ s v
    have a := O.mul_le_mul_right _ _ _ hv1 sb.1
    rw [DetChain.neg_mul_left, K.mul_comm e, K.mul_comm v] at a
    have b := O.mul_le_mul_right _ _ _ sb.2 pe
    rw [K.one_mul] at b
    exact O.le_trans _ _ _ (ChiBound.neg_le K O _ _ b) a
  · have a := O.mul_le_mul_right _ _ _ hv2 sb.1
    rw [K.mul_comm v, K.mul_comm e] at a
    have b := O.mul_le_mul_right _ _ _ sb.2 pe
    rw [K.one_mul] at b
    exact O.le_trans _ _ _ a b

end Norm

end GapInputsK

#print axioms GapInputsK.hxyK
#print axioms GapInputsK.kpow
#print axioms GapInputsK.hsmallK
#print axioms GapInputsK.kappa_ineqK
#print axioms GapInputsK.norm_okK

ym/GapLimit.lean

lean_all/ym/GapLimit.lean

/-
  ym/GapLimit — T45, cycle 104 (Lad5, OS clustering in infinite volume): two-sided bounds pass to limits.

  With a half h (h + h = 1) and decidable equality on the ring (SymLimit conventions):
    bound_limit    if −B ≤ x_n ≤ B for all n and x_n comes ε-near x for every ε > 0, then −B ≤ x ≤ B
    gap_limit      the finite-volume clustering bound |⟨U_pU_q⟩_Λ − ⟨U_p⟩_Λ⟨U_q⟩_Λ| ≤ C u^R (GapZd, uniform in Λ) holds
                   for the infinite-volume limit (Lad5Cauchy gives the convergence of each expectation)
  So the infinite-volume 4D strong-coupling state has exponential clustering (mass gap ≥ −log u per lattice unit) — the
  OS clustering axiom — in addition to reflection positivity (RPLimit/OSLimit) and lattice symmetries (SymLimit).

  Lean 4 core only, proofs by hand, no axioms.
-/
import ym.QuatUnit
import ym.SymLimit

namespace GapLimit

open YMChain SymLimit

variable {R : Type} [DecidableEq R] (K : DetChain.CRing R) (O : ORing K)

/-- **Two-sided bounds survive limits.** -/
theorem bound_limit (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h) (hne : h ≠ K.zero)
    (xs : Nat → R) (x B : R) (hb : ∀ n, O.le (K.neg B) (xs n) ∧ O.le (xs n) B)
    (hx : ∀ ε, SymLimit.Pos K O ε → ∃ n, Near K O (xs n) x ε) :
    O.le (K.neg B) x ∧ O.le x B := by
  constructor
  · -- −B ≤ x_n ≤ x + ε for every ε
    apply le_of_near_all K O h hh h0 hne
    intro ε hε
    obtain ⟨n, hn⟩ := hx ε hε
    exact O.le_trans _ _ _ (hb n).1 hn.1
  · apply le_of_near_all K O h hh h0 hne
    intro ε hε
    obtain ⟨n, hn⟩ := hx ε hε
    exact O.le_trans _ _ _ hn.2 (O.add_le_add _ _ _ _ (hb n).2 (O.le_refl ε))

/-- **Clustering in infinite volume.** If every finite-volume covariance obeys the uniform clustering bound and the
  covariances converge, the limit covariance obeys it too. -/
theorem gap_limit (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h) (hne : h ≠ K.zero)
    (cov : Nat → R) (covInf C u : R) (Rr : Nat)
    (hb : ∀ n, O.le (K.neg (K.mul C (LinkIntegral.pwR K u Rr))) (cov n) ∧ O.le (cov n) (K.mul C (LinkIntegral.pwR K u Rr)))
    (hx : ∀ ε, SymLimit.Pos K O ε → ∃ n, Near K O (cov n) covInf ε) :
    O.le (K.neg (K.mul C (LinkIntegral.pwR K u Rr))) covInf ∧ O.le covInf (K.mul C (LinkIntegral.pwR K u Rr)) :=
  bound_limit K O h hh h0 hne cov covInf _ hb hx

end GapLimit

#print axioms GapLimit.bound_limit
#print axioms GapLimit.gap_limit

ym/GapSig.lean

lean_all/ym/GapSig.lean

/-
  ym/GapSig — T45, G78h: the sharpening sequence of the ratio class along the MK flow (for the β ≤ 8 gap).
  After the 103 certified rungs (LadderMain) the flow is in RC(1/7); along the flow the ratio class sharpens as
  σ_{j+1} = (4σ_j)⁴ (FlowRatio.flow_ratio): σ_1 ≤ h³, σ_2 ≤ h⁴, σ_3 ≤ h⁸, σ_{4+j} ≤ h²⁴ ≤ h¹⁶ (h = 1/2). The
  normalised flowed weight 1 :: a_j then lies in the cone Bd(h⁴) (RatioStep.RC_bd), and GapFlow.gap_of_cone gives
  the connected plaquette correlation bound at every later step. Lean 4 core only, no axioms.
-/
import ym.RefFinal
import ym.Migdal

namespace GapSig

open YMChain LinkIntegral SU2Char HeatPair MigdalCone

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) (F : OField.OF K O)

/-! ### powers of h = 1/2 -/

theorem pw_add (x : R) (a : Nat) : ∀ b, pwR K x (a + b) = K.mul (pwR K x a) (pwR K x b)
  | 0 => by show pwR K x a = K.mul (pwR K x a) K.one; lib_ring
  | b + 1 => by
    show K.mul (pwR K x (a + b)) x = K.mul (pwR K x a) (K.mul (pwR K x b) x)
    rw [pw_add x a b]; lib_ring

theorem h_le_one (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h) : O.le h K.one := by
  have := O.add_le_add _ _ _ _ (O.le_refl h) h0
  rw [show K.add h K.zero = h by lib_ring, hh] at this; exact this

/-- h^(a+b) ≤ h^a -/
theorem pw_anti (h1 : O.le K.zero K.one) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h) (a b : Nat) :
    O.le (pwR K h (a + b)) (pwR K h a) := by
  rw [pw_add K h a b]
  have p := AreaLower.pw_nn K O h h0 h1 a
  have hl1 := h_le_one K O h hh h0
  have q : O.le (pwR K h b) K.one := by
    induction b with
    | zero => exact O.le_refl _
    | succ b ih =>
      show O.le (K.mul (pwR K h b) h) K.one
      have u := O.mul_le_mul_right _ _ h ih h0
      exact O.le_trans _ _ _ u (O.le_trans _ _ _ (TripleE.le_of_eq' K O _ _ (by lib_ring)) hl1)
  have := O.mul_le_mul_right _ _ (pwR K h a) q p
  exact O.le_trans _ _ _ (TripleE.le_of_eq' K O _ _ (by lib_ring)) (O.le_trans _ _ _ this (TripleE.le_of_eq' K O _ _ (by lib_ring)))

/-- 4·h^(c+2) = h^c -/
theorem four_pw (h : R) (hh : K.add h h = K.one) (c : Nat) :
    K.add (K.add (pwR K h (c + 2)) (pwR K h (c + 2))) (K.add (pwR K h (c + 2)) (pwR K h (c + 2))) = pwR K h c := by
  show K.add (K.add (K.mul (K.mul (pwR K h c) h) h) (K.mul (K.mul (pwR K h c) h) h))
      (K.add (K.mul (K.mul (pwR K h c) h) h) (K.mul (K.mul (pwR K h c) h) h)) = pwR K h c
  calc _ = K.mul (pwR K h c) (K.mul (K.add h h) (K.add h h)) := by lib_ring
    _ = pwR K h c := by rw [hh]; lib_ring

/-- **one sharpening step**: σ ≤ h^(c+2) gives (4σ)⁴ ≤ h^(4c) -/
theorem step_bound (h1 : O.le K.zero K.one) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h) (σ : R)
    (hσ : O.le K.zero σ) (c : Nat) (hc : O.le σ (pwR K h (c + 2))) :
    O.le (pwR K (K.add (K.add σ σ) (K.add σ σ)) 4) (pwR K h (c * 4)) := by
  have s4 : O.le (K.add (K.add σ σ) (K.add σ σ)) (pwR K h c) := by
    rw [← four_pw K h hh c]
    exact O.add_le_add _ _ _ _ (O.add_le_add _ _ _ _ hc hc) (O.add_le_add _ _ _ _ hc hc)
  have n4 : O.le K.zero (K.add (K.add σ σ) (K.add σ σ)) :=
    O.le_trans _ _ _ (TripleE.le_of_eq' K O _ _ (by lib_ring)) (O.add_le_add _ _ _ _ (O.add_le_add _ _ _ _ hσ hσ) (O.add_le_add _ _ _ _ hσ hσ))
  have := SU2Strong4D.pw_mono K O h1 _ _ n4 s4 4
  rw [Migdal.pw_pw] at this
  exact this

/-- the first step: (4/7)⁴ ≤ h³ (2048 ≤ 2401) -/
theorem first_step (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero) (h : R) (hh : K.add h h = K.one) :
    O.le (pwR K (K.add (K.add (RefScalar.rat K O F 1 7) (RefScalar.rat K O F 1 7))
      (K.add (RefScalar.rat K O F 1 7) (RefScalar.rat K O F 1 7))) 4) (pwR K h (1 + 2)) := by
  have p := SU2CharExp.pos_of_ge_one K O h1 h10 7 (by decide)
  have m := RefScalar.rat_mul K O F h1 h10 1 7 (by decide)
  rw [SU2CharExp.cN_one] at m
  generalize RefScalar.rat K O F 1 7 = r at m ⊢
  rw [HeatLadder.pw4 K]
  have D0 := O.mul_nonneg _ _ (O.mul_nonneg _ _ (O.mul_nonneg _ _ p.1 p.1) (O.mul_nonneg _ _ p.1 p.1))
    (SU2CharExp.cN_nn K O h1 8)
  have p8 := SU2CharExp.pos_of_ge_one K O h1 h10 8 (by decide)
  have p49 := PairLo.mul_ne K O _ _ p.1 p.2 p.2
  have n49 := O.mul_nonneg _ _ p.1 p.1
  have Dn : K.mul (K.mul (K.mul (cN K 7) (cN K 7)) (K.mul (cN K 7) (cN K 7))) (cN K 8) ≠ K.zero :=
    PairLo.mul_ne K O _ _ (O.mul_nonneg _ _ n49 n49) (PairLo.mul_ne K O _ _ n49 p49 p49) p8.2
  refine O.pos_cancel _ _ _ D0 Dn ?_
  have e8 : K.mul (pwR K h (1 + 2)) (cN K 8) = K.one := by
    show K.mul (K.mul (K.mul (K.mul K.one h) h) h) (cN K 8) = K.one
    rw [show (8 : Nat) = 1 + 1 + (1 + 1) + (1 + 1 + (1 + 1)) from rfl]
    repeat rw [cN_add]
    rw [SU2CharExp.cN_one]
    calc _ = K.mul (K.mul (K.add h h) (K.add h h)) (K.add h h) := by lib_ring
      _ = K.one := by rw [hh]; lib_ring
  have eL : K.mul (K.mul (K.mul (K.add (K.add r r) (K.add r r)) (K.add (K.add r r) (K.add r r)))
      (K.mul (K.add (K.add r r) (K.add r r)) (K.add (K.add r r) (K.add r r))))
      (K.mul (K.mul (K.mul (cN K 7) (cN K 7)) (K.mul (cN K 7) (cN K 7))) (cN K 8)) = cN K 2048 := by
    calc _ = K.mul (cN K 2048) (K.mul (K.mul (K.mul r (cN K 7)) (K.mul r (cN K 7))) (K.mul (K.mul r (cN K 7)) (K.mul r (cN K 7)))) := by
          rw [show (2048 : Nat) = 4 * 4 * (4 * 4) * 8 from rfl]
          repeat rw [SU2CharExp.cN_mul]
          rw [show (4 : Nat) = 1 + 1 + (1 + 1) from rfl]
          repeat rw [cN_add]
          rw [SU2CharExp.cN_one]
          lib_ring
      _ = cN K 2048 := by rw [m]; lib_ring
  have eR : K.mul (pwR K h (1 + 2)) (K.mul (K.mul (K.mul (cN K 7) (cN K 7)) (K.mul (cN K 7) (cN K 7))) (cN K 8)) = cN K 2401 := by
    calc _ = K.mul (K.mul (pwR K h (1 + 2)) (cN K 8)) (K.mul (K.mul (cN K 7) (cN K 7)) (K.mul (cN K 7) (cN K 7))) := by lib_ring
      _ = cN K 2401 := by
        rw [e8, show (2401 : Nat) = 7 * 7 * (7 * 7) from rfl]
        repeat rw [SU2CharExp.cN_mul]
        lib_ring
  rw [eL, eR]
  exact SU2CharExp.cN_mono K O h1 _ _ (by decide)

/-! ### the sharpening sequence -/

/-- σ_0 = 1/7, σ_{j+1} = (4σ_j)⁴ -/
def sig : Nat → R
  | 0 => RefScalar.rat K O F 1 7
  | j + 1 => pwR K (K.add (K.add (sig j) (sig j)) (K.add (sig j) (sig j))) 4

theorem sig_nn (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero) : ∀ j, O.le K.zero (sig K O F j)
  | 0 => RefScalar.rat_nn K O F h1 h10 1 7 (by decide)
  | j + 1 => AreaLower.pw_nn K O _ (O.le_trans _ _ _ (TripleE.le_of_eq' K O _ _ (by lib_ring))
      (O.add_le_add _ _ _ _ (O.add_le_add _ _ _ _ (sig_nn h1 h10 j) (sig_nn h1 h10 j))
        (O.add_le_add _ _ _ _ (sig_nn h1 h10 j) (sig_nn h1 h10 j)))) h1 4

/-- σ_{4+j} ≤ h²⁴ -/
theorem sig_small (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero) (h : R) (hh : K.add h h = K.one) (h0 : O.le K.zero h) :
    ∀ j, O.le (sig K O F (4 + j)) (pwR K h (22 + 2)) := by
  have s1 : O.le (sig K O F 1) (pwR K h (1 + 2)) := first_step K O F h1 h10 h hh
  have s2 : O.le (sig K O F 2) (pwR K h (2 + 2)) :=
    step_bound K O h1 h hh h0 _ (sig_nn K O F h1 h10 1) 1 s1
  have s3 : O.le (sig K O F 3) (pwR K h (6 + 2)) :=
    step_bound K O h1 h hh h0 _ (sig_nn K O F h1 h10 2) 2 s2
  have s4 : O.le (sig K O F 4) (pwR K h (22 + 2)) :=
    O.le_trans _ _ _ (step_bound K O h1 h hh h0 _ (sig_nn K O F h1 h10 3) 6 s3) (pw_anti K O h1 h hh h0 24 0)
  intro j
  induction j with
  | zero => exact s4
  | succ j ih =>
    exact O.le_trans _ _ _ (step_bound K O h1 h hh h0 _ (sig_nn K O F h1 h10 (4 + j)) 22 ih)
      (pw_anti K O h1 h hh h0 24 64)

end GapSig

#print axioms GapSig.pw_add
#print axioms GapSig.h_le_one
#print axioms GapSig.pw_anti
#print axioms GapSig.four_pw
#print axioms GapSig.step_bound
#print axioms GapSig.first_step
#print axioms GapSig.sig_nn
#print axioms GapSig.sig_small

ym/GapZd.lean

lean_all/ym/GapZd.lean

/-
  ym/GapZd — T45, cycle 81 (Lad4, any compact group with a Haar structure, every dimension d): the strong-coupling
  mass gap on Z^d, uniformly in the volume.

  gap_Zd: GapH.gap_H on any finite set of plaquettes of Z^d (duplicate-free, as link-incidence vectors over a
  duplicate-free link list), with the degree hypothesis discharged by ZdDegree (Dg = 4·(2d)) and the far-apart
  hypothesis by ZdDist (ℓ∞ distance of base points > R + 1). Conclusion: for observables U_p, U_q on two plaquettes,
    −B Z₁² ≤ 2 (Z_{pq} Z₁ − Z_p Z_q) ≤ B Z₁²,   B = (2K₁)² (κ²)^ŝ (1+y)^ŝ u^R,
  i.e. |⟨U_pU_q⟩ − ⟨U_p⟩⟨U_q⟩| ≤ ½ B u^R with R + 2 ≤ dist(p, q): exponential clustering with rate −ln u per lattice
  unit, the constants depending on d only through Dg = 8d. For d = 3 this is rung L4 (and the gap part of L5 for d = 4)
  for SU(2), given H0 and the strong-coupling weight bounds.

  Lean 4 core only, proofs by hand, no axioms.
-/
import ym.ZdDist

namespace GapZd

open YMChain GKS LinkIntegral LinkFactor MaskSum Closure Factor Seeds Count Indep PosRatio Expand Approx Poly Signed
  Dup DupAlg AreaG Join Reach HaarStr HaarPoly AreaH DupH DupAlgH GapG GapH InjCount ZdLinks ZdDegree ZdDist

variable {R : Type} (K : DetChain.CRing R) (O : ORing K) {G : Type} {L : Nat} (H : Haar K O G L)

theorem gap_Zd (DH : DupHaar K O H) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)
    (d : Nat) (LL : List Lk) (hLL : nodupL LL) (hL : LL.length = L) (Pn : List Pq) (hnd : nodupL Pn)
    (hv : ∀ p, memL p Pn → valid d p) (p0 q0 : Pq)
    (hpq : disjN (vec LL p0) (vec LL q0))
    (f : Nat → List G → R) (Up Uq : List G → R) (c0 m κ ε K1 u x y : R) (Rr : Nat)
    (hfd : ∀ i, depOn (spP L (Pn.map (vec LL)) i) (f i)) (hUp : depOn ((vec LL p0).map nzb) Up) (hUq : depOn ((vec LL q0).map nzb) Uq)
    (hfaG : ∀ i, H.adm (f i)) (hUpa : H.adm Up) (hUqa : H.adm Uq)
    (hc0 : O.le K.zero c0) (hc1 : O.le c0 K.one) (hm : O.le K.zero m) (hm1 : O.le m K.one)
    (hκ1 : O.le K.one κ) (hκm : K.mul κ m = K.one)
    (hw : ∀ i x, O.le m (K.add c0 (f i x))) (hw1 : ∀ i x, O.le (K.add c0 (f i x)) K.one)
    (he : O.le K.zero ε) (hf : ∀ i x, O.le (K.neg ε) (f i x) ∧ O.le (f i x) ε)
    (hK1 : O.le K.zero K1) (hUpb : ∀ x, O.le (K.neg K1) (Up x) ∧ O.le (Up x) K1)
    (hUqb : ∀ x, O.le (K.neg K1) (Uq x) ∧ O.le (Uq x) K1)
    (hu0 : O.le K.zero u) (hu1 : O.le u K.one) (hx : O.le K.zero x) (hy : O.le K.zero y)
    (hsmall : O.le (K.mul (K.add (K.add ε ε) (K.mul ε ε)) (pwR K (K.mul κ κ) (4 * (2 * d) + 1))) (K.mul u x))
    (hxy : O.le (K.mul x (pwR K (K.add K.one y) (4 * (2 * d)))) y)
    (hdist : ¬ dcl (Rr + 1) p0.1 q0.1)
    (M : List Bool) (hM : M.length = Pn.length) :
    let w : Nat → List G → R := fun i x => K.add c0 (f i x)
    let Dd := K.add (K.mul (ZxH K O H w M (fun x => K.mul (Up x) (Uq x))) (ZxH K O H w M (fun _ => K.one)))
      (K.neg (K.mul (ZxH K O H w M Up) (ZxH K O H w M Uq)))
    let s := cnt ((Pn.map (vec LL)).map (fun r => touch r (zadd (vec LL p0) (vec LL q0))))
    let B := K.mul (K.mul (K.mul (K.add K1 K1) (K.add K1 K1)) (pwR K (K.mul κ κ) s))
      (K.mul (pwR K (K.add K.one y) s) (pwR K u Rr))
    O.le (K.neg (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))) (K.add Dd Dd) ∧
      O.le (K.add Dd Dd) (K.mul B (K.mul (ZxH K O H w M (fun _ => K.one)) (ZxH K O H w M (fun _ => K.one))))  := by
  have hlenP : (Pn.map (vec LL)).length = Pn.length := StripAxial.len_map_g _ _
  have hvl : ∀ p, (vec LL p).length = L := fun p => (StripAxial.len_map_g _ LL).trans hL
  exact gap_H K O H DH h1 h10 (Pn.map (vec LL)) (fun i hi => by rw [nthL_map LL Pn i (hlenP ▸ hi)]; exact hvl _) (vec LL p0) (vec LL q0) (hvl p0) (hvl q0) hpq
    f Up Uq c0 m κ ε K1 u x y (4 * (2 * d)) Rr hfd hUp hUq hfaG hUpa hUqa hc0 hc1 hm hm1 hκ1 hκm hw hw1 he hf hK1 hUpb hUqb
    hu0 hu1 hx hy
    (fun r hr => by
      obtain ⟨p, hp, e⟩ := HaarFin.memL_map' (vec LL) r Pn hr
      rw [e]; exact deg_Zd d LL hLL Pn hnd hv p)
    hsmall hxy (far_ok LL Pn p0 q0 Rr hdist) M (hM.trans hlenP.symm)

end GapZd

#print axioms GapZd.gap_Zd

ym/Gauss.lean

lean_all/ym/Gauss.lean

/-
  ym/Gauss — T45, H0 (Haar on SU(2) for polynomials), step 1: the Gaussian moment functional and integration by parts.

  Monomials in n variables are exponent lists α. The standard Gaussian moments are
      G(x^α) = Π_i m(α_i),   m(2k) = (2k−1)!!,  m(odd) = 0.
    gm_succ2       m(a+2) = (a+1)·m(a)
    G_ibp          G(x_i · x^α) = α_i · G(x^{α − e_i})     (integration by parts, at the level of monomials)
  A linear functional with Λ(1) = 1 and this rule is G (next step); the rule is preserved by orthogonal substitutions
  (O Oᵀ = I), which gives rotation invariance — and left multiplication by a unit quaternion is orthogonal on ℝ⁴, so
  the normalised sphere functional is the Haar integral of SU(2) on polynomial functions (H0).

  Lean 4 core only, proofs by hand, no axioms.
-/
import ym.Projective

namespace Gauss

open SU2Char

/-- one-dimensional Gaussian moments over ℕ: m(0) = 1, m(1) = 0, m(a+2) = (a+1) m(a) -/
def gm : Nat → Nat
  | 0 => 1
  | 1 => 0
  | a + 2 => (a + 1) * gm a

theorem gm_succ2 (a : Nat) : gm (a + 2) = (a + 1) * gm a := rfl

/-- moments of a monomial -/
def GM : List Nat → Nat
  | [] => 1
  | a :: α => gm a * GM α

/-- raise / lower the i-th exponent -/
def incAt : Nat → List Nat → List Nat
  | _, [] => []
  | 0, a :: α => (a + 1) :: α
  | i + 1, a :: α => a :: incAt i α

def decAt : Nat → List Nat → List Nat
  | _, [] => []
  | 0, a :: α => (a - 1) :: α
  | i + 1, a :: α => a :: decAt i α

def nthE : Nat → List Nat → Nat
  | _, [] => 0
  | 0, a :: _ => a
  | i + 1, _ :: α => nthE i α

/-- **Integration by parts on monomials:** G(x_i x^α) = α_i · G(x^{α − e_i}). -/
theorem G_ibp : ∀ (i : Nat) (α : List Nat), i < α.length → GM (incAt i α) = nthE i α * GM (decAt i α)
  | _, [], h => absurd h (Nat.not_lt_zero _)
  | 0, a :: α, _ => by
    show gm (a + 1) * GM α = a * (gm (a - 1) * GM α)
    cases a with
    | zero => show 0 * GM α = 0 * _; rw [Nat.zero_mul, Nat.zero_mul]
    | succ a =>
      show gm (a + 2) * GM α = (a + 1) * (gm a * GM α)
      rw [gm_succ2]; lib_nat
  | i + 1, a :: α, h => by
    show gm a * GM (incAt i α) = nthE i α * (gm a * GM (decAt i α))
    rw [G_ibp i α (Nat.lt_of_succ_lt_succ h)]; lib_nat

theorem gm_odd : ∀ k, gm (2 * k + 1) = 0
  | 0 => rfl
  | k + 1 => by
    show gm (2 * k + 1 + 2) = 0
    rw [gm_succ2, gm_odd k, Nat.mul_zero]

theorem gm_values : gm 2 = 1 ∧ gm 4 = 3 ∧ gm 6 = 15 ∧ gm 8 = 105 := by decide

end Gauss

#print axioms Gauss.G_ibp
#print axioms Gauss.gm_odd

ym/GaussCatalan.lean

lean_all/ym/GaussCatalan.lean

/-
  ym/GaussCatalan — T45, H0 step 8: the SU(2) walk moments are Catalan numbers, matched to Gaussian moments.

    P_far          walks of m steps from s cannot reach t > m + s
    refl           reflection: P_m(0 → t) + C(m, a − 1) = C(m, a)     (m = t + 2a)
    ch_mid         C(2b+1, b+1) = C(2b+1, b)
    mom_fact       mom(2k) · k! · (k+1)! = (2k)!                     (mom(2k) = C_k, SU2Haar)
    fact_double    (2k)! = 2^k · k! · (2k−1)!!
    catalan_gauss  2^k · m(2k) = mom(2k) · (k+1)!
  so the moments C_k/4^k of tr U/2 under the SU(2) Haar measure are m(2k)/(2^k (k+1)!) = G(x₀^{2k}) / E|x|^{2k} on ℝ⁴.
  Lean 4 core only, proofs by hand, no axioms.
-/
import ym.GaussQuat

namespace GaussCatalan

open SU2Haar SU2CharExp Gauss

theorem addR : ∀ (c a b : Nat), a + c = b + c → a = b
  | 0, _, _, h => h
  | c + 1, a, b, h => addR c a b (Nat.succ.inj h)

def cp : Nat → Nat → Nat
  | _, 0 => 0
  | m, a + 1 => ch m a

theorem pascal_cp : ∀ m b, ch (m + 1) b = ch m b + cp m b
  | m, 0 => by rw [ch_zero_r, ch_zero_r]; rfl
  | m, b + 1 => by show ch m b + ch m (b + 1) = ch m (b + 1) + ch m b; rw [Nat.add_comm]

theorem dl_ne : ∀ s t, s < t → dl s t = 0
  | _, 0, h => absurd h (Nat.not_lt_zero _)
  | 0, _ + 1, _ => rfl
  | s + 1, t + 1, h => dl_ne s t (Nat.lt_of_succ_lt_succ h)

theorem P_far : ∀ m s t, m + s < t → P m s t = 0
  | 0, s, t, h => dl_ne s t (by rw [Nat.zero_add] at h; exact h)
  | m + 1, 0, t, h => P_far m 1 t h
  | m + 1, s + 1, t, h => by
    show P m s t + P m (s + 2) t = 0
    have e1 : m + 1 + (s + 1) = m + s + 2 := by lib_nat
    have e2 : m + 1 + (s + 1) = m + (s + 2) := by lib_nat
    rw [P_far m s t (Nat.lt_of_le_of_lt (Nat.le_add_right (m + s) 2) (by rw [← e1]; exact h)),
      P_far m (s + 2) t (by rw [← e2]; exact h)]

theorem ch_mid (b : Nat) : ch (2 * b + 1) (b + 1) = ch (2 * b + 1) b := by
  have c1 := ch_fact _ (b + 1) b rfl
  have c2 := ch_fact _ b (b + 1) rfl
  have e1 : b + 1 + b = 2 * b + 1 := by lib_nat
  have e2 : b + (b + 1) = 2 * b + 1 := by lib_nat
  rw [e1] at c1; rw [e2] at c2
  have h := c2.trans c1.symm
  have pos : 0 < fact b * fact (b + 1) := Nat.mul_le_mul (fact_pos b) (fact_pos (b + 1))
  apply Nat.eq_of_mul_eq_mul_right pos
  generalize ch (2 * b + 1) (b + 1) = u at h ⊢
  generalize ch (2 * b + 1) b = v at h ⊢
  generalize fact b = p at h ⊢
  generalize fact (b + 1) = q at h ⊢
  calc u * (p * q) = u * p * q := by lib_nat
    _ = v * q * p := h
    _ = v * (p * q) := by lib_nat

/-- **Reflection principle** for walks on ℕ. -/
theorem refl : ∀ m a t, t + 2 * a = m → P m 0 t + cp m a = ch m a := by
  intro m
  induction m with
  | zero =>
    intro a t h
    cases a with
    | zero =>
      have ht : t = 0 := h
      subst ht; rfl
    | succ b => exact Nat.noConfusion h
  | succ m ih =>
    intro a t h
    cases t with
    | succ t' =>
      have h' : t' + 2 * a = m := Nat.succ.inj ((show t' + 2 * a + 1 = t' + 1 + 2 * a by lib_nat).trans h)
      rw [(last_step m 0).1 t']
      cases a with
      | zero =>
        have i0 := ih 0 t' h'
        have hm : t' = m := h'
        rw [P_far m 0 (t' + 2) (by rw [← hm]; exact Nat.lt_succ_of_lt (Nat.lt_succ_self t'))]
        show P m 0 t' + 0 + 0 = ch (m + 1) 0
        rw [ch_zero_r]; rw [ch_zero_r] at i0; exact i0
      | succ b =>
        have i1 : P m 0 t' + ch m b = ch m (b + 1) := ih (b + 1) t' h'
        have i2 := ih b (t' + 2) (by rw [← h']; lib_nat)
        show P m 0 t' + P m 0 (t' + 2) + ch (m + 1) b = ch m b + ch m (b + 1)
        rw [pascal_cp m b]
        generalize P m 0 t' = x at i1 ⊢
        generalize P m 0 (t' + 2) = y at i2 ⊢
        generalize cp m b = w at i2 ⊢
        generalize ch m (b + 1) = v at i1 ⊢
        generalize ch m b = z at i1 i2 ⊢
        rw [← i1, ← i2]; lib_nat
    | zero =>
      cases a with
      | zero => exact Nat.noConfusion h
      | succ b =>
        have hm : m = 2 * b + 1 := Nat.succ.inj (h.symm.trans (show 0 + 2 * (b + 1) = 2 * b + 1 + 1 by lib_nat))
        rw [(last_step m 0).2]
        have i1 := ih b 1 (by rw [hm]; lib_nat)
        show P m 0 1 + ch (m + 1) b = ch m b + ch m (b + 1)
        rw [pascal_cp m b]
        have sy : ch m (b + 1) = ch m b := by rw [hm]; exact ch_mid b
        rw [sy]
        generalize P m 0 1 = x at i1 ⊢
        generalize cp m b = w at i1 ⊢
        generalize ch m b = z at i1 ⊢
        rw [← i1]; lib_nat

/-- **Catalan:** mom(2k) · k! · (k+1)! = (2k)!. -/
theorem mom_fact : ∀ k, mom (2 * k) * fact k * fact (k + 1) = fact (2 * k)
  | 0 => rfl
  | j + 1 => by
    have r := refl (2 * (j + 1)) (j + 1) 0 (by lib_nat)
    have A := ch_fact _ (j + 1) (j + 1) rfl
    have B := ch_fact _ (j + 2) j rfl
    have eA : j + 1 + (j + 1) = 2 * (j + 1) := by lib_nat
    have eB : j + 2 + j = 2 * (j + 1) := by lib_nat
    rw [eA] at A; rw [eB] at B
    show P (2 * (j + 1)) 0 0 * fact (j + 1) * fact (j + 1 + 1) = fact (2 * (j + 1))
    have r' : P (2 * (j + 1)) 0 0 + ch (2 * (j + 1)) j = ch (2 * (j + 1)) (j + 1) := r
    rw [← A]
    rw [← A, ← r'] at B
    show _ * (fact j * (j + 1)) * (fact j * (j + 1) * (j + 1 + 1)) = _ * (fact j * (j + 1)) * (fact j * (j + 1))
    change ch (2 * (j + 1)) j * (fact j * (j + 1) * (j + 1 + 1)) * fact j
      = (P (2 * (j + 1)) 0 0 + ch (2 * (j + 1)) j) * (fact j * (j + 1)) * (fact j * (j + 1)) at B
    rw [← r']
    generalize P (2 * (j + 1)) 0 0 = M at B ⊢
    generalize ch (2 * (j + 1)) j = c at B ⊢
    generalize fact j = x at B ⊢
    have hB : c * x * x * (j + 1) + c * x * x * (j + 1) * (j + 1)
        = M * x * x * (j + 1) * (j + 1) + c * x * x * (j + 1) * (j + 1) := by
      calc _ = c * (x * (j + 1) * (j + 1 + 1)) * x := by lib_nat
        _ = (M + c) * (x * (j + 1)) * (x * (j + 1)) := B
        _ = _ := by lib_nat
    have u := addR _ _ _ hB
    calc M * (x * (j + 1)) * (x * (j + 1) * (j + 1 + 1))
        = M * x * x * (j + 1) * (j + 1) + (M * x * x * (j + 1) * (j + 1)) * (j + 1) := by lib_nat
      _ = M * x * x * (j + 1) * (j + 1) + (c * x * x * (j + 1)) * (j + 1) := by rw [u]
      _ = (M + c) * (x * (j + 1)) * (x * (j + 1)) := by lib_nat

/-- (2k)! = 2^k · k! · (2k−1)!! -/
theorem fact_double : ∀ k, fact (2 * k) = 2 ^ k * fact k * gm (2 * k)
  | 0 => rfl
  | k + 1 => by
    have e : 2 * (k + 1) = 2 * k + 1 + 1 := by lib_nat
    rw [e]
    show fact (2 * k) * (2 * k + 1) * (2 * k + 1 + 1) = 2 ^ k * 2 * (fact k * (k + 1)) * ((2 * k + 1) * gm (2 * k))
    rw [fact_double k]
    generalize 2 ^ k = p
    generalize fact k = f
    generalize gm (2 * k) = g
    lib_nat

/-- **The Gaussian moments of ℝ⁴ reproduce the SU(2) walk moments:** 2^k · m(2k) = mom(2k) · (k+1)!. -/
theorem catalan_gauss (k : Nat) : 2 ^ k * gm (2 * k) = mom (2 * k) * fact (k + 1) := by
  apply Nat.eq_of_mul_eq_mul_right (fact_pos k)
  have h := (mom_fact k).trans (fact_double k)
  generalize mom (2 * k) = M at h ⊢
  generalize 2 ^ k = p at h ⊢
  generalize fact k = f at h ⊢
  generalize fact (k + 1) = g at h ⊢
  generalize gm (2 * k) = q at h ⊢
  calc p * q * f = p * f * q := by lib_nat
    _ = M * f * g := h.symm
    _ = M * g * f := by lib_nat

theorem catalan_check : 2 ^ 3 * gm 6 = mom 6 * SU2CharExp.fact 4 := by decide

end GaussCatalan

#print axioms GaussCatalan.refl
#print axioms GaussCatalan.mom_fact
#print axioms GaussCatalan.catalan_gauss

ym/GaussH0.lean

lean_all/ym/GaussH0.lean

/-
  ym/GaussH0 — T45, H0 step 10: the normalised sphere functional on all polynomials of ℝ⁴.

    rot_inv_poly     G(p ∘ O) = G(p) for every polynomial p (term list of exponent length n), O orthonormal
    bi_inv_poly      G(p ∘ L_q) = G(p ∘ R_q) = G(p) for unit quaternions q
    sphere_consist   G(Q |x|²) · G(|x|^{2k}) = G(Q) · G(|x|^{2k+2}) for Q homogeneous of degree 2k on ℝ⁴,
                     so S(Q) = G(Q)/G(|x|^{2k}) does not change when Q is multiplied by |x|² (= 1 on S³):
                     S is a well-defined, normalised, SU(2)-bi-invariant functional on polynomial functions on S³.
  Lean 4 core only, proofs by hand, no axioms.
-/
import ym.GaussSphere

namespace GaussH0

open SU2Char SU2CharExp Gauss GaussPoly GaussSubst GaussRot GaussQuat GaussSphere

variable {R : Type} (K : DetChain.CRing R)

theorem rot_inv_poly (n : Nat) (O : Nat → Nat → R) (hO : Orth K n O) :
    ∀ p : List (Term R), LenP n p → Gp K (substP K n O p) = Gp K p
  | [], _ => rfl
  | t :: p, h => by
    show Gp K (scaleT K t.1 (substM K n O 0 t.2) ++ substP K n O p) = K.add (K.mul t.1 (cN K (GM t.2))) (Gp K p)
    rw [Gp_app, Gp_scale, rot_inv K n O hO t.2 h.1, rot_inv_poly n O hO p h.2]

theorem bi_inv_poly (a b c d : R) (hn : nrm K a b c d = K.one) (p : List (Term R)) (hp : LenP 4 p) :
    Gp K (substP K 4 (qL K a b c d) p) = Gp K p ∧ Gp K (substP K 4 (qR K a b c d) p) = Gp K p :=
  ⟨rot_inv_poly K 4 _ (qL_orth K a b c d hn) p hp, rot_inv_poly K 4 _ (qR_orth K a b c d hn) p hp⟩

/-- **Sphere consistency** of the normalisation. -/
theorem sphere_consist (k : Nat) (Q : List (Term R)) (hQ : HomP 4 (2 * k) Q) :
    K.mul (Gp K (mulP K Q (r2 K 4))) (Gp K (powP K 4 (r2 K 4) k))
      = K.mul (Gp K Q) (Gp K (powP K 4 (r2 K 4) (k + 1))) := by
  show _ = K.mul (Gp K Q) (Gp K (mulP K (powP K 4 (r2 K 4) k) (r2 K 4)))
  rw [Gp_mul_r2 K 4 (2 * k) Q hQ, Gp_mul_r2 K 4 (2 * k) _ (hom_pow K 4 k)]
  generalize cN K (2 * k + 4) = c
  generalize Gp K Q = q
  generalize Gp K (powP K 4 (r2 K 4) k) = g
  lib_ring

end GaussH0

#print axioms GaussH0.rot_inv_poly
#print axioms GaussH0.bi_inv_poly
#print axioms GaussH0.sphere_consist

ym/GaussHermite.lean

lean_all/ym/GaussHermite.lean

/-
  ym/GaussHermite — T45, H0 positivity, step 1: the Gaussian adjoint and the Rodrigues formula.

  Creation operator a*_i f = x_i f − ∂_i f; Hermite polynomials He_k(x_i) = (a*_i)^k 1.
    gp_comm     G(f g) = G(g f)
    adj         G((a*_i f) g) = G(f ∂_i g)                    (IBP + Leibniz)
    rodrigues   G(((a*_i)^k f) g) = G(f ∂_i^k g)
    herm_dk     G(He_k(x_i) · g) = G(∂_i^k g)
  Next: [∂_i, a*_i] = 1, hence G(He_α He_β) = α! δ_αβ and G(p²) = Σ α! c_α² ≥ 0 (positivity of the Haar functional).
  Lean 4 core only, proofs by hand, no axioms.
-/
import ym.GaussH0

namespace GaussHermite

open SU2Char Gauss GaussPoly GaussSubst GaussRot

variable {R : Type} (K : DetChain.CRing R)

def cre (i : Nat) (f : List (Term R)) : List (Term R) := xi i f ++ scaleT K (K.neg K.one) (dP K i f)

def creK (i : Nat) : Nat → List (Term R) → List (Term R)
  | 0, f => f
  | k + 1, f => cre K i (creK i k f)

def dPk (i : Nat) : Nat → List (Term R) → List (Term R)
  | 0, g => g
  | k + 1, g => dP K i (dPk i k g)

theorem lenP_cre (n i : Nat) (f : List (Term R)) (hf : LenP n f) : LenP n (cre K i f) :=
  lenP_app n _ _ (lenP_xi n i f hf) (lenP_scale K n _ _ (lenP_dP K n i f hf))

theorem lenP_creK (n i : Nat) : ∀ k (f : List (Term R)), LenP n f → LenP n (creK K i k f)
  | 0, _, h => h
  | k + 1, f, h => lenP_cre K n i _ (lenP_creK n i k f h)

theorem lenP_dPk (n i : Nat) : ∀ k (g : List (Term R)), LenP n g → LenP n (dPk K i k g)
  | 0, _, h => h
  | k + 1, g, h => lenP_dP K n i _ (lenP_dPk n i k g h)

theorem dPk_comm (i : Nat) : ∀ k (g : List (Term R)), dPk K i k (dP K i g) = dP K i (dPk K i k g)
  | 0, _ => rfl
  | k + 1, g => by show dP K i (dPk K i k (dP K i g)) = dP K i (dP K i (dPk K i k g)); rw [dPk_comm i k g]

theorem gp_comm (A B : List (Term R)) : Gp K (mulP K A B) = Gp K (mulP K B A) := by
  rw [Gp_mulP, Gp_mulP, Bf_comm]

/-- **Gaussian adjoint:** G((x_i f − ∂_i f) g) = G(f ∂_i g). -/
theorem adj (n i : Nat) (hi : i < n) (f g : List (Term R)) (hf : LenP n f) (hg : LenP n g) :
    Gp K (mulP K (cre K i f) g) = Gp K (mulP K f (dP K i g)) := by
  have hgf : LenP n (mulP K g f) := lenP_mulP K n f hf g hg
  have X : Gp K (mulP K (xi i f) g) = K.add (Gp K (mulP K f (dP K i g))) (Gp K (mulP K (dP K i f) g)) := by
    rw [gp_comm, ← xi_mulP K n i hi f hf g hg, Gp_ibp K i _ (wide_of_len n i hi _ hgf),
      Gp_eq_Bf K n _ (lenP_dP K n i _ hgf), leib_eqv K n i g f (one K n) (lenP_one K n), Bf_app_l,
      ← Gp_eq_Bf K n _ (lenP_mulP K n f hf _ (lenP_dP K n i g hg)),
      ← Gp_eq_Bf K n _ (lenP_mulP K n _ (lenP_dP K n i f hf) g hg), gp_comm K (dP K i g) f, gp_comm K g (dP K i f)]
  show Gp K (mulP K (xi i f ++ scaleT K (K.neg K.one) (dP K i f)) g) = _
  rw [mulP_app_l, Gp_app, scale_mulP, Gp_scale, X]
  generalize Gp K (mulP K f (dP K i g)) = z
  generalize Gp K (mulP K (dP K i f) g) = y
  lib_ring

/-- **Rodrigues formula.** -/
theorem rodrigues (n i : Nat) (hi : i < n) : ∀ k (f g : List (Term R)), LenP n f → LenP n g →
    Gp K (mulP K (creK K i k f) g) = Gp K (mulP K f (dPk K i k g))
  | 0, _, _, _, _ => rfl
  | k + 1, f, g, hf, hg => by
    show Gp K (mulP K (cre K i (creK K i k f)) g) = Gp K (mulP K f (dP K i (dPk K i k g)))
    rw [adj K n i hi _ g (lenP_creK K n i k f hf) hg, rodrigues n i hi k f (dP K i g) hf (lenP_dP K n i g hg), dPk_comm]

/-- G(He_k(x_i) · g) = G(∂_i^k g). -/
theorem herm_dk (n i : Nat) (hi : i < n) (k : Nat) (g : List (Term R)) (hg : LenP n g) :
    Gp K (mulP K (creK K i k (one K n)) g) = Gp K (dPk K i k g) := by
  rw [rodrigues K n i hi k _ g (lenP_one K n) hg, Gp_mulP_one K n _ (lenP_dPk K n i k g hg)]

/-! ### commutation [∂_i, x_i] = 1 and the Hermite ladder -/

theorem comm_row (i : Nat) (c : R) (α : List Nat) (hα : i < α.length) (r : List (Term R)) :
    row K (K.mul c (cN K (nthE i (incAt i α))), decAt i (incAt i α)) r
      = K.add (row K (K.mul c (cN K (nthE i α)), incAt i (decAt i α)) r) (row K (c, α) r) := by
  rw [GaussSphere.nth_inc_self i α hα, GaussSphere.dec_inc, cN_add, SU2CharExp.cN_one]
  cases Nat.lt_or_ge (nthE i α) 1 with
  | inl h0 =>
    have z : nthE i α = 0 := Nat.le_antisymm (Nat.le_of_lt_succ h0) (Nat.zero_le _)
    rw [z, show cN K 0 = K.zero from rfl, row_coef K (K.mul c K.zero) K.zero _ (by lib_ring), row_zero_coef, K.zero_add]
    rw [K.zero_add]; exact row_coef K (K.mul c K.one) c α (by lib_ring) r
  | inr h1 =>
    rw [incAt_decAt i α h1]
    exact row_single_eq K (K.mul c (cN K (nthE i α))) c (K.mul c (K.add (cN K (nthE i α)) K.one)) α (by lib_ring) r

theorem comm_xi (n i : Nat) (hi : i < n) : ∀ f : List (Term R), LenP n f → ∀ r : List (Term R),
    Bf K (dP K i (xi i f)) r = K.add (Bf K (xi i (dP K i f)) r) (Bf K f r)
  | [], _, _ => (K.zero_add _).symm
  | t :: f, h, r => by
    show K.add (row K (K.mul t.1 (cN K (nthE i (incAt i t.2))), decAt i (incAt i t.2)) r) (Bf K (dP K i (xi i f)) r)
      = K.add (K.add (row K (K.mul t.1 (cN K (nthE i t.2)), incAt i (decAt i t.2)) r) (Bf K (xi i (dP K i f)) r))
          (K.add (row K t r) (Bf K f r))
    rw [comm_row K i t.1 t.2 (by rw [h.1]; exact hi) r, comm_xi n i hi f h.2 r]
    generalize row K (K.mul t.1 (cN K (nthE i t.2)), incAt i (decAt i t.2)) r = a
    generalize Bf K (xi i (dP K i f)) r = b
    generalize Bf K f r = d
    generalize row K t r = e
    lib_ring

theorem dP_scale (i : Nat) (c : R) : ∀ p : List (Term R), dP K i (scaleT K c p) = scaleT K c (dP K i p)
  | [] => rfl
  | t :: p => by
    show (K.mul (K.mul c t.1) (cN K (nthE i t.2)), decAt i t.2) :: dP K i (scaleT K c p)
      = (K.mul c (K.mul t.1 (cN K (nthE i t.2))), decAt i t.2) :: scaleT K c (dP K i p)
    rw [K.mul_assoc, dP_scale i c p]

theorem xi_scale (i : Nat) (c : R) : ∀ p : List (Term R), xi i (scaleT K c p) = scaleT K c (xi i p)
  | [] => rfl
  | t :: p => by
    show (K.mul c t.1, incAt i t.2) :: xi i (scaleT K c p) = (K.mul c t.1, incAt i t.2) :: scaleT K c (xi i p)
    rw [xi_scale i c p]

/-- **[∂_i, a*_i] = 1** up to test-equivalence. -/
theorem comm_cre (n i : Nat) (hi : i < n) (f : List (Term R)) (hf : LenP n f) :
    Eqv K n (dP K i (cre K i f)) (cre K i (dP K i f) ++ f) := fun r _ => by
  show Bf K (dP K i (xi i f ++ scaleT K (K.neg K.one) (dP K i f))) r
    = Bf K ((xi i (dP K i f) ++ scaleT K (K.neg K.one) (dP K i (dP K i f))) ++ f) r
  rw [dP_app, Bf_app_l, Bf_app_l, Bf_app_l, dP_scale, Bf_scale, comm_xi K n i hi f hf r]
  generalize Bf K (xi i (dP K i f)) r = a
  generalize Bf K f r = b
  generalize Bf K (dP K i (dP K i f)) r = d
  lib_ring

/-- multiplying by x_i is symmetric under G -/
theorem Gp_xi_unit (n i : Nat) (hi : i < n) : ∀ X : List (Term R), LenP n X →
    Gp K (xi i X) = Bf K X [(K.one, unitE n i)]
  | [], _ => rfl
  | t :: X, h => by
    show K.add (K.mul t.1 (cN K (GM (incAt i t.2)))) (Gp K (xi i X))
      = K.add (K.add (K.mul (K.mul t.1 K.one) (cN K (GM (addE t.2 (unitE n i))))) K.zero) (Bf K X [(K.one, unitE n i)])
    rw [addE_comm, addE_unit n i hi t.2 h.1, Gp_xi_unit n i hi X h.2, DetChain.add_zero', K.mul_comm t.1 K.one, K.one_mul]

theorem eqv_xi (n i : Nat) (hi : i < n) (p q : List (Term R)) (hp : LenP n p) (hq : LenP n q) (h : Eqv K n p q) :
    Eqv K n (xi i p) (xi i q) := fun r hr => by
  have e : LenP n [(K.one, unitE n i)] := ⟨(len_incAt i _).trans (len_zeros n), trivial⟩
  have key : ∀ s : List (Term R), LenP n s → Bf K (xi i s) r = Bf K s (mulP K r [(K.one, unitE n i)]) := fun s hs => by
    rw [← Gp_mulP, gp_comm, ← xi_mulP K n i hi s hs r hr, Gp_xi_unit K n i hi _ (lenP_mulP K n s hs r hr),
      Bf_mulP_swap, Bf_assoc]
  rw [key p hp, key q hq, h _ (lenP_mulP K n _ e r hr)]

theorem eqv_cre (n i : Nat) (hi : i < n) (p q : List (Term R)) (hp : LenP n p) (hq : LenP n q) (h : Eqv K n p q) :
    Eqv K n (cre K i p) (cre K i q) :=
  eqv_app K n _ _ _ _ (eqv_xi K n i hi p q hp hq h) (eqv_scale K n _ _ _ (eqv_dP K n i hi p q hp hq h))

theorem cre_scale (n i : Nat) (c : R) (p : List (Term R)) : Eqv K n (cre K i (scaleT K c p)) (scaleT K c (cre K i p)) :=
  fun r _ => by
    show Bf K (xi i (scaleT K c p) ++ scaleT K (K.neg K.one) (dP K i (scaleT K c p))) r
      = Bf K (scaleT K c (xi i p ++ scaleT K (K.neg K.one) (dP K i p))) r
    rw [xi_scale, dP_scale, scale_app, Bf_app_l, Bf_app_l, Bf_scale, Bf_scale, Bf_scale, Bf_scale, Bf_scale]
    generalize Bf K (xi i p) r = a
    generalize Bf K (dP K i p) r = b
    lib_ring

def He (n i m : Nat) : List (Term R) := creK K i m (one K n)

theorem lenP_He (n i m : Nat) : LenP n (He K n i m) := lenP_creK K n i m _ (lenP_one K n)

/-- **∂_i He_{m+1} ≡ (m+1) He_m.** -/
theorem dP_He (n i : Nat) (hi : i < n) : ∀ m, Eqv K n (dP K i (He K n i (m + 1))) (scaleT K (cN K (m + 1)) (He K n i m))
  | 0 => by
    show Eqv K n (dP K i (cre K i (one K n))) _
    refine eqv_trans K n _ _ _ (comm_cre K n i hi _ (lenP_one K n)) ?_
    have h1 : Eqv K n (cre K i (dP K i (one K n))) (cre K i []) :=
      eqv_cre K n i hi _ _ (lenP_dP K n i _ (lenP_one K n)) trivial (dP_one K n i)
    refine eqv_trans K n _ _ _ (eqv_app K n _ _ _ _ h1 (eqv_refl K n (one K n))) ?_
    show Eqv K n (one K n) (scaleT K (cN K 1) (one K n))
    rw [SU2CharExp.cN_one]; exact eqv_symm K n _ _ (eqv_scale_one K n _)
  | m + 1 => by
    have ih := dP_He n i hi m
    have hm := lenP_He K n i m
    have hm1 := lenP_He K n i (m + 1)
    show Eqv K n (dP K i (cre K i (He K n i (m + 1)))) _
    refine eqv_trans K n _ _ _ (comm_cre K n i hi _ hm1) ?_
    have h1 := eqv_cre K n i hi _ _ (lenP_dP K n i _ hm1) (lenP_scale K n _ _ hm) ih
    have h2 := eqv_trans K n _ _ _ h1 (cre_scale K n i (cN K (m + 1)) (He K n i m))
    refine eqv_trans K n _ _ _ (eqv_app K n _ _ _ _ h2 (eqv_refl K n (He K n i (m + 1)))) ?_
    show Eqv K n (scaleT K (cN K (m + 1)) (He K n i (m + 1)) ++ He K n i (m + 1)) (scaleT K (cN K (m + 1 + 1)) (He K n i (m + 1)))
    have e : cN K (m + 1 + 1) = K.add (cN K (m + 1)) K.one := by
      show K.add K.one (cN K (m + 1)) = _; rw [K.add_comm]
    rw [e]; exact eqv_add_scale K n _ _

/-! ### orthogonality of one-variable Hermite polynomials -/

theorem eqv_dPk (n i : Nat) (hi : i < n) : ∀ k (p q : List (Term R)), LenP n p → LenP n q → Eqv K n p q →
    Eqv K n (dPk K i k p) (dPk K i k q)
  | 0, _, _, _, _, h => h
  | k + 1, p, q, hp, hq, h =>
    eqv_dP K n i hi _ _ (lenP_dPk K n i k p hp) (lenP_dPk K n i k q hq) (eqv_dPk n i hi k p q hp hq h)

theorem dPk_scale (i : Nat) (c : R) : ∀ k (p : List (Term R)), dPk K i k (scaleT K c p) = scaleT K c (dPk K i k p)
  | 0, _ => rfl
  | k + 1, p => by show dP K i (dPk K i k (scaleT K c p)) = _; rw [dPk_scale i c k p, dP_scale]; rfl

theorem dPk_add (i : Nat) (g : List (Term R)) (a : Nat) : ∀ b, dPk K i (a + b) g = dPk K i b (dPk K i a g)
  | 0 => rfl
  | b + 1 => by show dP K i (dPk K i (a + b) g) = dP K i (dPk K i b (dPk K i a g)); rw [dPk_add i g a b]

theorem dPk_nil (i : Nat) : ∀ k, dPk K i k ([] : List (Term R)) = []
  | 0 => rfl
  | k + 1 => by show dP K i (dPk K i k []) = []; rw [dPk_nil i k]; rfl

/-- falling factorial (m+k)!/m! -/
def ff : Nat → Nat → Nat
  | _, 0 => 1
  | m, k + 1 => ff (m + 1) k * (m + 1)

theorem ff_fact : ∀ k m, ff m k * SU2CharExp.fact m = SU2CharExp.fact (m + k)
  | 0, m => by show 1 * SU2CharExp.fact m = SU2CharExp.fact m; exact Nat.one_mul _
  | k + 1, m => by
    show ff (m + 1) k * (m + 1) * SU2CharExp.fact m = _
    have h := ff_fact k (m + 1)
    have e : m + 1 + k = m + (k + 1) := by lib_nat
    rw [e] at h; rw [← h]
    show _ = ff (m + 1) k * (SU2CharExp.fact m * (m + 1))
    generalize ff (m + 1) k = a; generalize SU2CharExp.fact m = b; lib_nat

/-- **∂_i^k He_{m+k} ≡ (m+k)!/m! · He_m.** -/
theorem dPk_He (n i : Nat) (hi : i < n) : ∀ k m, Eqv K n (dPk K i k (He K n i (m + k))) (scaleT K (cN K (ff m k)) (He K n i m))
  | 0, m => by show Eqv K n (He K n i m) (scaleT K (cN K 1) _); rw [SU2CharExp.cN_one]; exact eqv_symm K n _ _ (eqv_scale_one K n _)
  | k + 1, m => by
    have e : m + (k + 1) = (m + 1) + k := by lib_nat
    rw [e]
    have ih := dPk_He n i hi k (m + 1)
    show Eqv K n (dP K i (dPk K i k (He K n i (m + 1 + k)))) _
    refine eqv_trans K n _ _ _ (eqv_dP K n i hi _ _ (lenP_dPk K n i k _ (lenP_He K n i _))
      (lenP_scale K n _ _ (lenP_He K n i _)) ih) ?_
    rw [dP_scale]
    refine eqv_trans K n _ _ _ (eqv_scale K n _ _ _ (dP_He K n i hi m)) ?_
    rw [scale_scale, ← SU2CharExp.cN_mul]
    exact eqv_refl K n _

theorem dPk_He_low (n i : Nat) (hi : i < n) (m j : Nat) : Eqv K n (dPk K i (m + 1 + j) (He K n i m)) [] := by
  rw [dPk_add]
  have h0 : Eqv K n (dPk K i (m + 1) (He K n i m)) [] := by
    show Eqv K n (dP K i (dPk K i m (He K n i m))) []
    have a := dPk_He K n i hi m 0
    rw [Nat.zero_add] at a
    refine eqv_trans K n _ _ _ (eqv_dP K n i hi _ _ (lenP_dPk K n i m _ (lenP_He K n i m))
      (lenP_scale K n _ _ (lenP_He K n i 0)) a) ?_
    rw [dP_scale]
    have := eqv_scale K n (cN K (ff 0 m)) _ _ (dP_one K n i)
    exact this
  have := eqv_dPk K n i hi j _ [] (lenP_dPk K n i (m + 1) _ (lenP_He K n i m)) trivial h0
  rw [dPk_nil] at this; exact this

theorem Gp_eqv (n : Nat) (p q : List (Term R)) (hp : LenP n p) (hq : LenP n q) (h : Eqv K n p q) : Gp K p = Gp K q := by
  rw [Gp_eq_Bf K n p hp, Gp_eq_Bf K n q hq, h _ (lenP_one K n)]

/-- **Hermite orthogonality:** G(He_m(x_i)²) = m!. -/
theorem herm_sq (n i : Nat) (hi : i < n) (m : Nat) :
    Gp K (mulP K (He K n i m) (He K n i m)) = cN K (SU2CharExp.fact m) := by
  show Gp K (mulP K (creK K i m (one K n)) (He K n i m)) = _
  rw [herm_dk K n i hi m _ (lenP_He K n i m)]
  have a := dPk_He K n i hi m 0
  rw [Nat.zero_add] at a
  rw [Gp_eqv K n _ _ (lenP_dPk K n i m _ (lenP_He K n i m)) (lenP_scale K n _ _ (lenP_He K n i 0)) a, Gp_scale]
  show K.mul _ (K.add (K.mul K.one (cN K (GM (zerosL n)))) K.zero) = _
  rw [GM_zeros, SU2CharExp.cN_one, K.one_mul, DetChain.add_zero', K.mul_comm, K.one_mul]
  have f := ff_fact m 0
  rw [Nat.zero_add] at f
  rw [← f]; exact congrArg (cN K) (Nat.mul_one _).symm

theorem split_lt (a : Nat) : ∀ b, a < b → ∃ j, b = a + 1 + j
  | 0, h => absurd h (Nat.not_lt_zero _)
  | b + 1, h => by
    cases Nat.lt_or_ge a b with
    | inl hl => obtain ⟨j, hj⟩ := split_lt a b hl; exact ⟨j + 1, by rw [hj]; rfl⟩
    | inr hg => exact ⟨0, congrArg Nat.succ (Nat.le_antisymm hg (Nat.le_of_lt_succ h))⟩

/-- **Hermite orthogonality:** G(He_k(x_i) He_m(x_i)) = 0 for k ≠ m. -/
theorem herm_orth (n i : Nat) (hi : i < n) (k m : Nat) (h : k ≠ m) :
    Gp K (mulP K (He K n i k) (He K n i m)) = K.zero := by
  have low : ∀ a b, a < b → Gp K (mulP K (He K n i b) (He K n i a)) = K.zero := by
    intro a b hab
    obtain ⟨j, hj⟩ := split_lt a b hab
    show Gp K (mulP K (creK K i b (one K n)) (He K n i a)) = _
    rw [herm_dk K n i hi b _ (lenP_He K n i a), hj,
      Gp_eqv K n _ ([] : List (Term R)) (lenP_dPk K n i _ _ (lenP_He K n i a)) trivial (dPk_He_low K n i hi a j)]
    rfl
  cases Nat.lt_or_ge k m with
  | inl hl => rw [gp_comm]; exact low k m hl
  | inr hg =>
    cases Nat.lt_or_ge m k with
    | inl hl => exact low m k hl
    | inr hk => exact absurd (Nat.le_antisymm hk hg) h

/-! ### multi-index Hermite polynomials and the Rodrigues formula -/

/-- He_α(x_k, x_{k+1}, …) = Π_i He_{α_i}(x_{k+i}) -/
def Hm (n : Nat) : Nat → List Nat → List (Term R)
  | _, [] => one K n
  | k, a :: α => creK K k a (Hm n (k + 1) α)

/-- ∂^α along x_k, x_{k+1}, … -/
def Dm : Nat → List Nat → List (Term R) → List (Term R)
  | _, [], g => g
  | k, a :: α, g => Dm (k + 1) α (dPk K k a g)

theorem lenP_Hm (n : Nat) : ∀ k α, LenP n (Hm K n k α)
  | _, [] => lenP_one K n
  | k, a :: α => lenP_creK K n k a _ (lenP_Hm n (k + 1) α)

theorem lenP_Dm (n : Nat) : ∀ k α (g : List (Term R)), LenP n g → LenP n (Dm K k α g)
  | _, [], _, h => h
  | k, a :: α, g, h => lenP_Dm n (k + 1) α _ (lenP_dPk K n k a g h)

/-- **Multi-index Rodrigues formula:** G(He_α · q) = G(∂^α q). -/
theorem rodrigues_m (n : Nat) : ∀ (k : Nat) (α : List Nat) (q : List (Term R)), k + α.length ≤ n → LenP n q →
    Gp K (mulP K (Hm K n k α) q) = Gp K (Dm K k α q)
  | _, [], q, _, hq => Gp_mulP_one K n q hq
  | k, a :: α, q, hk, hq => by
    have hkn : k < n := Nat.lt_of_lt_of_le (Nat.lt_succ_of_le (Nat.le_add_right k α.length)) hk
    have hk' : k + 1 + α.length ≤ n := by
      have : k + 1 + α.length = k + (α.length + 1) := by lib_nat
      rw [this]; exact hk
    show Gp K (mulP K (creK K k a (Hm K n (k + 1) α)) q) = Gp K (Dm K (k + 1) α (dPk K k a q))
    rw [rodrigues K n k hkn a _ q (lenP_Hm K n (k + 1) α) hq,
      rodrigues_m n (k + 1) α _ hk' (lenP_dPk K n k a q hq)]

/-! ### different coordinates commute -/

theorem nth_inc_ne : ∀ (i j : Nat) (α : List Nat), i ≠ j → nthE j (incAt i α) = nthE j α
  | 0, 0, _, h => absurd rfl h
  | 0, _ + 1, [], _ => rfl
  | _ + 1, 0, [], _ => rfl
  | _ + 1, _ + 1, [], _ => rfl
  | 0, _ + 1, _ :: _, _ => rfl
  | _ + 1, 0, _ :: _, _ => rfl
  | i + 1, j + 1, _ :: α, h => nth_inc_ne i j α (fun e => h (congrArg Nat.succ e))

theorem nth_dec_ne : ∀ (i j : Nat) (α : List Nat), i ≠ j → nthE j (decAt i α) = nthE j α
  | 0, 0, _, h => absurd rfl h
  | 0, _ + 1, [], _ => rfl
  | _ + 1, 0, [], _ => rfl
  | _ + 1, _ + 1, [], _ => rfl
  | 0, _ + 1, _ :: _, _ => rfl
  | _ + 1, 0, _ :: _, _ => rfl
  | i + 1, j + 1, _ :: α, h => nth_dec_ne i j α (fun e => h (congrArg Nat.succ e))

theorem dec_inc_comm : ∀ (i j : Nat) (α : List Nat), i ≠ j → decAt j (incAt i α) = incAt i (decAt j α)
  | 0, 0, _, h => absurd rfl h
  | 0, _ + 1, [], _ => rfl
  | _ + 1, 0, [], _ => rfl
  | _ + 1, _ + 1, [], _ => rfl
  | 0, _ + 1, _ :: _, _ => rfl
  | _ + 1, 0, _ :: _, _ => rfl
  | i + 1, j + 1, a :: α, h => by
    show a :: decAt j (incAt i α) = a :: incAt i (decAt j α)
    rw [dec_inc_comm i j α (fun e => h (congrArg Nat.succ e))]

theorem dec_dec_comm : ∀ (i j : Nat) (α : List Nat), i ≠ j → decAt j (decAt i α) = decAt i (decAt j α)
  | 0, 0, _, h => absurd rfl h
  | 0, _ + 1, [], _ => rfl
  | _ + 1, 0, [], _ => rfl
  | _ + 1, _ + 1, [], _ => rfl
  | 0, _ + 1, _ :: _, _ => rfl
  | _ + 1, 0, _ :: _, _ => rfl
  | i + 1, j + 1, a :: α, h => by
    show a :: decAt j (decAt i α) = a :: decAt i (decAt j α)
    rw [dec_dec_comm i j α (fun e => h (congrArg Nat.succ e))]

theorem dP_xi_cross (i j : Nat) (h : i ≠ j) : ∀ f : List (Term R), dP K j (xi i f) = xi i (dP K j f)
  | [] => rfl
  | t :: f => by
    show (K.mul t.1 (cN K (nthE j (incAt i t.2))), decAt j (incAt i t.2)) :: dP K j (xi i f)
      = (K.mul t.1 (cN K (nthE j t.2)), incAt i (decAt j t.2)) :: xi i (dP K j f)
    rw [nth_inc_ne i j t.2 h, dec_inc_comm i j t.2 h, dP_xi_cross i j h f]

theorem dP_dP_cross (i j : Nat) (h : i ≠ j) : ∀ f : List (Term R), dP K j (dP K i f) = dP K i (dP K j f)
  | [] => rfl
  | t :: f => by
    show (K.mul (K.mul t.1 (cN K (nthE i t.2))) (cN K (nthE j (decAt i t.2))), decAt j (decAt i t.2)) :: dP K j (dP K i f)
      = (K.mul (K.mul t.1 (cN K (nthE j t.2))) (cN K (nthE i (decAt j t.2))), decAt i (decAt j t.2)) :: dP K i (dP K j f)
    rw [nth_dec_ne i j t.2 h, nth_dec_ne j i t.2 (fun e => h e.symm), dec_dec_comm i j t.2 h, dP_dP_cross i j h f,
      K.mul_assoc, K.mul_assoc, K.mul_comm (cN K (nthE i t.2))]

theorem dP_cre_cross (i j : Nat) (h : i ≠ j) (f : List (Term R)) : dP K j (cre K i f) = cre K i (dP K j f) := by
  show dP K j (xi i f ++ scaleT K (K.neg K.one) (dP K i f)) = xi i (dP K j f) ++ scaleT K (K.neg K.one) (dP K i (dP K j f))
  rw [dP_app, dP_xi_cross K i j h, dP_scale, dP_dP_cross K i j h]

theorem dP_creK_cross (i j : Nat) (h : i ≠ j) : ∀ c (f : List (Term R)), dP K j (creK K i c f) = creK K i c (dP K j f)
  | 0, _ => rfl
  | c + 1, f => by show dP K j (cre K i (creK K i c f)) = cre K i (creK K i c (dP K j f)); rw [dP_cre_cross K i j h, dP_creK_cross i j h c f]

theorem dPk_creK_cross (i j : Nat) (h : i ≠ j) (c : Nat) : ∀ a (f : List (Term R)), dPk K j a (creK K i c f) = creK K i c (dPk K j a f)
  | 0, _ => rfl
  | a + 1, f => by show dP K j (dPk K j a (creK K i c f)) = _; rw [dPk_creK_cross i j h c a f, dP_creK_cross K i j h]; rfl

theorem Dm_creK (k c : Nat) (X : List (Term R)) : ∀ (l : Nat) (α : List Nat), k < l →
    Dm K l α (creK K k c X) = creK K k c (Dm K l α X)
  | _, [], _ => rfl
  | l, a :: α, h => by
    show Dm K (l + 1) α (dPk K l a (creK K k c X)) = creK K k c (Dm K (l + 1) α (dPk K l a X))
    rw [dPk_creK_cross K k l (Nat.ne_of_lt h) c a X, Dm_creK k c _ (l + 1) α (Nat.lt_succ_of_lt h)]

theorem cre_nil (i : Nat) : cre K i ([] : List (Term R)) = [] := rfl

theorem creK_nil (i : Nat) : ∀ c, creK K i c ([] : List (Term R)) = []
  | 0 => rfl
  | c + 1 => by show cre K i (creK K i c []) = []; rw [creK_nil i c]; rfl

theorem eqv_creK (n i : Nat) (hi : i < n) : ∀ c (p q : List (Term R)), LenP n p → LenP n q → Eqv K n p q →
    Eqv K n (creK K i c p) (creK K i c q)
  | 0, _, _, _, _, h => h
  | c + 1, p, q, hp, hq, h =>
    eqv_cre K n i hi _ _ (lenP_creK K n i c p hp) (lenP_creK K n i c q hq) (eqv_creK n i hi c p q hp hq h)

/-- ∂_k He_β(x_l, …) ≡ 0 for k < l -/
theorem dP_Hm_low (n k : Nat) : ∀ (l : Nat) (β : List Nat), k < l → l + β.length ≤ n → Eqv K n (dP K k (Hm K n l β)) []
  | _, [], _, _ => dP_one K n k
  | l, b :: β, h, hl => by
    have hln : l < n := Nat.lt_of_lt_of_le (Nat.lt_succ_of_le (Nat.le_add_right l β.length)) hl
    have hl' : l + 1 + β.length ≤ n := by
      have : l + 1 + β.length = l + (β.length + 1) := by lib_nat
      rw [this]; exact hl
    show Eqv K n (dP K k (creK K l b (Hm K n (l + 1) β))) []
    rw [dP_creK_cross K l k (fun e => Nat.ne_of_lt h e.symm)]
    have := eqv_creK K n l hln b _ [] (lenP_dP K n k _ (lenP_Hm K n (l + 1) β)) trivial
      (dP_Hm_low n k (l + 1) β (Nat.lt_succ_of_lt h) hl')
    rw [creK_nil] at this; exact this

/-! ### the ladder on a factor independent of x_k -/

theorem dP_creK_F (n k : Nat) (hk : k < n) (F : List (Term R)) (hF : LenP n F) (h0 : Eqv K n (dP K k F) []) :
    ∀ m, Eqv K n (dP K k (creK K k (m + 1) F)) (scaleT K (cN K (m + 1)) (creK K k m F))
  | 0 => by
    show Eqv K n (dP K k (cre K k F)) _
    refine eqv_trans K n _ _ _ (comm_cre K n k hk _ hF) ?_
    have h1 : Eqv K n (cre K k (dP K k F)) (cre K k []) := eqv_cre K n k hk _ _ (lenP_dP K n k _ hF) trivial h0
    refine eqv_trans K n _ _ _ (eqv_app K n _ _ _ _ h1 (eqv_refl K n F)) ?_
    show Eqv K n F (scaleT K (cN K 1) F)
    rw [SU2CharExp.cN_one]; exact eqv_symm K n _ _ (eqv_scale_one K n _)
  | m + 1 => by
    have ih := dP_creK_F n k hk F hF h0 m
    have hm := lenP_creK K n k m F hF
    have hm1 := lenP_creK K n k (m + 1) F hF
    show Eqv K n (dP K k (cre K k (creK K k (m + 1) F))) _
    refine eqv_trans K n _ _ _ (comm_cre K n k hk _ hm1) ?_
    have h1 := eqv_cre K n k hk _ _ (lenP_dP K n k _ hm1) (lenP_scale K n _ _ hm) ih
    have h2 := eqv_trans K n _ _ _ h1 (cre_scale K n k (cN K (m + 1)) (creK K k m F))
    refine eqv_trans K n _ _ _ (eqv_app K n _ _ _ _ h2 (eqv_refl K n (creK K k (m + 1) F))) ?_
    show Eqv K n (scaleT K (cN K (m + 1)) (creK K k (m + 1) F) ++ creK K k (m + 1) F) (scaleT K (cN K (m + 1 + 1)) (creK K k (m + 1) F))
    have e : cN K (m + 1 + 1) = K.add (cN K (m + 1)) K.one := by
      show K.add K.one (cN K (m + 1)) = _; rw [K.add_comm]
    rw [e]; exact eqv_add_scale K n _ _

theorem dPk_creK_F (n k : Nat) (hk : k < n) (F : List (Term R)) (hF : LenP n F) (h0 : Eqv K n (dP K k F) []) :
    ∀ a m, Eqv K n (dPk K k a (creK K k (m + a) F)) (scaleT K (cN K (ff m a)) (creK K k m F))
  | 0, m => by show Eqv K n (creK K k m F) (scaleT K (cN K 1) _); rw [SU2CharExp.cN_one]; exact eqv_symm K n _ _ (eqv_scale_one K n _)
  | a + 1, m => by
    have e : m + (a + 1) = (m + 1) + a := by lib_nat
    rw [e]
    have ih := dPk_creK_F n k hk F hF h0 a (m + 1)
    show Eqv K n (dP K k (dPk K k a (creK K k (m + 1 + a) F))) _
    refine eqv_trans K n _ _ _ (eqv_dP K n k hk _ _ (lenP_dPk K n k a _ (lenP_creK K n k _ F hF))
      (lenP_scale K n _ _ (lenP_creK K n k _ F hF)) ih) ?_
    rw [dP_scale]
    refine eqv_trans K n _ _ _ (eqv_scale K n _ _ _ (dP_creK_F K n k hk F hF h0 m)) ?_
    rw [scale_scale, ← SU2CharExp.cN_mul]
    exact eqv_refl K n _

theorem dPk_creK_low (n k : Nat) (hk : k < n) (F : List (Term R)) (hF : LenP n F) (h0 : Eqv K n (dP K k F) []) (m j : Nat) :
    Eqv K n (dPk K k (m + 1 + j) (creK K k m F)) [] := by
  rw [dPk_add]
  have h1 : Eqv K n (dPk K k (m + 1) (creK K k m F)) [] := by
    show Eqv K n (dP K k (dPk K k m (creK K k m F))) []
    have a := dPk_creK_F K n k hk F hF h0 m 0
    rw [Nat.zero_add] at a
    refine eqv_trans K n _ _ _ (eqv_dP K n k hk _ _ (lenP_dPk K n k m _ (lenP_creK K n k m F hF))
      (lenP_scale K n _ _ (lenP_creK K n k 0 F hF)) a) ?_
    rw [dP_scale]
    exact eqv_scale K n (cN K (ff 0 m)) _ _ h0
  have := eqv_dPk K n k hk j _ [] (lenP_dPk K n k (m + 1) _ (lenP_creK K n k m F hF)) trivial h1
  rw [dPk_nil] at this; exact this

/-! ### multi-index orthogonality -/

def factL : List Nat → Nat
  | [] => 1
  | a :: α => SU2CharExp.fact a * factL α

theorem Dm_scale (c : R) : ∀ (l : Nat) (α : List Nat) (Y : List (Term R)), Dm K l α (scaleT K c Y) = scaleT K c (Dm K l α Y)
  | _, [], _ => rfl
  | l, a :: α, Y => by show Dm K (l + 1) α (dPk K l a (scaleT K c Y)) = _; rw [dPk_scale, Dm_scale c (l + 1) α]; rfl

theorem Dm_nil : ∀ (l : Nat) (α : List Nat), Dm K l α ([] : List (Term R)) = []
  | _, [] => rfl
  | l, a :: α => by show Dm K (l + 1) α (dPk K l a []) = []; rw [dPk_nil, Dm_nil (l + 1) α]

theorem eqv_Dm (n : Nat) : ∀ (l : Nat) (α : List Nat) (p q : List (Term R)), l + α.length ≤ n → LenP n p → LenP n q →
    Eqv K n p q → Eqv K n (Dm K l α p) (Dm K l α q)
  | _, [], _, _, _, _, _, h => h
  | l, a :: α, p, q, hl, hp, hq, h => by
    have hln : l < n := Nat.lt_of_lt_of_le (Nat.lt_succ_of_le (Nat.le_add_right l α.length)) hl
    have hl' : l + 1 + α.length ≤ n := by
      have : l + 1 + α.length = l + (α.length + 1) := by lib_nat
      rw [this]; exact hl
    exact eqv_Dm n (l + 1) α _ _ hl' (lenP_dPk K n l a p hp) (lenP_dPk K n l a q hq) (eqv_dPk K n l hln a p q hp hq h)

theorem Gp_creK_pos (n k : Nat) (hk : k < n) (c : Nat) (X : List (Term R)) (hX : LenP n X) :
    Gp K (creK K k (c + 1) X) = K.zero := by
  have hY : Eqv K n (dPk K k (c + 1) (one K n)) [] := by
    have := dPk_creK_low K n k hk (one K n) (lenP_one K n) (dP_one K n k) 0 c
    rw [show 0 + 1 + c = c + 1 by lib_nat] at this; exact this
  rw [← Gp_mulP_one K n _ (lenP_creK K n k _ X hX), gp_comm, rodrigues K n k hk (c + 1) X _ hX (lenP_one K n), Gp_mulP,
    Bf_comm, hY X hX]
  rfl

theorem split_le (a : Nat) : ∀ b, a ≤ b → ∃ c, b = c + a
  | b, h => by
    cases Nat.lt_or_ge a b with
    | inl hl => obtain ⟨j, hj⟩ := split_lt a b hl; exact ⟨1 + j, by rw [hj]; lib_nat⟩
    | inr hg => exact ⟨0, by rw [Nat.zero_add]; exact Nat.le_antisymm hg h⟩

/-- one coordinate of the multi-index computation -/
theorem step_le (n k : Nat) (a c : Nat) (α β : List Nat) (hl : k + (β.length + 1) ≤ n) (hab : α.length = β.length) :
    Gp K (Dm K k (a :: α) (Hm K n k ((c + a) :: β)))
      = K.mul (cN K (ff c a)) (Gp K (creK K k c (Dm K (k + 1) α (Hm K n (k + 1) β)))) := by
  have hkn : k < n := Nat.lt_of_lt_of_le (Nat.lt_succ_of_le (Nat.le_add_right k β.length)) hl
  have hl' : k + 1 + α.length ≤ n := by
    rw [hab]; have : k + 1 + β.length = k + (β.length + 1) := by lib_nat
    rw [this]; exact hl
  have hl'' : k + 1 + β.length ≤ n := by rw [← hab]; exact hl'
  let H := Hm K n (k + 1) β
  have hH : LenP n H := lenP_Hm K n (k + 1) β
  have h0 := dP_Hm_low K n k (k + 1) β (Nat.lt_succ_self k) hl''
  show Gp K (Dm K (k + 1) α (dPk K k a (creK K k (c + a) H))) = _
  have e := dPk_creK_F K n k hkn H hH h0 a c
  have e2 := eqv_Dm K n (k + 1) α _ _ hl' (lenP_dPk K n k a _ (lenP_creK K n k _ H hH))
    (lenP_scale K n _ _ (lenP_creK K n k c H hH)) e
  rw [Gp_eqv K n _ _ (lenP_Dm K n _ α _ (lenP_dPk K n k a _ (lenP_creK K n k _ H hH)))
    (lenP_Dm K n _ α _ (lenP_scale K n _ _ (lenP_creK K n k c H hH))) e2, Dm_scale, Gp_scale,
    Dm_creK K k c H (k + 1) α (Nat.lt_succ_self k)]

theorem step_gt (n k : Nat) (b j : Nat) (α β : List Nat) (hl : k + (β.length + 1) ≤ n) (hab : α.length = β.length) :
    Gp K (Dm K k ((b + 1 + j) :: α) (Hm K n k (b :: β))) = K.zero := by
  have hkn : k < n := Nat.lt_of_lt_of_le (Nat.lt_succ_of_le (Nat.le_add_right k β.length)) hl
  have hl' : k + 1 + α.length ≤ n := by
    rw [hab]; have : k + 1 + β.length = k + (β.length + 1) := by lib_nat
    rw [this]; exact hl
  have hl'' : k + 1 + β.length ≤ n := by rw [← hab]; exact hl'
  let H := Hm K n (k + 1) β
  have hH : LenP n H := lenP_Hm K n (k + 1) β
  have h0 := dP_Hm_low K n k (k + 1) β (Nat.lt_succ_self k) hl''
  show Gp K (Dm K (k + 1) α (dPk K k (b + 1 + j) (creK K k b H))) = _
  have e := eqv_Dm K n (k + 1) α _ [] hl' (lenP_dPk K n k _ _ (lenP_creK K n k b H hH)) trivial
    (dPk_creK_low K n k hkn H hH h0 b j)
  rw [Dm_nil] at e
  rw [Gp_eqv K n _ [] (lenP_Dm K n _ α _ (lenP_dPk K n k _ _ (lenP_creK K n k b H hH))) trivial e]; rfl

/-- **Multi-index orthogonality, diagonal:** G(∂^α He_α) = α!. -/
theorem diag_m (n : Nat) : ∀ (k : Nat) (α : List Nat), k + α.length ≤ n → Gp K (Dm K k α (Hm K n k α)) = cN K (factL α)
  | _, [], _ => by
    show K.add (K.mul K.one (cN K (GM (zerosL n)))) K.zero = cN K 1
    rw [GM_zeros, K.one_mul, DetChain.add_zero']
  | k, a :: α, hl => by
    have hl' : k + 1 + α.length ≤ n := by
      have : k + 1 + α.length = k + (α.length + 1) := by lib_nat
      rw [this]; exact hl
    have s := step_le K n k a 0 α α hl rfl
    rw [Nat.zero_add] at s
    rw [s]
    show K.mul _ (Gp K (Dm K (k + 1) α (Hm K n (k + 1) α))) = cN K (SU2CharExp.fact a * factL α)
    rw [diag_m n (k + 1) α hl', SU2CharExp.cN_mul]
    have f := ff_fact a 0
    rw [Nat.zero_add] at f
    rw [← f]; exact congrArg (fun z => K.mul (cN K z) _) (Nat.mul_one _).symm

/-- **Multi-index orthogonality, off-diagonal:** G(∂^α He_β) = 0 for α ≠ β of the same length. -/
theorem off_m (n : Nat) : ∀ (k : Nat) (α β : List Nat), α.length = β.length → k + β.length ≤ n → α ≠ β →
    Gp K (Dm K k α (Hm K n k β)) = K.zero
  | _, [], [], _, _, h => absurd rfl h
  | _, [], _ :: _, hl, _, _ => Nat.noConfusion hl
  | _, _ :: _, [], hl, _, _ => Nat.noConfusion hl
  | k, a :: α, b :: β, hl, hn, h => by
    have hab : α.length = β.length := Nat.succ.inj hl
    have hn' : k + 1 + β.length ≤ n := by
      have : k + 1 + β.length = k + (β.length + 1) := by lib_nat
      rw [this]; exact hn
    cases Nat.lt_or_ge b a with
    | inl hgt =>
      obtain ⟨j, hj⟩ := split_lt b a hgt
      rw [hj]; exact step_gt K n k b j α β hn hab
    | inr hle =>
      obtain ⟨c, hc⟩ := split_le a b hle
      rw [hc, step_le K n k a c α β hn hab]
      cases c with
      | succ c' =>
        rw [Gp_creK_pos K n k (Nat.lt_of_lt_of_le (Nat.lt_succ_of_le (Nat.le_add_right k β.length)) hn) c' _
          (lenP_Dm K n _ α _ (lenP_Hm K n (k + 1) β)), DetChain.mul_zero]
      | zero =>
        have hαβ : α ≠ β := fun e => h (by rw [hc, Nat.zero_add, e])
        show K.mul _ (Gp K (Dm K (k + 1) α (Hm K n (k + 1) β))) = K.zero
        rw [off_m n (k + 1) α β hab hn' hαβ, DetChain.mul_zero]

/-- **G(He_α He_β) = α! δ_αβ** on ℝⁿ (α, β of length n). -/
theorem herm_m (n : Nat) (α β : List Nat) (ha : α.length = n) (hb : β.length = n) :
    Gp K (mulP K (Hm K n 0 α) (Hm K n 0 β)) = (if α = β then cN K (factL α) else K.zero) := by
  rw [rodrigues_m K n 0 α _ (by rw [Nat.zero_add, ha]; exact Nat.le_refl n) (lenP_Hm K n 0 β)]
  by_cases h : α = β
  · rw [if_pos h, ← h]; exact diag_m K n 0 α (by rw [Nat.zero_add, ha]; exact Nat.le_refl n)
  · rw [if_neg h]; exact off_m K n 0 α β (ha.trans hb.symm) (by rw [Nat.zero_add, hb]; exact Nat.le_refl n) h

/-! ### x_i He_α ≡ He_{α+e_i} + α_i He_{α−e_i} -/

theorem inc_inc_comm : ∀ (i k : Nat) (α : List Nat), incAt i (incAt k α) = incAt k (incAt i α)
  | 0, 0, _ => rfl
  | 0, _ + 1, [] => rfl
  | _ + 1, 0, [] => rfl
  | _ + 1, _ + 1, [] => rfl
  | 0, _ + 1, _ :: _ => rfl
  | _ + 1, 0, _ :: _ => rfl
  | i + 1, k + 1, a :: α => by
    show a :: incAt i (incAt k α) = a :: incAt k (incAt i α); rw [inc_inc_comm i k α]

theorem xi_xi_comm (i k : Nat) : ∀ f : List (Term R), xi i (xi k f) = xi k (xi i f)
  | [] => rfl
  | t :: f => by
    show (t.1, incAt i (incAt k t.2)) :: xi i (xi k f) = (t.1, incAt k (incAt i t.2)) :: xi k (xi i f)
    rw [inc_inc_comm i k t.2, xi_xi_comm i k f]

theorem xi_cre_cross (i k : Nat) (h : k ≠ i) (f : List (Term R)) : xi i (cre K k f) = cre K k (xi i f) := by
  show xi i (xi k f ++ scaleT K (K.neg K.one) (dP K k f)) = xi k (xi i f) ++ scaleT K (K.neg K.one) (dP K k (xi i f))
  rw [xi_app, xi_xi_comm i k, xi_scale, dP_xi_cross K i k (fun e => h e.symm)]

theorem xi_creK_cross (i k : Nat) (h : k ≠ i) : ∀ a (f : List (Term R)), xi i (creK K k a f) = creK K k a (xi i f)
  | 0, _ => rfl
  | a + 1, f => by
    show xi i (cre K k (creK K k a f)) = cre K k (creK K k a (xi i f))
    rw [xi_cre_cross K i k h, xi_creK_cross i k h a f]

theorem eqv_cre_app (n k : Nat) (p q : List (Term R)) : Eqv K n (cre K k (p ++ q)) (cre K k p ++ cre K k q) := fun r _ => by
  show Bf K (xi k (p ++ q) ++ scaleT K (K.neg K.one) (dP K k (p ++ q))) r
    = Bf K ((xi k p ++ scaleT K (K.neg K.one) (dP K k p)) ++ (xi k q ++ scaleT K (K.neg K.one) (dP K k q))) r
  rw [xi_app, dP_app]
  simp only [Bf_app_l, scale_app]
  generalize Bf K (xi k p) r = a; generalize Bf K (xi k q) r = b
  generalize Bf K (scaleT K (K.neg K.one) (dP K k p)) r = c; generalize Bf K (scaleT K (K.neg K.one) (dP K k q)) r = d
  lib_ring

theorem eqv_creK_app (n k : Nat) (hk : k < n) : ∀ a (p q : List (Term R)), LenP n p → LenP n q →
    Eqv K n (creK K k a (p ++ q)) (creK K k a p ++ creK K k a q)
  | 0, _, _, _, _ => eqv_refl K n _
  | a + 1, p, q, hp, hq =>
    eqv_trans K n _ _ _ (eqv_cre K n k hk _ _ (lenP_creK K n k a _ (lenP_app n p q hp hq))
      (lenP_app n _ _ (lenP_creK K n k a p hp) (lenP_creK K n k a q hq)) (eqv_creK_app n k hk a p q hp hq))
      (eqv_cre_app K n k _ _)

theorem eqv_creK_scale (n k : Nat) (hk : k < n) (c : R) : ∀ a (p : List (Term R)), LenP n p →
    Eqv K n (creK K k a (scaleT K c p)) (scaleT K c (creK K k a p))
  | 0, _, _ => eqv_refl K n _
  | a + 1, p, hp =>
    eqv_trans K n _ _ _ (eqv_cre K n k hk _ _ (lenP_creK K n k a _ (lenP_scale K n c p hp))
      (lenP_scale K n c _ (lenP_creK K n k a p hp)) (eqv_creK_scale n k hk c a p hp)) (cre_scale K n k c _)

theorem xi_eq_cre (n i : Nat) (f : List (Term R)) : Eqv K n (xi i f) (cre K i f ++ dP K i f) := fun r _ => by
  show Bf K (xi i f) r = Bf K ((xi i f ++ scaleT K (K.neg K.one) (dP K i f)) ++ dP K i f) r
  rw [Bf_app_l, Bf_app_l, Bf_scale]
  generalize Bf K (xi i f) r = a; generalize Bf K (dP K i f) r = b
  lib_ring

/-- **x_{k+j} He_γ ≡ He_{γ+e_j} + γ_j He_{γ−e_j}.** -/
theorem xi_Hm (n : Nat) : ∀ (k : Nat) (γ : List Nat) (j : Nat), j < γ.length → k + γ.length ≤ n →
    Eqv K n (xi (k + j) (Hm K n k γ)) (Hm K n k (incAt j γ) ++ scaleT K (cN K (nthE j γ)) (Hm K n k (decAt j γ)))
  | _, [], _, h, _ => absurd h (Nat.not_lt_zero _)
  | k, a :: γ, 0, _, hl => by
    have hkn : k < n := Nat.lt_of_lt_of_le (Nat.lt_succ_of_le (Nat.le_add_right k γ.length)) hl
    have hl' : k + 1 + γ.length ≤ n := by
      have : k + 1 + γ.length = k + (γ.length + 1) := by lib_nat
      rw [this]; exact hl
    let H := Hm K n (k + 1) γ
    have hH : LenP n H := lenP_Hm K n (k + 1) γ
    have h0 := dP_Hm_low K n k (k + 1) γ (Nat.lt_succ_self k) hl'
    show Eqv K n (xi k (creK K k a H)) (creK K k (a + 1) H ++ scaleT K (cN K a) (creK K k (a - 1) H))
    refine eqv_trans K n _ _ _ (xi_eq_cre K n k _) (eqv_app K n _ _ _ _ (eqv_refl K n _) ?_)
    cases a with
    | zero =>
      refine eqv_trans K n _ _ _ h0 (eqv_symm K n _ _ ?_)
      exact eqv_scale_zero K n _
    | succ m => exact dP_creK_F K n k hkn H hH h0 m
  | k, a :: γ, j + 1, hj, hl => by
    have hkn : k < n := Nat.lt_of_lt_of_le (Nat.lt_succ_of_le (Nat.le_add_right k γ.length)) hl
    have hl' : k + 1 + γ.length ≤ n := by
      have : k + 1 + γ.length = k + (γ.length + 1) := by lib_nat
      rw [this]; exact hl
    have ih := xi_Hm n (k + 1) γ j (Nat.lt_of_succ_lt_succ hj) hl'
    have e : k + (j + 1) = k + 1 + j := by lib_nat
    rw [e]
    have hne : k ≠ k + 1 + j := Nat.ne_of_lt (Nat.lt_of_lt_of_le (Nat.lt_succ_self k) (Nat.le_add_right (k + 1) j))
    show Eqv K n (xi (k + 1 + j) (creK K k a (Hm K n (k + 1) γ)))
      (creK K k a (Hm K n (k + 1) (incAt j γ)) ++ scaleT K (cN K (nthE j γ)) (creK K k a (Hm K n (k + 1) (decAt j γ))))
    rw [xi_creK_cross K _ k hne]
    have l1 := lenP_Hm K n (k + 1) (incAt j γ)
    have l2 := lenP_Hm K n (k + 1) (decAt j γ)
    refine eqv_trans K n _ _ _ (eqv_creK K n k hkn a _ _ (lenP_xi n _ _ (lenP_Hm K n (k + 1) γ))
      (lenP_app n _ _ l1 (lenP_scale K n _ _ l2)) ih) ?_
    refine eqv_trans K n _ _ _ (eqv_creK_app K n k hkn a _ _ l1 (lenP_scale K n _ _ l2)) ?_
    exact eqv_app K n _ _ _ _ (eqv_refl K n _) (eqv_creK_scale K n k hkn _ a _ l2)

end GaussHermite

#print axioms GaussHermite.adj
#print axioms GaussHermite.rodrigues
#print axioms GaussHermite.herm_dk
#print axioms GaussHermite.comm_cre
#print axioms GaussHermite.dP_He
#print axioms GaussHermite.herm_sq
#print axioms GaussHermite.herm_orth
#print axioms GaussHermite.rodrigues_m
#print axioms GaussHermite.dPk_creK_low
#print axioms GaussHermite.Dm_creK
#print axioms GaussHermite.dP_Hm_low
#print axioms GaussHermite.herm_m
#print axioms GaussHermite.xi_Hm

ym/GaussPoly.lean

lean_all/ym/GaussPoly.lean

/-
  ym/GaussPoly — T45, H0 step 2: the Gaussian functional on polynomials and its uniqueness.

  A polynomial in n variables over a commutative ring is a list of terms (c, α) (coefficient, exponent list of length n).
    Gp p = Σ c · G(x^α)                     linear functional (Gp_app)
    xi i p, dP i p                          multiplication by x_i, partial derivative ∂_i (termwise)
    Gp_ibp                                  Gp(x_i p) = Gp(∂_i p)
    unique_mono                             any Λ, additive on term lists, homogeneous on single terms, with Λ(1) = 1 and
                                            Λ(x_i p) = Λ(∂_i p), equals G on every monomial (induction on the degree)
  Lean 4 core only, proofs by hand, no axioms.
-/
import ym.Gauss

namespace GaussPoly

open SU2Char Gauss

variable {R : Type} (K : DetChain.CRing R)

abbrev Term (R : Type) := R × List Nat

def Gp : List (Term R) → R
  | [] => K.zero
  | t :: p => K.add (K.mul t.1 (cN K (GM t.2))) (Gp p)

theorem Gp_app : ∀ p q : List (Term R), Gp K (p ++ q) = K.add (Gp K p) (Gp K q)
  | [], q => (K.zero_add _).symm
  | t :: p, q => by
    show K.add _ (Gp K (p ++ q)) = K.add (K.add _ (Gp K p)) (Gp K q)
    rw [Gp_app p q]; lib_ring

def xi (i : Nat) (p : List (Term R)) : List (Term R) := p.map (fun t => (t.1, incAt i t.2))

def dP (i : Nat) (p : List (Term R)) : List (Term R) := p.map (fun t => (K.mul t.1 (cN K (nthE i t.2)), decAt i t.2))

/-- every term has at least i+1 variables -/
def Wide (i : Nat) : List (Term R) → Prop
  | [] => True
  | t :: p => i < t.2.length ∧ Wide i p

/-- **Integration by parts.** -/
theorem Gp_ibp (i : Nat) : ∀ p : List (Term R), Wide i p → Gp K (xi i p) = Gp K (dP K i p)
  | [], _ => rfl
  | t :: p, h => by
    show K.add (K.mul t.1 (cN K (GM (incAt i t.2)))) (Gp K (xi i p))
      = K.add (K.mul (K.mul t.1 (cN K (nthE i t.2))) (cN K (GM (decAt i t.2)))) (Gp K (dP K i p))
    rw [Gp_ibp i p h.2, G_ibp i t.2 h.1, SU2CharExp.cN_mul, K.mul_assoc]

def sumL : List Nat → Nat
  | [] => 0
  | a :: α => a + sumL α

theorem len_decAt : ∀ (i : Nat) (α : List Nat), (decAt i α).length = α.length
  | 0, [] => rfl
  | _ + 1, [] => rfl
  | 0, _ :: _ => rfl
  | i + 1, _ :: α => congrArg Nat.succ (len_decAt i α)

theorem incAt_decAt : ∀ (i : Nat) (α : List Nat), 1 ≤ nthE i α → incAt i (decAt i α) = α
  | 0, [], h => absurd h (Nat.not_succ_le_zero 0)
  | _ + 1, [], h => absurd h (Nat.not_succ_le_zero 0)
  | 0, a :: α, h => by
    cases a with
    | zero => exact absurd h (Nat.not_succ_le_zero 0)
    | succ a => rfl
  | i + 1, a :: α, h => by
    show a :: incAt i (decAt i α) = a :: α
    rw [incAt_decAt i α h]

theorem sum_decAt : ∀ (i : Nat) (α : List Nat), 1 ≤ nthE i α → sumL (decAt i α) + 1 = sumL α
  | 0, [], h => absurd h (Nat.not_succ_le_zero 0)
  | _ + 1, [], h => absurd h (Nat.not_succ_le_zero 0)
  | 0, a :: α, h => by
    cases a with
    | zero => exact absurd h (Nat.not_succ_le_zero 0)
    | succ a => show a + sumL α + 1 = a + 1 + sumL α; lib_nat
  | i + 1, a :: α, h => by
    show a + sumL (decAt i α) + 1 = a + sumL α
    rw [Nat.add_assoc, sum_decAt i α h]

theorem exists_pos : ∀ α : List Nat, 1 ≤ sumL α → ∃ i, i < α.length ∧ 1 ≤ nthE i α
  | [], h => absurd h (Nat.not_succ_le_zero 0)
  | a :: α, h => by
    cases a with
    | succ a => exact ⟨0, Nat.succ_pos _, Nat.succ_le_succ (Nat.zero_le a)⟩
    | zero =>
      have h' : 1 ≤ sumL α := by
        have : sumL (0 :: α) = sumL α := Nat.zero_add _
        rw [this] at h; exact h
      obtain ⟨i, hi, hp⟩ := exists_pos α h'
      exact ⟨i + 1, Nat.succ_lt_succ hi, hp⟩

def zerosL : Nat → List Nat
  | 0 => []
  | n + 1 => 0 :: zerosL n

theorem zero_sum : ∀ α : List Nat, sumL α = 0 → α = zerosL α.length
  | [], _ => rfl
  | a :: α, h => by
    cases a with
    | succ a => exact absurd h (by show a + 1 + sumL α ≠ 0; intro e; exact Nat.noConfusion (show (a + sumL α) + 1 = 0 by rw [← e]; lib_nat))
    | zero =>
      have h' : sumL α = 0 := by have : sumL (0 :: α) = sumL α := Nat.zero_add _; rw [← this]; exact h
      show 0 :: α = 0 :: zerosL α.length
      rw [← zero_sum α h']

theorem GM_zeros : ∀ n, GM (zerosL n) = 1
  | 0 => rfl
  | n + 1 => by show gm 0 * GM (zerosL n) = 1; rw [GM_zeros n]; rfl

/-- **Uniqueness of the Gaussian functional on monomials.** -/
theorem unique_mono (Λ : List (Term R) → R) (n : Nat)
    (hlin : ∀ (c : R) (α : List Nat), Λ [(c, α)] = K.mul c (Λ [(K.one, α)]))
    (hone : Λ [(K.one, zerosL n)] = K.one)
    (hibp : ∀ (i : Nat) (β : List Nat), i < n → β.length = n → Λ (xi i [(K.one, β)]) = Λ (dP K i [(K.one, β)])) :
    ∀ d (α : List Nat), α.length = n → sumL α ≤ d → Λ [(K.one, α)] = cN K (GM α) := by
  intro d
  induction d with
  | zero =>
    intro α hl hs
    have h0 : sumL α = 0 := Nat.le_antisymm hs (Nat.zero_le _)
    rw [zero_sum α h0, hl, hone, GM_zeros]; exact (SU2CharExp.cN_one K).symm
  | succ d ih =>
    intro α hl hs
    cases Nat.lt_or_ge (sumL α) 1 with
    | inl h0 =>
      have h0' : sumL α = 0 := Nat.le_antisymm (Nat.le_of_lt_succ h0) (Nat.zero_le _)
      exact ih α hl (by rw [h0']; exact Nat.zero_le _)
    | inr hpos =>
      obtain ⟨i, hi, hp⟩ := exists_pos α hpos
      let β := decAt i α
      have eα : incAt i β = α := incAt_decAt i α hp
      have hβl : β.length = n := (len_decAt i α).trans hl
      have hsb : sumL β + 1 = sumL α := sum_decAt i α hp
      have step : Λ [(K.one, α)] = Λ [(K.mul K.one (cN K (nthE i β)), decAt i β)] := by
        have := hibp i β (by rw [← hl]; exact hi) hβl
        rw [← eα]; exact this
      rw [step, hlin, K.one_mul]
      have gib := G_ibp i β (by rw [hβl, ← hl]; exact hi)
      rw [eα] at gib
      rw [gib, SU2CharExp.cN_mul]
      cases Nat.lt_or_ge (nthE i β) 1 with
      | inl hz =>
        have z : nthE i β = 0 := Nat.le_antisymm (Nat.le_of_lt_succ hz) (Nat.zero_le _)
        rw [z, show cN K 0 = K.zero from rfl, K.mul_comm K.zero, DetChain.mul_zero, K.mul_comm K.zero, DetChain.mul_zero]
      | inr hb =>
        have hsc : sumL (decAt i β) + 1 = sumL β := sum_decAt i β hb
        rw [ih (decAt i β) ((len_decAt i β).trans hβl) (by
          have : sumL (decAt i β) + 1 + 1 = sumL α := by rw [hsc, hsb]
          have h2 : sumL (decAt i β) + 2 ≤ d + 1 := by rw [show sumL (decAt i β) + 2 = sumL (decAt i β) + 1 + 1 from rfl, this]; exact hs
          exact Nat.le_of_succ_le_succ (Nat.le_trans (Nat.succ_le_succ (Nat.le_succ _)) h2))]

/-! ### products and the Leibniz rule -/

def addE : List Nat → List Nat → List Nat
  | [], β => β
  | a :: α, [] => a :: α
  | a :: α, b :: β => (a + b) :: addE α β

theorem nth_addE : ∀ (j : Nat) (α β : List Nat), nthE j (addE α β) = nthE j α + nthE j β
  | 0, [], [] => rfl
  | _ + 1, [], [] => rfl
  | 0, [], _ :: _ => (Nat.zero_add _).symm
  | _ + 1, [], _ :: _ => (Nat.zero_add _).symm
  | 0, _ :: _, [] => rfl
  | _ + 1, _ :: _, [] => rfl
  | 0, _ :: _, _ :: _ => rfl
  | j + 1, _ :: α, _ :: β => nth_addE j α β

theorem dec_addE_l : ∀ (j : Nat) (α β : List Nat), 1 ≤ nthE j α → decAt j (addE α β) = addE (decAt j α) β
  | 0, [], _, h => absurd h (Nat.not_succ_le_zero 0)
  | _ + 1, [], _, h => absurd h (Nat.not_succ_le_zero 0)
  | 0, a :: α, [], h => rfl
  | j + 1, a :: α, [], h => rfl
  | 0, a :: α, b :: β, h => by
    cases a with
    | zero => exact absurd h (Nat.not_succ_le_zero 0)
    | succ a => show (a + 1 + b - 1) :: _ = (a + b) :: _; rw [show a + 1 + b = a + b + 1 by lib_nat]; rfl
  | j + 1, a :: α, b :: β, h => by
    show (a + b) :: decAt j (addE α β) = (a + b) :: addE (decAt j α) β
    rw [dec_addE_l j α β h]

theorem dec_addE_r : ∀ (j : Nat) (α β : List Nat), 1 ≤ nthE j β → decAt j (addE α β) = addE α (decAt j β)
  | 0, _, [], h => absurd h (Nat.not_succ_le_zero 0)
  | _ + 1, _, [], h => absurd h (Nat.not_succ_le_zero 0)
  | 0, [], b :: β, h => rfl
  | j + 1, [], b :: β, h => rfl
  | 0, a :: α, b :: β, h => by
    cases b with
    | zero => exact absurd h (Nat.not_succ_le_zero 0)
    | succ b => show (a + (b + 1) - 1) :: _ = (a + b) :: _; rw [show a + (b + 1) = a + b + 1 by lib_nat]; rfl
  | j + 1, a :: α, b :: β, h => by
    show (a + b) :: decAt j (addE α β) = (a + b) :: addE α (decAt j β)
    rw [dec_addE_r j α β h]

def mulT (t s : Term R) : Term R := (K.mul t.1 s.1, addE t.2 s.2)

def mulP : List (Term R) → List (Term R) → List (Term R)
  | [], _ => []
  | t :: A, B => B.map (mulT K t) ++ mulP A B

theorem Gp_map_mulT (t : Term R) (f : Term R → Term R) : ∀ B : List (Term R),
    Gp K (B.map f) = Gp K (B.map f) := fun _ => rfl

theorem Gp_mulP_cons (t : Term R) (A B : List (Term R)) : Gp K (mulP K (t :: A) B) = K.add (Gp K (B.map (mulT K t))) (Gp K (mulP K A B)) :=
  Gp_app K _ _

/-- Leibniz for a pair of terms, at the level of Gp -/
theorem leib_TT (j : Nat) (t s : Term R) :
    Gp K (dP K j [mulT K t s]) = K.add (Gp K [mulT K (K.mul t.1 (cN K (nthE j t.2)), decAt j t.2) s])
      (Gp K [mulT K t (K.mul s.1 (cN K (nthE j s.2)), decAt j s.2)]) := by
  obtain ⟨c, α⟩ := t
  obtain ⟨d, β⟩ := s
  show K.add (K.mul (K.mul (K.mul c d) (cN K (nthE j (addE α β)))) (cN K (GM (decAt j (addE α β))))) K.zero
    = K.add (K.add (K.mul (K.mul (K.mul c (cN K (nthE j α))) d) (cN K (GM (addE (decAt j α) β)))) K.zero)
        (K.add (K.mul (K.mul c (K.mul d (cN K (nthE j β)))) (cN K (GM (addE α (decAt j β))))) K.zero)
  rw [nth_addE, cN_add]
  cases Nat.lt_or_ge (nthE j α) 1 with
  | inl ha =>
    have za : nthE j α = 0 := Nat.le_antisymm (Nat.le_of_lt_succ ha) (Nat.zero_le _)
    rw [za]
    cases Nat.lt_or_ge (nthE j β) 1 with
    | inl hb =>
      have zb : nthE j β = 0 := Nat.le_antisymm (Nat.le_of_lt_succ hb) (Nat.zero_le _)
      rw [zb]; show K.add (K.mul (K.mul (K.mul c d) (K.add K.zero K.zero)) _) K.zero
        = K.add (K.add (K.mul (K.mul (K.mul c K.zero) d) _) K.zero) (K.add (K.mul (K.mul c (K.mul d K.zero)) _) K.zero)
      lib_ring
    | inr hb =>
      rw [← dec_addE_r j α β hb]
      show K.add (K.mul (K.mul (K.mul c d) (K.add K.zero (cN K (nthE j β)))) _) K.zero
        = K.add (K.add (K.mul (K.mul (K.mul c K.zero) d) _) K.zero) (K.add (K.mul (K.mul c (K.mul d (cN K (nthE j β)))) _) K.zero)
      lib_ring
  | inr ha =>
    cases Nat.lt_or_ge (nthE j β) 1 with
    | inl hb =>
      have zb : nthE j β = 0 := Nat.le_antisymm (Nat.le_of_lt_succ hb) (Nat.zero_le _)
      rw [zb, ← dec_addE_l j α β ha]
      show K.add (K.mul (K.mul (K.mul c d) (K.add (cN K (nthE j α)) K.zero)) _) K.zero
        = K.add (K.add (K.mul (K.mul (K.mul c (cN K (nthE j α))) d) _) K.zero) (K.add (K.mul (K.mul c (K.mul d K.zero)) _) K.zero)
      lib_ring
    | inr hb =>
      rw [← dec_addE_l j α β ha, ← dec_addE_r j α β hb]
      lib_ring

theorem Gp_cons' (x : Term R) (L : List (Term R)) : Gp K (x :: L) = K.add (Gp K [x]) (Gp K L) := by
  show K.add _ (Gp K L) = K.add (K.add _ K.zero) (Gp K L); rw [DetChain.add_zero']

theorem dP_app (j : Nat) (L1 L2 : List (Term R)) : dP K j (L1 ++ L2) = dP K j L1 ++ dP K j L2 := by
  induction L1 with
  | nil => rfl
  | cons x L1 ih => show _ :: dP K j (L1 ++ L2) = _ :: (dP K j L1 ++ dP K j L2); rw [ih]

def tder (j : Nat) (t : Term R) : Term R := (K.mul t.1 (cN K (nthE j t.2)), decAt j t.2)

theorem leib_TL (j : Nat) (t : Term R) : ∀ B : List (Term R),
    Gp K (dP K j (B.map (mulT K t))) = K.add (Gp K (B.map (mulT K (tder K j t)))) (Gp K ((dP K j B).map (mulT K t)))
  | [] => by show K.zero = K.add K.zero K.zero; rw [K.zero_add]
  | s :: B => by
    have ih := leib_TL j t B
    show Gp K (dP K j [mulT K t s] ++ dP K j (B.map (mulT K t))) = K.add (Gp K (mulT K (tder K j t) s :: B.map _))
      (Gp K (mulT K t (tder K j s) :: (dP K j B).map (mulT K t)))
    rw [Gp_app, ih, leib_TT, Gp_cons' K (mulT K (tder K j t) s), Gp_cons' K (mulT K t (tder K j s))]
    show K.add (K.add (Gp K [mulT K (tder K j t) s]) (Gp K [mulT K t (tder K j s)])) _ = _
    lib_ring

/-- **Leibniz rule (at the level of Gp).** -/
theorem leib (j : Nat) (B : List (Term R)) : ∀ A : List (Term R),
    Gp K (dP K j (mulP K A B)) = K.add (Gp K (mulP K (dP K j A) B)) (Gp K (mulP K A (dP K j B)))
  | [] => by show K.zero = K.add K.zero K.zero; rw [K.zero_add]
  | t :: A => by
    show Gp K (dP K j (B.map (mulT K t) ++ mulP K A B)) = K.add (Gp K (B.map (mulT K (tder K j t)) ++ mulP K (dP K j A) B))
      (Gp K ((dP K j B).map (mulT K t) ++ mulP K A (dP K j B)))
    rw [dP_app, Gp_app, Gp_app, Gp_app, leib_TL, leib j B A]
    lib_ring

/-! ### the bilinear form Gp(A·B) and its symmetry -/

theorem addE_comm : ∀ α β : List Nat, addE α β = addE β α
  | [], [] => rfl
  | [], _ :: _ => rfl
  | _ :: _, [] => rfl
  | a :: α, b :: β => by show (a + b) :: addE α β = (b + a) :: addE β α; rw [Nat.add_comm, addE_comm α β]

/-- Σ_{s ∈ B} c_t c_s G(x^{α_t + α_s}) -/
def row (t : Term R) : List (Term R) → R
  | [] => K.zero
  | s :: B => K.add (K.mul (K.mul t.1 s.1) (cN K (GM (addE t.2 s.2)))) (row t B)

def Bf : List (Term R) → List (Term R) → R
  | [], _ => K.zero
  | t :: A, B => K.add (row K t B) (Bf A B)

theorem Gp_row (t : Term R) : ∀ B : List (Term R), Gp K (B.map (mulT K t)) = row K t B
  | [] => rfl
  | s :: B => by show K.add _ (Gp K (B.map (mulT K t))) = K.add _ (row K t B); rw [Gp_row t B]; rfl

theorem Gp_mulP (B : List (Term R)) : ∀ A : List (Term R), Gp K (mulP K A B) = Bf K A B
  | [] => rfl
  | t :: A => by
    show Gp K (B.map (mulT K t) ++ mulP K A B) = K.add (row K t B) (Bf K A B)
    rw [Gp_app, Gp_row, Gp_mulP B A]

/-- column sums: Σ_{t ∈ A} c_t c_s G(x^{α_t+α_s}) -/
def col (s : Term R) : List (Term R) → R
  | [] => K.zero
  | t :: A => K.add (K.mul (K.mul t.1 s.1) (cN K (GM (addE t.2 s.2)))) (col s A)

theorem Bf_cons_r (s : Term R) (B : List (Term R)) : ∀ A : List (Term R), Bf K A (s :: B) = K.add (col K s A) (Bf K A B)
  | [] => (K.zero_add _).symm
  | t :: A => by
    show K.add (K.add _ (row K t B)) (Bf K A (s :: B)) = K.add (K.add _ (col K s A)) (K.add (row K t B) (Bf K A B))
    rw [Bf_cons_r s B A]; lib_ring

theorem row_col (s : Term R) : ∀ A : List (Term R), col K s A = row K s A
  | [] => rfl
  | t :: A => by
    show K.add (K.mul (K.mul t.1 s.1) (cN K (GM (addE t.2 s.2)))) (col K s A)
      = K.add (K.mul (K.mul s.1 t.1) (cN K (GM (addE s.2 t.2)))) (row K s A)
    rw [row_col s A, addE_comm, K.mul_comm t.1]

/-- **Symmetry:** Gp(A·B) = Gp(B·A). -/
theorem Bf_comm : ∀ A B : List (Term R), Bf K A B = Bf K B A
  | A, [] => by
    induction A with
    | nil => rfl
    | cons t A ih => show K.add (row K t []) (Bf K A []) = K.zero; rw [ih]; show K.add K.zero K.zero = K.zero; rw [K.zero_add]
  | A, s :: B => by
    rw [Bf_cons_r, Bf_comm A B, row_col]; rfl

theorem addE_assoc : ∀ α β γ : List Nat, addE (addE α β) γ = addE α (addE β γ)
  | [], _, _ => rfl
  | a :: α, [], [] => rfl
  | a :: α, [], c :: γ => rfl
  | a :: α, b :: β, [] => rfl
  | a :: α, b :: β, c :: γ => by
    show (a + b + c) :: addE (addE α β) γ = (a + (b + c)) :: addE α (addE β γ)
    rw [Nat.add_assoc, addE_assoc α β γ]

theorem row_app (t : Term R) (L1 L2 : List (Term R)) : row K t (L1 ++ L2) = K.add (row K t L1) (row K t L2) := by
  induction L1 with
  | nil => exact (K.zero_add _).symm
  | cons s L1 ih => show K.add _ (row K t (L1 ++ L2)) = K.add (K.add _ (row K t L1)) _; rw [ih]; lib_ring

theorem Bf_app_l (A1 A2 B : List (Term R)) : Bf K (A1 ++ A2) B = K.add (Bf K A1 B) (Bf K A2 B) := by
  induction A1 with
  | nil => exact (K.zero_add _).symm
  | cons t A1 ih => show K.add _ (Bf K (A1 ++ A2) B) = K.add (K.add _ (Bf K A1 B)) _; rw [ih]; lib_ring

theorem row_map (t s : Term R) : ∀ C : List (Term R), row K t (C.map (mulT K s)) = row K (mulT K t s) C
  | [] => rfl
  | u :: C => by
    show K.add (K.mul (K.mul t.1 (K.mul s.1 u.1)) (cN K (GM (addE t.2 (addE s.2 u.2))))) (row K t (C.map (mulT K s)))
      = K.add (K.mul (K.mul (K.mul t.1 s.1) u.1) (cN K (GM (addE (addE t.2 s.2) u.2)))) (row K (mulT K t s) C)
    rw [row_map t s C, addE_assoc]
    congr 1; lib_ring

theorem row_mulP (t : Term R) (C : List (Term R)) : ∀ B : List (Term R),
    row K t (mulP K B C) = Bf K (B.map (mulT K t)) C
  | [] => rfl
  | s :: B => by
    show row K t (C.map (mulT K s) ++ mulP K B C) = K.add (row K (mulT K t s) C) (Bf K (B.map (mulT K t)) C)
    rw [row_app, row_map, row_mulP t C B]

/-- **Associativity:** Gp((A·B)·C) = Gp(A·(B·C)). -/
theorem Bf_assoc (B C : List (Term R)) : ∀ A : List (Term R), Bf K (mulP K A B) C = Bf K A (mulP K B C)
  | [] => rfl
  | t :: A => by
    show Bf K (B.map (mulT K t) ++ mulP K A B) C = K.add (row K t (mulP K B C)) (Bf K A (mulP K B C))
    rw [Bf_app_l, row_mulP, Bf_assoc B C A]

/-! ### test-equivalence and its congruence properties -/

/-- all exponent lists have length n -/
def LenP (n : Nat) : List (Term R) → Prop
  | [] => True
  | t :: p => t.2.length = n ∧ LenP n p

theorem lenP_app (n : Nat) : ∀ p q : List (Term R), LenP n p → LenP n q → LenP n (p ++ q)
  | [], _, _, hq => hq
  | _ :: p, q, hp, hq => ⟨hp.1, lenP_app n p q hp.2 hq⟩

theorem len_addE : ∀ α β : List Nat, α.length = β.length → (addE α β).length = α.length
  | [], [], _ => rfl
  | [], _ :: _, h => Nat.noConfusion h
  | _ :: _, [], h => Nat.noConfusion h
  | _ :: α, _ :: β, h => congrArg Nat.succ (len_addE α β (Nat.succ.inj h))

theorem lenP_map (n : Nat) (t : Term R) (ht : t.2.length = n) : ∀ B : List (Term R), LenP n B → LenP n (B.map (mulT K t))
  | [], _ => trivial
  | s :: B, h => ⟨by show (addE t.2 s.2).length = n; rw [len_addE _ _ (ht.trans h.1.symm), ht], lenP_map n t ht B h.2⟩

theorem lenP_mulP (n : Nat) (B : List (Term R)) (hB : LenP n B) : ∀ A : List (Term R), LenP n A → LenP n (mulP K A B)
  | [], _ => trivial
  | t :: A, h => lenP_app n _ _ (lenP_map K n t h.1 B hB) (lenP_mulP n B hB A h.2)

theorem len_incAt : ∀ (i : Nat) (α : List Nat), (incAt i α).length = α.length
  | 0, [] => rfl
  | _ + 1, [] => rfl
  | 0, _ :: _ => rfl
  | i + 1, _ :: α => congrArg Nat.succ (len_incAt i α)

theorem lenP_xi (n i : Nat) : ∀ p : List (Term R), LenP n p → LenP n (xi i p)
  | [], _ => trivial
  | t :: p, h => ⟨(len_incAt i t.2).trans h.1, lenP_xi n i p h.2⟩

theorem lenP_dP (n i : Nat) : ∀ p : List (Term R), LenP n p → LenP n (dP K i p)
  | [], _ => trivial
  | t :: p, h => ⟨(len_decAt i t.2).trans h.1, lenP_dP n i p h.2⟩

theorem wide_of_len (n i : Nat) (hi : i < n) : ∀ p : List (Term R), LenP n p → Wide i p
  | [], _ => trivial
  | t :: p, h => ⟨by rw [h.1]; exact hi, wide_of_len n i hi p h.2⟩

theorem inc_addE : ∀ (j : Nat) (α β : List Nat), j < β.length → α.length = β.length →
    incAt j (addE α β) = addE α (incAt j β)
  | _, _, [], h, _ => absurd h (Nat.not_lt_zero _)
  | _, [], _ :: _, _, h => Nat.noConfusion h
  | 0, a :: α, b :: β, _, _ => by show (a + b + 1) :: _ = (a + (b + 1)) :: _; rw [Nat.add_assoc]
  | j + 1, a :: α, b :: β, h, hl => by
    show (a + b) :: incAt j (addE α β) = (a + b) :: addE α (incAt j β)
    rw [inc_addE j α β (Nat.lt_of_succ_lt_succ h) (Nat.succ.inj hl)]

theorem xi_map (n j : Nat) (hj : j < n) (t : Term R) (ht : t.2.length = n) : ∀ B : List (Term R), LenP n B →
    xi j (B.map (mulT K t)) = (xi j B).map (mulT K t)
  | [], _ => rfl
  | s :: B, h => by
    show (K.mul t.1 s.1, incAt j (addE t.2 s.2)) :: xi j (B.map (mulT K t)) = (K.mul t.1 s.1, addE t.2 (incAt j s.2)) :: _
    rw [inc_addE j t.2 s.2 (by rw [h.1]; exact hj) (ht.trans h.1.symm), xi_map n j hj t ht B h.2]
    rfl

theorem xi_app (j : Nat) (L1 L2 : List (Term R)) : xi j (L1 ++ L2) = xi j L1 ++ xi j L2 := by
  induction L1 with
  | nil => rfl
  | cons x L1 ih => show _ :: xi j (L1 ++ L2) = _ :: (xi j L1 ++ xi j L2); rw [ih]

theorem xi_mulP (n j : Nat) (hj : j < n) (B : List (Term R)) (hB : LenP n B) : ∀ A : List (Term R), LenP n A →
    xi j (mulP K A B) = mulP K A (xi j B)
  | [], _ => rfl
  | t :: A, h => by
    show xi j (B.map (mulT K t) ++ mulP K A B) = (xi j B).map (mulT K t) ++ mulP K A (xi j B)
    rw [xi_app, xi_map K n j hj t h.1 B hB, xi_mulP n j hj B hB A h.2]

/-- **The derivative under the pairing:** Gp(∂_j p · r) = Gp(p · x_j r) − Gp(p · ∂_j r). -/
theorem dP_pair (n j : Nat) (hj : j < n) (p r : List (Term R)) (hp : LenP n p) (hr : LenP n r) :
    Bf K (dP K j p) r = K.add (Bf K p (xi j r)) (K.neg (Bf K p (dP K j r))) := by
  have l := leib K j r p
  have ibp := Gp_ibp K j (mulP K p r) (wide_of_len n j hj _ (lenP_mulP K n r hr p hp))
  rw [xi_mulP K n j hj r hr p hp, Gp_mulP] at ibp
  rw [← ibp, Gp_mulP, Gp_mulP] at l
  rw [← Gp_mulP, ← Gp_mulP K (dP K j r) p] at *
  rw [Gp_mulP, Gp_mulP] at l ⊢
  rw [l]; lib_ring

/-- test-equivalence among polynomials in n variables -/
def Eqv (n : Nat) (p q : List (Term R)) : Prop := ∀ r : List (Term R), LenP n r → Bf K p r = Bf K q r

theorem eqv_mul_r (n : Nat) (p q s : List (Term R)) (hs : LenP n s) (h : Eqv K n p q) :
    Eqv K n (mulP K p s) (mulP K q s) := fun r hr => by
  rw [Bf_assoc, Bf_assoc]; exact h _ (lenP_mulP K n r hr s hs)

theorem eqv_mul_l (n : Nat) (p q s : List (Term R)) (hs : LenP n s) (h : Eqv K n p q) :
    Eqv K n (mulP K s p) (mulP K s q) := fun r hr => by
  calc Bf K (mulP K s p) r = Bf K s (mulP K p r) := Bf_assoc K p r s
    _ = Bf K (mulP K p r) s := Bf_comm K _ _
    _ = Bf K p (mulP K r s) := Bf_assoc K r s p
    _ = Bf K q (mulP K r s) := h _ (lenP_mulP K n s hs r hr)
    _ = Bf K (mulP K q r) s := (Bf_assoc K r s q).symm
    _ = Bf K s (mulP K q r) := Bf_comm K _ _
    _ = Bf K (mulP K s q) r := (Bf_assoc K q r s).symm

theorem eqv_dP (n j : Nat) (hj : j < n) (p q : List (Term R)) (hp : LenP n p) (hq : LenP n q) (h : Eqv K n p q) :
    Eqv K n (dP K j p) (dP K j q) := fun r hr => by
  rw [dP_pair K n j hj p r hp hr, dP_pair K n j hj q r hq hr, h _ (lenP_xi n j r hr), h _ (lenP_dP K n j r hr)]

/-! ### Leibniz up to test-equivalence -/

theorem row_single_eq (c d e : R) (δ : List Nat) (h : e = K.add c d) : ∀ r : List (Term R),
    row K (e, δ) r = K.add (row K (c, δ) r) (row K (d, δ) r)
  | [] => (K.zero_add _).symm
  | u :: r => by
    show K.add (K.mul (K.mul e u.1) (cN K (GM (addE δ u.2)))) (row K (e, δ) r) = K.add (K.add (K.mul (K.mul c u.1) (cN K (GM (addE δ u.2)))) (row K (c, δ) r)) (K.add (K.mul (K.mul d u.1) (cN K (GM (addE δ u.2)))) (row K (d, δ) r))
    rw [row_single_eq c d e δ h r, h]; lib_ring

theorem row_zero_coef (δ : List Nat) : ∀ r : List (Term R), row K (K.zero, δ) r = K.zero
  | [] => rfl
  | u :: r => by
    show K.add (K.mul (K.mul K.zero u.1) _) (row K (K.zero, δ) r) = K.zero
    rw [row_zero_coef δ r, K.mul_comm K.zero, DetChain.mul_zero, K.mul_comm K.zero, DetChain.mul_zero, K.zero_add]

theorem row_coef (x y : R) (δ : List Nat) (h : x = y) (r : List (Term R)) : row K (x, δ) r = row K (y, δ) r := by rw [h]

/-- Leibniz for two terms, tested against any r -/
theorem leibT_row (j : Nat) (t s : Term R) (r : List (Term R)) :
    row K (K.mul (K.mul t.1 s.1) (cN K (nthE j (addE t.2 s.2))), decAt j (addE t.2 s.2)) r
      = K.add (row K (mulT K (tder K j t) s) r) (row K (mulT K t (tder K j s)) r) := by
  obtain ⟨c, α⟩ := t
  obtain ⟨d, β⟩ := s
  show row K (K.mul (K.mul c d) (cN K (nthE j (addE α β))), decAt j (addE α β)) r
    = K.add (row K (K.mul (K.mul c (cN K (nthE j α))) d, addE (decAt j α) β) r) (row K (K.mul c (K.mul d (cN K (nthE j β))), addE α (decAt j β)) r)
  rw [nth_addE, cN_add]
  have z0 : cN K 0 = K.zero := rfl
  generalize ea : nthE j α = A at *
  generalize eb : nthE j β = B at *
  cases Nat.lt_or_ge A 1 with
  | inl ha =>
    have za : A = 0 := Nat.le_antisymm (Nat.le_of_lt_succ ha) (Nat.zero_le _)
    subst za
    rw [z0, row_coef K (K.mul (K.mul c K.zero) d) K.zero _ (by lib_ring), row_zero_coef, K.zero_add]
    cases Nat.lt_or_ge B 1 with
    | inl hb =>
      have zb : B = 0 := Nat.le_antisymm (Nat.le_of_lt_succ hb) (Nat.zero_le _)
      subst zb
      rw [z0, row_coef K (K.mul (K.mul c d) K.zero) K.zero _ (by lib_ring),
        row_coef K (K.mul c (K.mul d K.zero)) K.zero _ (by lib_ring), row_zero_coef, row_zero_coef, K.zero_add]
    | inr hb =>
      rw [← dec_addE_r j α β (by rw [eb]; exact hb)]
      rw [K.zero_add]
      exact row_coef K (K.mul (K.mul c d) (cN K B)) (K.mul c (K.mul d (cN K B))) _ (by lib_ring) r
  | inr ha =>
    cases Nat.lt_or_ge B 1 with
    | inl hb =>
      have zb : B = 0 := Nat.le_antisymm (Nat.le_of_lt_succ hb) (Nat.zero_le _)
      subst zb
      rw [z0, row_coef K (K.mul c (K.mul d K.zero)) K.zero _ (by lib_ring), row_zero_coef, DetChain.add_zero',
        ← dec_addE_l j α β (by rw [ea]; exact ha)]
      rw [DetChain.add_zero']
      exact row_coef K (K.mul (K.mul c d) (cN K A)) (K.mul (K.mul c (cN K A)) d) _ (by lib_ring) r
    | inr hb =>
      rw [← dec_addE_l j α β (by rw [ea]; exact ha), ← dec_addE_r j α β (by rw [eb]; exact hb)]
      exact row_single_eq K (K.mul (K.mul c (cN K A)) d) (K.mul c (K.mul d (cN K B))) _ _ (by lib_ring) r

theorem Bf_single (t : Term R) (r : List (Term R)) : Bf K [t] r = row K t r := by
  show K.add (row K t r) K.zero = row K t r; rw [DetChain.add_zero']

theorem leibT_L (j : Nat) (t : Term R) (r : List (Term R)) : ∀ B : List (Term R),
    Bf K (dP K j (B.map (mulT K t))) r = K.add (Bf K (B.map (mulT K (tder K j t))) r) (Bf K ((dP K j B).map (mulT K t)) r)
  | [] => by show K.zero = K.add K.zero K.zero; rw [K.zero_add]
  | s :: B => by
    show K.add (row K _ r) (Bf K (dP K j (B.map (mulT K t))) r)
      = K.add (K.add (row K (mulT K (tder K j t) s) r) (Bf K (B.map (mulT K (tder K j t))) r))
          (K.add (row K (mulT K t (tder K j s)) r) (Bf K ((dP K j B).map (mulT K t)) r))
    rw [leibT_L j t r B]
    show K.add (row K (K.mul (K.mul t.1 s.1) (cN K (nthE j (addE t.2 s.2))), decAt j (addE t.2 s.2)) r) _ = _
    rw [leibT_row]
    generalize row K (mulT K (tder K j t) s) r = x1
    generalize row K (mulT K t (tder K j s)) r = x2
    generalize Bf K (List.map (mulT K (tder K j t)) B) r = x3
    generalize Bf K (List.map (mulT K t) (dP K j B)) r = x4
    lib_ring

/-- **Leibniz up to test-equivalence.** -/
theorem leib_eqv (n j : Nat) (A B : List (Term R)) :
    Eqv K n (dP K j (mulP K A B)) (mulP K (dP K j A) B ++ mulP K A (dP K j B)) := fun r _ => by
  rw [Bf_app_l]
  induction A with
  | nil => show K.zero = K.add K.zero K.zero; rw [K.zero_add]
  | cons t A ih =>
    show Bf K (dP K j (B.map (mulT K t) ++ mulP K A B)) r
      = K.add (Bf K (B.map (mulT K (tder K j t)) ++ mulP K (dP K j A) B) r) (Bf K ((dP K j B).map (mulT K t) ++ mulP K A (dP K j B)) r)
    rw [dP_app, Bf_app_l, Bf_app_l, Bf_app_l, leibT_L, ih]; lib_ring

/-! ### the algebra of test-equivalence -/

theorem eqv_refl (n : Nat) (p : List (Term R)) : Eqv K n p p := fun _ _ => rfl
theorem eqv_symm (n : Nat) (p q : List (Term R)) (h : Eqv K n p q) : Eqv K n q p := fun r hr => (h r hr).symm
theorem eqv_trans (n : Nat) (p q s : List (Term R)) (h1 : Eqv K n p q) (h2 : Eqv K n q s) : Eqv K n p s :=
  fun r hr => (h1 r hr).trans (h2 r hr)

theorem eqv_app (n : Nat) (p q p' q' : List (Term R)) (h : Eqv K n p q) (h' : Eqv K n p' q') :
    Eqv K n (p ++ p') (q ++ q') := fun r hr => by rw [Bf_app_l, Bf_app_l, h r hr, h' r hr]

def scaleT (c : R) (p : List (Term R)) : List (Term R) := p.map (fun s => (K.mul c s.1, s.2))

theorem row_scale (c : R) (t : Term R) : ∀ r : List (Term R), row K (K.mul c t.1, t.2) r = K.mul c (row K t r)
  | [] => by show K.zero = K.mul c K.zero; rw [DetChain.mul_zero]
  | u :: r => by
    show K.add (K.mul (K.mul (K.mul c t.1) u.1) (cN K (GM (addE t.2 u.2)))) (row K (K.mul c t.1, t.2) r)
      = K.mul c (K.add (K.mul (K.mul t.1 u.1) (cN K (GM (addE t.2 u.2)))) (row K t r))
    rw [row_scale c t r]; lib_ring

theorem Bf_scale (c : R) (r : List (Term R)) : ∀ p : List (Term R), Bf K (scaleT K c p) r = K.mul c (Bf K p r)
  | [] => by show K.zero = K.mul c K.zero; rw [DetChain.mul_zero]
  | t :: p => by
    show K.add (row K (K.mul c t.1, t.2) r) (Bf K (scaleT K c p) r) = K.mul c (K.add (row K t r) (Bf K p r))
    rw [row_scale, Bf_scale c r p, K.distrib]

theorem eqv_scale (n : Nat) (c : R) (p q : List (Term R)) (h : Eqv K n p q) : Eqv K n (scaleT K c p) (scaleT K c q) :=
  fun r hr => by rw [Bf_scale, Bf_scale, h r hr]

/-- row of a product term is symmetric -/
theorem row_mulT_comm (t s : Term R) : ∀ r : List (Term R), row K (mulT K t s) r = row K (mulT K s t) r
  | [] => rfl
  | u :: r => by
    show K.add (K.mul (K.mul (K.mul t.1 s.1) u.1) (cN K (GM (addE (addE t.2 s.2) u.2)))) (row K (mulT K t s) r)
      = K.add (K.mul (K.mul (K.mul s.1 t.1) u.1) (cN K (GM (addE (addE s.2 t.2) u.2)))) (row K (mulT K s t) r)
    rw [row_mulT_comm t s r, addE_comm t.2 s.2, K.mul_comm t.1 s.1]

theorem Bf_map_mulT (t : Term R) (r : List (Term R)) : ∀ B : List (Term R),
    Bf K (B.map (mulT K t)) r = Bf K (B.map (fun s => mulT K s t)) r
  | [] => rfl
  | s :: B => by
    show K.add (row K (mulT K t s) r) _ = K.add (row K (mulT K s t) r) _
    rw [row_mulT_comm, Bf_map_mulT t r B]

/-- Σ_{a ∈ A} Σ_{b ∈ B} f(a, b) = Σ_{b ∈ B} Σ_{a ∈ A} f(a, b) for f = row of the product term -/
theorem Bf_mulP_swap (r : List (Term R)) : ∀ A B : List (Term R),
    Bf K (mulP K A B) r = Bf K (mulP K B A) r
  | [], B => by
    show K.zero = Bf K (mulP K B []) r
    induction B with
    | nil => rfl
    | cons s B ih => show K.zero = Bf K (mulP K B []) r; exact ih
  | t :: A, B => by
    show Bf K (B.map (mulT K t) ++ mulP K A B) r = Bf K (mulP K B (t :: A)) r
    rw [Bf_app_l, Bf_mulP_swap r A B]
    -- Bf (B.map (mulT t)) r + Bf (mulP B A) r = Bf (mulP B (t :: A)) r
    clear Bf_mulP_swap
    induction B with
    | nil => show K.add K.zero K.zero = K.zero; rw [K.zero_add]
    | cons s B ih =>
      show K.add (K.add (row K (mulT K t s) r) (Bf K (B.map (mulT K t)) r)) (Bf K ((A.map (mulT K s)) ++ mulP K B A) r)
        = Bf K ((t :: A).map (mulT K s) ++ mulP K B (t :: A)) r
      rw [Bf_app_l, Bf_app_l, ← ih]
      show _ = K.add (K.add (row K (mulT K s t) r) (Bf K (A.map (mulT K s)) r)) _
      rw [row_mulT_comm]; lib_ring

theorem eqv_mul_comm (n : Nat) (A B : List (Term R)) : Eqv K n (mulP K A B) (mulP K B A) := fun r _ => Bf_mulP_swap K r A B

theorem mulT_assoc (x y z : Term R) : mulT K (mulT K x y) z = mulT K x (mulT K y z) := by
  show (K.mul (K.mul x.1 y.1) z.1, addE (addE x.2 y.2) z.2) = (K.mul x.1 (K.mul y.1 z.1), addE x.2 (addE y.2 z.2))
  rw [K.mul_assoc, addE_assoc]

theorem map_app' {α β : Type} (f : α → β) : ∀ L1 L2 : List α, (L1 ++ L2).map f = L1.map f ++ L2.map f
  | [], _ => rfl
  | x :: L1, L2 => by show f x :: (L1 ++ L2).map f = f x :: (L1.map f ++ L2.map f); rw [map_app' f L1 L2]

theorem app_assoc' {α : Type} : ∀ L1 L2 L3 : List α, (L1 ++ L2) ++ L3 = L1 ++ (L2 ++ L3)
  | [], _, _ => rfl
  | x :: L1, L2, L3 => by show x :: ((L1 ++ L2) ++ L3) = x :: (L1 ++ (L2 ++ L3)); rw [app_assoc' L1 L2 L3]

theorem mulP_app_l (L1 L2 Z : List (Term R)) : mulP K (L1 ++ L2) Z = mulP K L1 Z ++ mulP K L2 Z := by
  induction L1 with
  | nil => rfl
  | cons x L1 ih => show Z.map (mulT K x) ++ mulP K (L1 ++ L2) Z = (Z.map (mulT K x) ++ mulP K L1 Z) ++ mulP K L2 Z; rw [ih, app_assoc']

theorem map_mulT_map (x y : Term R) : ∀ Z : List (Term R), (Z.map (mulT K y)).map (mulT K x) = Z.map (mulT K (mulT K x y))
  | [] => rfl
  | z :: Z => by
    show mulT K x (mulT K y z) :: _ = mulT K (mulT K x y) z :: _
    rw [mulT_assoc, map_mulT_map x y Z]

theorem mulP_map (x : Term R) (Z : List (Term R)) : ∀ Y : List (Term R), mulP K (Y.map (mulT K x)) Z = (mulP K Y Z).map (mulT K x)
  | [] => rfl
  | y :: Y => by
    show Z.map (mulT K (mulT K x y)) ++ mulP K (Y.map (mulT K x)) Z = (Z.map (mulT K y) ++ mulP K Y Z).map (mulT K x)
    rw [map_app', map_mulT_map, mulP_map x Z Y]

/-- **The product of term lists is associative, as lists.** -/
theorem mulP_assoc (Y Z : List (Term R)) : ∀ X : List (Term R), mulP K (mulP K X Y) Z = mulP K X (mulP K Y Z)
  | [] => rfl
  | x :: X => by
    show mulP K (Y.map (mulT K x) ++ mulP K X Y) Z = (mulP K Y Z).map (mulT K x) ++ mulP K X (mulP K Y Z)
    rw [mulP_app_l, mulP_map, mulP_assoc Y Z X]

theorem eqv_mul_assoc (n : Nat) (A B C : List (Term R)) : Eqv K n (mulP K (mulP K A B) C) (mulP K A (mulP K B C)) := by
  rw [mulP_assoc]; exact eqv_refl K n _

end GaussPoly

#print axioms GaussPoly.Gp_ibp
#print axioms GaussPoly.unique_mono
#print axioms GaussPoly.leib_TT
#print axioms GaussPoly.leib
#print axioms GaussPoly.Bf_comm
#print axioms GaussPoly.Bf_assoc
#print axioms GaussPoly.dP_pair
#print axioms GaussPoly.eqv_dP
#print axioms GaussPoly.eqv_mul_l
#print axioms GaussPoly.leib_eqv
#print axioms GaussPoly.eqv_mul_comm
#print axioms GaussPoly.eqv_mul_assoc

ym/GaussPos.lean

lean_all/ym/GaussPos.lean

/-
  ym/GaussPos — T45, H0 positivity, step 6: every polynomial is a Hermite combination, and G(p²) ≥ 0.

    poly_exp     p ≡ Σ_s c_s He_{α_s}                    (x_i He_α ≡ He_{α+e_i} + α_i He_{α−e_i}, by induction on degree)
    Gp_ev        G(Σ_s c_s He_{α_s} · Σ_t d_t He_{β_t}) = Σ_{s,t} c_s d_t α_s! [α_s = β_t]
    Qf_nn        Σ_{s,t} c_s c_t α_s! [α_s = α_t] = Σ_α α! (Σ_{α_s = α} c_s)² ≥ 0
    gauss_pos    G(p²) ≥ 0 for every polynomial p, in any ordered ring
  (Sum-of-squares positivity of the Gaussian, hence of the sphere functional on squares of polynomials.)
  Lean 4 core only, proofs by hand, no axioms.
-/
import ym.GaussHermite
import ym.QuatUnit

namespace GaussPos

open SU2Char Gauss GaussPoly GaussSubst GaussRot GaussHermite YMChain

variable {R : Type} (K : DetChain.CRing R)

def ev (n : Nat) : List (R × List Nat) → List (Term R)
  | [] => []
  | t :: E => scaleT K t.1 (Hm K n 0 t.2) ++ ev n E

def LenH (n : Nat) : List (R × List Nat) → Prop
  | [] => True
  | t :: E => t.2.length = n ∧ LenH n E

theorem lenP_ev (n : Nat) : ∀ E, LenP n (ev K n E)
  | [] => trivial
  | t :: E => lenP_app n _ _ (lenP_scale K n _ _ (lenP_Hm K n 0 t.2)) (lenP_ev n E)

theorem lenH_app (n : Nat) : ∀ E F : List (R × List Nat), LenH n E → LenH n F → LenH n (E ++ F)
  | [], _, _, h => h
  | _ :: E, F, h, g => ⟨h.1, lenH_app n E F h.2 g⟩

theorem ev_app (n : Nat) : ∀ E F, ev K n (E ++ F) = ev K n E ++ ev K n F
  | [], _ => rfl
  | t :: E, F => by
    show scaleT K t.1 (Hm K n 0 t.2) ++ ev K n (E ++ F) = (scaleT K t.1 (Hm K n 0 t.2) ++ ev K n E) ++ ev K n F
    rw [ev_app n E F, app_assoc']

def xiH (i : Nat) : List (R × List Nat) → List (R × List Nat)
  | [] => []
  | t :: E => (t.1, incAt i t.2) :: (K.mul t.1 (cN K (nthE i t.2)), decAt i t.2) :: xiH i E

theorem lenH_xiH (n i : Nat) : ∀ E, LenH n E → LenH n (xiH K i E)
  | [], _ => trivial
  | t :: E, h => ⟨(len_incAt i t.2).trans h.1, (len_decAt i t.2).trans h.1, lenH_xiH n i E h.2⟩

theorem xi_ev (n i : Nat) (hi : i < n) : ∀ E, LenH n E → Eqv K n (xi i (ev K n E)) (ev K n (xiH K i E))
  | [], _ => eqv_refl K n []
  | t :: E, h => by
    show Eqv K n (xi i (scaleT K t.1 (Hm K n 0 t.2) ++ ev K n E))
      (scaleT K t.1 (Hm K n 0 (incAt i t.2)) ++ (scaleT K (K.mul t.1 (cN K (nthE i t.2))) (Hm K n 0 (decAt i t.2))
        ++ ev K n (xiH K i E)))
    rw [xi_app, xi_scale, ← app_assoc']
    refine eqv_app K n _ _ _ _ ?_ (xi_ev n i hi E h.2)
    have x := xi_Hm K n 0 t.2 i (by rw [h.1]; exact hi) (by rw [Nat.zero_add, h.1]; exact Nat.le_refl n)
    rw [Nat.zero_add] at x
    refine eqv_trans K n _ _ _ (eqv_scale K n t.1 _ _ x) ?_
    rw [scale_app, scale_scale]
    exact eqv_refl K n _

theorem Hm_zeros (n : Nat) : ∀ m k, Hm K n k (zerosL m) = one K n
  | 0, _ => rfl
  | m + 1, k => Hm_zeros n m (k + 1)

theorem mono_exp (n : Nat) (c : R) : ∀ d (α : List Nat), α.length = n → sumL α ≤ d →
    ∃ E, LenH n E ∧ Eqv K n [(c, α)] (ev K n E) := by
  intro d
  induction d with
  | zero =>
    intro α hl hs
    have h0 : sumL α = 0 := Nat.le_antisymm hs (Nat.zero_le _)
    refine ⟨[(c, α)], ⟨hl, trivial⟩, fun r _ => ?_⟩
    have ez : α = zerosL n := by rw [zero_sum α h0, hl]
    show Bf K [(c, α)] r = Bf K (scaleT K c (Hm K n 0 α) ++ []) r
    rw [ez, Hm_zeros, app_nil]
    show K.add (row K (c, zerosL n) r) K.zero = K.add (row K (K.mul c K.one, zerosL n) r) K.zero
    rw [row_coef K (K.mul c K.one) c _ (by lib_ring)]
  | succ d ih =>
    intro α hl hs
    cases Nat.lt_or_ge (sumL α) 1 with
    | inl h0 =>
      have z : sumL α = 0 := Nat.le_antisymm (Nat.le_of_lt_succ h0) (Nat.zero_le _)
      exact ih α hl (by rw [z]; exact Nat.zero_le _)
    | inr hpos =>
      obtain ⟨i, hi, hp⟩ := exists_pos α hpos
      have hβl : (decAt i α).length = n := (len_decAt i α).trans hl
      have hsb : sumL (decAt i α) + 1 = sumL α := sum_decAt i α hp
      obtain ⟨E, hE, eq⟩ := ih (decAt i α) hβl (Nat.le_of_succ_le_succ (show sumL (decAt i α) + 1 ≤ d + 1 by rw [hsb]; exact hs))
      refine ⟨xiH K i E, lenH_xiH K n i E hE, ?_⟩
      have hin : i < n := by rw [← hl]; exact hi
      have x : xi i [(c, decAt i α)] = [(c, α)] := by
        show [(c, incAt i (decAt i α))] = _; rw [incAt_decAt i α hp]
      rw [← x]
      exact eqv_trans K n _ _ _ (eqv_xi K n i hin _ _ ⟨hβl, trivial⟩ (lenP_ev K n E) eq) (xi_ev K n i hin E hE)

/-- **Every polynomial is a combination of Hermite polynomials.** -/
theorem poly_exp (n : Nat) : ∀ p : List (Term R), LenP n p → ∃ E, LenH n E ∧ Eqv K n p (ev K n E)
  | [], _ => ⟨[], trivial, eqv_refl K n []⟩
  | t :: p, h => by
    obtain ⟨E1, h1, e1⟩ := mono_exp K n t.1 (sumL t.2) t.2 h.1 (Nat.le_refl _)
    obtain ⟨E2, h2, e2⟩ := poly_exp n p h.2
    refine ⟨E1 ++ E2, lenH_app n E1 E2 h1 h2, ?_⟩
    rw [ev_app]
    show Eqv K n ([(t.1, t.2)] ++ p) _
    exact eqv_app K n _ _ _ _ e1 e2

/-! ### the Gram form in the Hermite basis -/

def kr (α β : List Nat) : R := if α = β then cN K (factL α) else K.zero

def rowQ (s : R × List Nat) : List (R × List Nat) → R
  | [] => K.zero
  | t :: F => K.add (K.mul (K.mul s.1 t.1) (kr K s.2 t.2)) (rowQ s F)

def Qf : List (R × List Nat) → List (R × List Nat) → R
  | [], _ => K.zero
  | s :: E, F => K.add (rowQ K s F) (Qf E F)

theorem gp_app_r (X A B : List (Term R)) : Gp K (mulP K X (A ++ B)) = K.add (Gp K (mulP K X A)) (Gp K (mulP K X B)) := by
  rw [gp_comm, mulP_app_l, Gp_app, gp_comm K A, gp_comm K B]

theorem g_row (n : Nat) (s : R × List Nat) (hs : s.2.length = n) : ∀ F, LenH n F →
    Gp K (mulP K (scaleT K s.1 (Hm K n 0 s.2)) (ev K n F)) = rowQ K s F
  | [], _ => by
    show Gp K (mulP K _ []) = K.zero
    rw [gp_comm]; rfl
  | t :: F, h => by
    show Gp K (mulP K _ (scaleT K t.1 (Hm K n 0 t.2) ++ ev K n F)) = K.add _ (rowQ K s F)
    rw [gp_app_r, g_row n s hs F h.2, scale_mulP, mulP_scale_r, Gp_scale, Gp_scale, herm_m K n s.2 t.2 hs h.1, ← K.mul_assoc]
    rfl

theorem Gp_ev (n : Nat) (F : List (R × List Nat)) (hF : LenH n F) : ∀ E, LenH n E →
    Gp K (mulP K (ev K n E) (ev K n F)) = Qf K E F
  | [], _ => rfl
  | s :: E, h => by
    show Gp K (mulP K (scaleT K s.1 (Hm K n 0 s.2) ++ ev K n E) (ev K n F)) = K.add (rowQ K s F) (Qf K E F)
    rw [mulP_app_l, Gp_app, g_row K n s h.1 F hF, Gp_ev n F hF E h.2]

/-! ### positivity of the Gram form -/

def sel (α : List Nat) : List (R × List Nat) → List (R × List Nat)
  | [] => []
  | t :: E => if t.2 = α then t :: sel α E else sel α E

def rej (α : List Nat) : List (R × List Nat) → List (R × List Nat)
  | [] => []
  | t :: E => if t.2 = α then rej α E else t :: rej α E

def sumC : List (R × List Nat) → R
  | [] => K.zero
  | t :: E => K.add t.1 (sumC E)

theorem rowQ_split (α : List Nat) (s : R × List Nat) : ∀ F, rowQ K s F = K.add (rowQ K s (sel α F)) (rowQ K s (rej α F))
  | [] => (K.zero_add _).symm
  | t :: F => by
    have ih := rowQ_split α s F
    by_cases h : t.2 = α
    · have e1 : sel α (t :: F) = t :: sel α F := if_pos h
      have e2 : rej α (t :: F) = rej α F := if_pos h
      rw [e1, e2]
      show K.add _ (rowQ K s F) = K.add (K.add _ (rowQ K s (sel α F))) _
      rw [ih]
      generalize K.mul (K.mul s.1 t.1) (kr K s.2 t.2) = a
      generalize rowQ K s (sel α F) = b; generalize rowQ K s (rej α F) = c
      lib_ring
    · have e1 : sel α (t :: F) = sel α F := if_neg h
      have e2 : rej α (t :: F) = t :: rej α F := if_neg h
      rw [e1, e2]
      show K.add _ (rowQ K s F) = K.add _ (K.add _ (rowQ K s (rej α F)))
      rw [ih]
      generalize K.mul (K.mul s.1 t.1) (kr K s.2 t.2) = a
      generalize rowQ K s (sel α F) = b; generalize rowQ K s (rej α F) = c
      lib_ring

theorem Qf_split_r (α : List Nat) (F : List (R × List Nat)) : ∀ E, Qf K E F = K.add (Qf K E (sel α F)) (Qf K E (rej α F))
  | [] => (K.zero_add _).symm
  | s :: E => by
    show K.add (rowQ K s F) (Qf K E F) = K.add (K.add (rowQ K s (sel α F)) (Qf K E (sel α F))) (K.add (rowQ K s (rej α F)) (Qf K E (rej α F)))
    rw [rowQ_split K α s F, Qf_split_r α F E]
    generalize rowQ K s (sel α F) = a; generalize rowQ K s (rej α F) = b
    generalize Qf K E (sel α F) = c; generalize Qf K E (rej α F) = d
    lib_ring

theorem Qf_split_l (α : List Nat) (F : List (R × List Nat)) : ∀ E, Qf K E F = K.add (Qf K (sel α E) F) (Qf K (rej α E) F)
  | [] => (K.zero_add _).symm
  | s :: E => by
    have ih := Qf_split_l α F E
    by_cases h : s.2 = α
    · have e1 : sel α (s :: E) = s :: sel α E := if_pos h
      have e2 : rej α (s :: E) = rej α E := if_pos h
      rw [e1, e2]
      show K.add (rowQ K s F) (Qf K E F) = K.add (K.add (rowQ K s F) (Qf K (sel α E) F)) _
      rw [ih]
      generalize rowQ K s F = a; generalize Qf K (sel α E) F = b; generalize Qf K (rej α E) F = c
      lib_ring
    · have e1 : sel α (s :: E) = sel α E := if_neg h
      have e2 : rej α (s :: E) = s :: rej α E := if_neg h
      rw [e1, e2]
      show K.add (rowQ K s F) (Qf K E F) = K.add _ (K.add (rowQ K s F) (Qf K (rej α E) F))
      rw [ih]
      generalize rowQ K s F = a; generalize Qf K (sel α E) F = b; generalize Qf K (rej α E) F = c
      lib_ring

theorem term_zero (a b : R) (r : R) : K.add (K.mul (K.mul a b) K.zero) r = r := by
  rw [DetChain.mul_zero, K.zero_add]

theorem rowQ_rej_zero (α : List Nat) (s : R × List Nat) (hs : s.2 = α) : ∀ F, rowQ K s (rej α F) = K.zero
  | [] => rfl
  | t :: F => by
    by_cases h : t.2 = α
    · have e : rej α (t :: F) = rej α F := if_pos h
      rw [e]; exact rowQ_rej_zero α s hs F
    · have e : rej α (t :: F) = t :: rej α F := if_neg h
      rw [e]
      show K.add (K.mul (K.mul s.1 t.1) (kr K s.2 t.2)) (rowQ K s (rej α F)) = K.zero
      have k0 : kr K s.2 t.2 = K.zero := if_neg (fun e => h (e.symm.trans hs))
      rw [k0, term_zero, rowQ_rej_zero α s hs F]

theorem rowQ_sel_zero (α : List Nat) (s : R × List Nat) (hs : s.2 ≠ α) : ∀ F, rowQ K s (sel α F) = K.zero
  | [] => rfl
  | t :: F => by
    by_cases h : t.2 = α
    · have e : sel α (t :: F) = t :: sel α F := if_pos h
      rw [e]
      show K.add (K.mul (K.mul s.1 t.1) (kr K s.2 t.2)) (rowQ K s (sel α F)) = K.zero
      have k0 : kr K s.2 t.2 = K.zero := if_neg (fun e => hs (e.trans h))
      rw [k0, term_zero, rowQ_sel_zero α s hs F]
    · have e : sel α (t :: F) = sel α F := if_neg h
      rw [e]; exact rowQ_sel_zero α s hs F

theorem Qf_sel_rej (α : List Nat) (F : List (R × List Nat)) : ∀ E, Qf K (sel α E) (rej α F) = K.zero
  | [] => rfl
  | s :: E => by
    by_cases h : s.2 = α
    · have e : sel α (s :: E) = s :: sel α E := if_pos h
      rw [e]; show K.add (rowQ K s (rej α F)) (Qf K (sel α E) (rej α F)) = K.zero
      rw [rowQ_rej_zero K α s h F, Qf_sel_rej α F E, K.zero_add]
    · have e : sel α (s :: E) = sel α E := if_neg h
      rw [e]; exact Qf_sel_rej α F E

theorem Qf_rej_sel (α : List Nat) (F : List (R × List Nat)) : ∀ E, Qf K (rej α E) (sel α F) = K.zero
  | [] => rfl
  | s :: E => by
    by_cases h : s.2 = α
    · have e : rej α (s :: E) = rej α E := if_pos h
      rw [e]; exact Qf_rej_sel α F E
    · have e : rej α (s :: E) = s :: rej α E := if_neg h
      rw [e]; show K.add (rowQ K s (sel α F)) (Qf K (rej α E) (sel α F)) = K.zero
      rw [rowQ_sel_zero K α s h F, Qf_rej_sel α F E, K.zero_add]

def AllI (α : List Nat) : List (R × List Nat) → Prop
  | [] => True
  | t :: E => t.2 = α ∧ AllI α E

theorem allI_sel (α : List Nat) : ∀ E : List (R × List Nat), AllI α (sel α E)
  | [] => trivial
  | t :: E => by
    by_cases h : t.2 = α
    · have e : sel α (t :: E) = t :: sel α E := if_pos h
      rw [e]; exact ⟨h, allI_sel α E⟩
    · have e : sel α (t :: E) = sel α E := if_neg h
      rw [e]; exact allI_sel α E

theorem rowQ_all (α : List Nat) (s : R × List Nat) (hs : s.2 = α) : ∀ F, AllI α F →
    rowQ K s F = K.mul (K.mul s.1 (sumC K F)) (cN K (factL α))
  | [], _ => by show K.zero = K.mul (K.mul s.1 K.zero) _; rw [DetChain.mul_zero, K.mul_comm, DetChain.mul_zero]
  | t :: F, h => by
    show K.add (K.mul (K.mul s.1 t.1) (kr K s.2 t.2)) (rowQ K s F) = K.mul (K.mul s.1 (K.add t.1 (sumC K F))) _
    have k1 : kr K s.2 t.2 = cN K (factL α) := by
      show (if s.2 = t.2 then cN K (factL s.2) else K.zero) = _
      rw [if_pos (hs.trans h.1.symm), hs]
    rw [k1, rowQ_all α s hs F h.2]
    generalize cN K (factL α) = w; generalize sumC K F = S
    lib_ring

theorem Qf_all (α : List Nat) (F : List (R × List Nat)) (hF : AllI α F) : ∀ E, AllI α E →
    Qf K E F = K.mul (K.mul (sumC K E) (sumC K F)) (cN K (factL α))
  | [], _ => by show K.zero = K.mul (K.mul K.zero _) _; rw [K.mul_comm K.zero, DetChain.mul_zero, K.mul_comm, DetChain.mul_zero]
  | s :: E, h => by
    show K.add (rowQ K s F) (Qf K E F) = K.mul (K.mul (K.add s.1 (sumC K E)) (sumC K F)) _
    rw [rowQ_all K α s h.1 F hF, Qf_all α F hF E h.2]
    generalize cN K (factL α) = w; generalize sumC K F = S; generalize sumC K E = T
    lib_ring

theorem len_rej (α : List Nat) : ∀ E : List (R × List Nat), (rej α E).length ≤ E.length
  | [] => Nat.le_refl 0
  | t :: E => by
    by_cases h : t.2 = α
    · have e : rej α (t :: E) = rej α E := if_pos h
      rw [e]; exact Nat.le_succ_of_le (len_rej α E)
    · have e : rej α (t :: E) = t :: rej α E := if_neg h
      rw [e]; exact Nat.succ_le_succ (len_rej α E)

variable (O : ORing K)

theorem one_nn : O.le K.zero K.one := by
  have := QuatUnit.sq_nn K O K.one; rw [K.one_mul] at this; exact this

/-- **The Gram form is positive:** Σ_{s,t} c_s c_t α_s! [α_s = α_t] ≥ 0. -/
theorem Qf_nn : ∀ (N : Nat) (E : List (R × List Nat)), E.length ≤ N → O.le K.zero (Qf K E E)
  | 0, [], _ => O.le_refl _
  | 0, _ :: _, h => absurd h (Nat.not_succ_le_zero _)
  | _ + 1, [], _ => O.le_refl _
  | N + 1, s :: E, h => by
    let α := s.2
    have split : Qf K (s :: E) (s :: E) = K.add (Qf K (sel α (s :: E)) (sel α (s :: E))) (Qf K (rej α (s :: E)) (rej α (s :: E))) := by
      rw [Qf_split_l K α (s :: E) (s :: E), Qf_split_r K α (s :: E) (sel α (s :: E)), Qf_split_r K α (s :: E) (rej α (s :: E)),
        Qf_sel_rej, Qf_rej_sel, DetChain.add_zero', K.zero_add]
    rw [split]
    have A : O.le K.zero (Qf K (sel α (s :: E)) (sel α (s :: E))) := by
      rw [Qf_all K α _ (allI_sel α _) _ (allI_sel α _)]
      exact O.mul_nonneg _ _ (QuatUnit.sq_nn K O _) (SU2CharExp.cN_nn K O (one_nn K O) _)
    have e : rej α (s :: E) = rej α E := if_pos rfl
    have B : O.le K.zero (Qf K (rej α (s :: E)) (rej α (s :: E))) := by
      rw [e]; exact Qf_nn N (rej α E) (Nat.le_trans (len_rej α E) (Nat.le_of_succ_le_succ h))
    have := O.add_le_add _ _ _ _ A B
    rw [K.zero_add] at this; exact this

/-- **Positivity of the Gaussian functional on squares:** G(p²) ≥ 0. -/
theorem gauss_pos (n : Nat) (p : List (Term R)) (hp : LenP n p) : O.le K.zero (Gp K (mulP K p p)) := by
  obtain ⟨E, hE, e⟩ := poly_exp K n p hp
  have hv := lenP_ev K n E
  have q : Gp K (mulP K p p) = Gp K (mulP K (ev K n E) (ev K n E)) := by
    rw [Gp_mulP, Gp_mulP, e p hp, Bf_comm, e _ hv]
  rw [q, Gp_ev K n E hE E hE]
  exact Qf_nn K O E.length E (Nat.le_refl _)

end GaussPos

#print axioms GaussPos.poly_exp
#print axioms GaussPos.Qf_nn
#print axioms GaussPos.gauss_pos

ym/GaussQuat.lean

lean_all/ym/GaussQuat.lean

/-
  ym/GaussQuat — T45, H0 step 7: unit quaternions act orthogonally on ℝ⁴, so the Gaussian moments are SU(2)-bi-invariant.

  For q = a + b i + c j + d k with a² + b² + c² + d² = 1, the matrices of x ↦ q x and x ↦ x q have orthonormal rows
  (qL_orth, qR_orth); with GaussRot.rot_inv, G(x^α ∘ L_q) = G(x^α ∘ R_q) = G(x^α) (bi_inv).
  Lean 4 core only, proofs by hand, no axioms.
-/
import ym.GaussRot

namespace GaussQuat

open SU2Char Gauss GaussPoly GaussSubst GaussRot

variable {R : Type} (K : DetChain.CRing R)

/-- left multiplication by q -/
def qL (a b c d : R) : Nat → Nat → R
  | 0, 0 => a | 0, 1 => K.neg b | 0, 2 => K.neg c | 0, 3 => K.neg d
  | 1, 0 => b | 1, 1 => a | 1, 2 => K.neg d | 1, 3 => c
  | 2, 0 => c | 2, 1 => d | 2, 2 => a | 2, 3 => K.neg b
  | 3, 0 => d | 3, 1 => K.neg c | 3, 2 => b | 3, 3 => a
  | _, _ => K.zero

/-- right multiplication by q -/
def qR (a b c d : R) : Nat → Nat → R
  | 0, 0 => a | 0, 1 => K.neg b | 0, 2 => K.neg c | 0, 3 => K.neg d
  | 1, 0 => b | 1, 1 => a | 1, 2 => d | 1, 3 => K.neg c
  | 2, 0 => c | 2, 1 => K.neg d | 2, 2 => a | 2, 3 => b
  | 3, 0 => d | 3, 1 => c | 3, 2 => K.neg b | 3, 3 => a
  | _, _ => K.zero

theorem lt4 : ∀ i : Nat, i < 4 → i = 0 ∨ i = 1 ∨ i = 2 ∨ i = 3
  | 0, _ => Or.inl rfl
  | 1, _ => Or.inr (Or.inl rfl)
  | 2, _ => Or.inr (Or.inr (Or.inl rfl))
  | 3, _ => Or.inr (Or.inr (Or.inr rfl))
  | n + 4, h => absurd (Nat.lt_of_le_of_lt (Nat.le_add_left 4 n) h) (Nat.lt_irrefl 4)

theorem sum4 (f : Nat → R) : sumK K f 4 = K.add (K.add (K.add (K.add K.zero (f 0)) (f 1)) (f 2)) (f 3) := rfl

def nrm (a b c d : R) : R := K.add (K.add (K.add (K.mul a a) (K.mul b b)) (K.mul c c)) (K.mul d d)

theorem qL_orth (a b c d : R) (hn : nrm K a b c d = K.one) : Orth K 4 (qL K a b c d) := by
  intro i l hi hl
  rw [sum4, ← hn]
  unfold nrm
  rcases lt4 i hi with h | h | h | h <;> rcases lt4 l hl with g | g | g | g <;> subst h <;> subst g <;>
    first
      | (rw [if_pos rfl]; simp only [qL]; lib_ring)
      | (rw [if_neg (by decide)]; simp only [qL]; lib_ring)

theorem qR_orth (a b c d : R) (hn : nrm K a b c d = K.one) : Orth K 4 (qR K a b c d) := by
  intro i l hi hl
  rw [sum4, ← hn]
  unfold nrm
  rcases lt4 i hi with h | h | h | h <;> rcases lt4 l hl with g | g | g | g <;> subst h <;> subst g <;>
    first
      | (rw [if_pos rfl]; simp only [qR]; lib_ring)
      | (rw [if_neg (by decide)]; simp only [qR]; lib_ring)

/-- **SU(2)-bi-invariance of the Gaussian moments on ℝ⁴ = ℍ.** -/
theorem bi_inv (a b c d : R) (hn : nrm K a b c d = K.one) (α : List Nat) (hl : α.length = 4) :
    Gp K (substM K 4 (qL K a b c d) 0 α) = cN K (GM α) ∧ Gp K (substM K 4 (qR K a b c d) 0 α) = cN K (GM α) :=
  ⟨rot_inv K 4 _ (qL_orth K a b c d hn) α hl, rot_inv K 4 _ (qR_orth K a b c d hn) α hl⟩

end GaussQuat

#print axioms GaussQuat.qL_orth
#print axioms GaussQuat.bi_inv

ym/GaussRot.lean

lean_all/ym/GaussRot.lean

/-
  ym/GaussRot — T45, H0 step 6: rotation invariance of the Gaussian moment functional.

  For a matrix O with orthonormal rows (Σ_m O_im O_lm = δ_il, i, l < n) and the substitution x ↦ Ox,
    Gp_lin        G(L_i · S) = Σ_m O_im G(x_m · S)
    mix_chain     Σ_m O_im (chain-rule sum for ∂_m) ≡ the δ-collapsed sum           (orthogonality)
    rot_ibp       G(x_i x^α ∘ O) = α_i G(x^{α−e_i} ∘ O)                            (IBP survives the substitution)
    rot_inv       G(x^α ∘ O) = G(x^α)                                               (uniqueness, unique_mono)
  Lean 4 core only, proofs by hand, no axioms.
-/
import ym.GaussSubst

namespace GaussRot

open SU2Char Gauss GaussPoly GaussSubst

variable {R : Type} (K : DetChain.CRing R)

def sumK (f : Nat → R) : Nat → R
  | 0 => K.zero
  | m + 1 => K.add (sumK f m) (f m)

theorem sumK_ext (f g : Nat → R) (h : ∀ x, f x = g x) : ∀ m, sumK K f m = sumK K g m
  | 0 => rfl
  | m + 1 => by show K.add (sumK K f m) (f m) = K.add (sumK K g m) (g m); rw [sumK_ext f g h m, h m]

theorem sumK_extB (f g : Nat → R) : ∀ m, (∀ x, x < m → f x = g x) → sumK K f m = sumK K g m
  | 0, _ => rfl
  | m + 1, h => by
    show K.add (sumK K f m) (f m) = K.add (sumK K g m) (g m)
    rw [sumK_extB f g m (fun x hx => h x (Nat.lt_succ_of_lt hx)), h m (Nat.lt_succ_self m)]

theorem sumK_add (f g : Nat → R) : ∀ m, sumK K (fun x => K.add (f x) (g x)) m = K.add (sumK K f m) (sumK K g m)
  | 0 => by show K.zero = K.add K.zero K.zero; rw [K.zero_add]
  | m + 1 => by
    show K.add (sumK K (fun x => K.add (f x) (g x)) m) (K.add (f m) (g m)) = K.add (K.add (sumK K f m) (f m)) (K.add (sumK K g m) (g m))
    rw [sumK_add f g m]
    generalize sumK K f m = a; generalize sumK K g m = b; generalize f m = c; generalize g m = d
    lib_ring

theorem sumK_mul (f : Nat → R) (c : R) : ∀ m, sumK K (fun x => K.mul (f x) c) m = K.mul (sumK K f m) c
  | 0 => by show K.zero = K.mul K.zero c; rw [K.mul_comm, DetChain.mul_zero]
  | m + 1 => by
    show K.add (sumK K (fun x => K.mul (f x) c) m) (K.mul (f m) c) = K.mul (K.add (sumK K f m) (f m)) c
    rw [sumK_mul f c m]
    generalize sumK K f m = a; generalize f m = b
    lib_ring

/-- orthonormal rows -/
def Orth (n : Nat) (O : Nat → Nat → R) : Prop :=
  ∀ i l, i < n → l < n → sumK K (fun m => K.mul (O i m) (O l m)) n = if i = l then K.one else K.zero

theorem Gp_scale (c : R) : ∀ p : List (Term R), Gp K (scaleT K c p) = K.mul c (Gp K p)
  | [] => by show K.zero = K.mul c K.zero; rw [DetChain.mul_zero]
  | t :: p => by
    show K.add (K.mul (K.mul c t.1) (cN K (GM t.2))) (Gp K (scaleT K c p)) = K.mul c (K.add (K.mul t.1 (cN K (GM t.2))) (Gp K p))
    rw [Gp_scale c p]; lib_ring

theorem Gp_eq_Bf (n : Nat) (p : List (Term R)) (hp : LenP n p) : Gp K p = Bf K p (one K n) := by
  rw [← Gp_mulP, mulP_one K n p hp, Gp_scale, K.one_mul]

theorem Bf_mulP_left (P X r : List (Term R)) : Bf K (mulP K P X) r = Bf K X (mulP K P r) := by
  calc Bf K (mulP K P X) r = Bf K (mulP K X P) r := Bf_mulP_swap K r P X
    _ = Bf K X (mulP K P r) := Bf_assoc K P r X

/-! ### the substituted linear form against a polynomial -/

theorem addE_zeros_l : ∀ (β : List Nat), addE (zerosL β.length) β = β
  | [] => rfl
  | b :: β => by show (0 + b) :: addE (zerosL β.length) β = b :: β; rw [addE_zeros_l β, Nat.zero_add]

theorem addE_unit (n m : Nat) (hm : m < n) (β : List Nat) (hb : β.length = n) : addE (unitE n m) β = incAt m β := by
  show addE (incAt m (zerosL n)) β = incAt m β
  rw [addE_comm, ← inc_addE m β (zerosL n) (by rw [len_zeros]; exact hm) (by rw [len_zeros]; exact hb), ← hb, addE_comm,
    addE_zeros_l]

theorem Gp_map_unit (n m : Nat) (hm : m < n) (c : R) : ∀ S : List (Term R), LenP n S →
    Gp K (S.map (mulT K (c, unitE n m))) = K.mul c (Gp K (xi m S))
  | [], _ => by show K.zero = K.mul c K.zero; rw [DetChain.mul_zero]
  | t :: S, h => by
    show K.add (K.mul (K.mul c t.1) (cN K (GM (addE (unitE n m) t.2)))) (Gp K (S.map (mulT K (c, unitE n m))))
      = K.mul c (K.add (K.mul t.1 (cN K (GM (incAt m t.2)))) (Gp K (xi m S)))
    rw [addE_unit n m hm t.2 h.1, Gp_map_unit n m hm c S h.2]; lib_ring

theorem Gp_linF (n : Nat) (O : Nat → Nat → R) (i : Nat) (S : List (Term R)) (hS : LenP n S) :
    ∀ m, m ≤ n → Gp K (mulP K (linF n O i m) S) = sumK K (fun x => K.mul (O i x) (Gp K (xi x S))) m
  | 0, _ => rfl
  | m + 1, hm => by
    show Gp K (mulP K (linF n O i m ++ [(O i m, unitE n m)]) S) = K.add (sumK K _ m) (K.mul (O i m) (Gp K (xi m S)))
    rw [mulP_app_l, Gp_app, Gp_linF n O i S hS m (Nat.le_of_succ_le hm)]
    show _ = K.add _ _
    have e : Gp K (mulP K [(O i m, unitE n m)] S) = K.mul (O i m) (Gp K (xi m S)) := by
      show Gp K (S.map (mulT K (O i m, unitE n m)) ++ []) = _
      rw [Gp_app, Gp_map_unit K n m hm (O i m) S hS]
      show K.add _ K.zero = _; rw [DetChain.add_zero']
    rw [e]

/-! ### orthogonality collapses the chain-rule sums -/

/-- the δ-collapsed sum: α_{i−k} · x^{α−e_{i−k}} ∘ O -/
def tgt (n : Nat) (O : Nat → Nat → R) (i : Nat) : Nat → List Nat → List (Term R)
  | _, [] => []
  | k, a :: α => (if i = k then scaleT K (cN K a) (substM K n O k ((a - 1) :: α)) else []) ++
      mulP K (powP K n (lin n O k) a) (tgt n O i (k + 1) α)

theorem mix_chain (n : Nat) (O : Nat → Nat → R) (hO : Orth K n O) (i : Nat) (hi : i < n) :
    ∀ (α : List Nat) (k : Nat), k + α.length ≤ n → ∀ r : List (Term R), LenP n r →
    sumK K (fun m => K.mul (O i m) (Bf K (chainT K n O m k α) r)) n = Bf K (tgt K n O i k α) r
  | [], k, _, r, _ => by
    show sumK K (fun m => K.mul (O i m) K.zero) n = K.zero
    rw [sumK_ext K _ (fun m => K.mul K.zero K.zero) (fun x => by rw [DetChain.mul_zero, DetChain.mul_zero]) n,
      sumK_mul, DetChain.mul_zero]
  | a :: α, k, hk, r, hr => by
    have hkn : k < n := Nat.lt_of_lt_of_le (Nat.lt_succ_of_le (Nat.le_add_right k α.length)) hk
    have hk' : k + 1 + α.length ≤ n := by
      have : k + 1 + α.length = k + (α.length + 1) := by lib_nat
      rw [this]; exact hk
    let P := powP K n (lin n O k) a
    have hP : LenP n P := lenP_pow K n _ (lenP_linF n O k n) a
    have hr' : LenP n (mulP K P r) := lenP_mulP K n r hr P hP
    have ih := mix_chain n O hO i hi α (k + 1) hk' (mulP K P r) hr'
    let B1 := Bf K (substM K n O k ((a - 1) :: α)) r
    have e1 : ∀ m, Bf K (chainT K n O m k (a :: α)) r
        = K.add (K.mul (K.mul (O k m) (cN K a)) B1) (Bf K (chainT K n O m (k + 1) α) (mulP K P r)) := by
      intro m
      show Bf K (scaleT K (K.mul (O k m) (cN K a)) (substM K n O k ((a - 1) :: α)) ++ mulP K P (chainT K n O m (k + 1) α)) r = _
      rw [Bf_app_l, Bf_scale, Bf_mulP_left]
    have e2 : Bf K (tgt K n O i k (a :: α)) r = K.add (Bf K (if i = k then scaleT K (cN K a) (substM K n O k ((a - 1) :: α)) else []) r)
        (Bf K (tgt K n O i (k + 1) α) (mulP K P r)) := by
      show Bf K (_ ++ mulP K P (tgt K n O i (k + 1) α)) r = _
      rw [Bf_app_l, Bf_mulP_left]
    calc sumK K (fun m => K.mul (O i m) (Bf K (chainT K n O m k (a :: α)) r)) n
        = sumK K (fun m => K.add (K.mul (K.mul (O i m) (O k m)) (K.mul (cN K a) B1))
            (K.mul (O i m) (Bf K (chainT K n O m (k + 1) α) (mulP K P r)))) n :=
          sumK_ext K _ _ (fun m => by
            rw [e1 m]
            generalize O i m = x; generalize O k m = y; generalize cN K a = z; generalize B1 = w
            generalize Bf K (chainT K n O m (k + 1) α) (mulP K P r) = v
            lib_ring) n
      _ = K.add (sumK K (fun m => K.mul (K.mul (O i m) (O k m)) (K.mul (cN K a) B1)) n)
            (sumK K (fun m => K.mul (O i m) (Bf K (chainT K n O m (k + 1) α) (mulP K P r))) n) := sumK_add K _ _ n
      _ = K.add (K.mul (sumK K (fun m => K.mul (O i m) (O k m)) n) (K.mul (cN K a) B1))
            (Bf K (tgt K n O i (k + 1) α) (mulP K P r)) := by rw [sumK_mul, ih]
      _ = Bf K (tgt K n O i k (a :: α)) r := by
          rw [e2, hO i k hi hkn]
          by_cases h : i = k
          · rw [if_pos h, if_pos h, Bf_scale, K.one_mul]
          · rw [if_neg h, if_neg h]
            show K.add (K.mul K.zero _) _ = K.add K.zero _
            rw [K.mul_comm, DetChain.mul_zero]

theorem tgt_low (n : Nat) (O : Nat → Nat → R) (i : Nat) :
    ∀ (α : List Nat) (k : Nat), i < k → ∀ r : List (Term R), Bf K (tgt K n O i k α) r = K.zero
  | [], _, _, _ => rfl
  | a :: α, k, h, r => by
    show Bf K (_ ++ mulP K (powP K n (lin n O k) a) (tgt K n O i (k + 1) α)) r = K.zero
    rw [Bf_app_l, Bf_mulP_left, if_neg (Nat.ne_of_lt h), tgt_low n O i α (k + 1) (Nat.lt_succ_of_lt h)]
    show K.add K.zero K.zero = K.zero; rw [K.zero_add]

theorem tgt_at (n : Nat) (O : Nat → Nat → R) :
    ∀ (α : List Nat) (k j : Nat) (r : List (Term R)),
    Bf K (tgt K n O (k + j) k α) r = K.mul (cN K (nthE j α)) (Bf K (substM K n O k (decAt j α)) r)
  | [], k, j, r => by
    have : nthE j ([] : List Nat) = 0 := by cases j <;> rfl
    rw [this]; show K.zero = K.mul K.zero _; rw [K.mul_comm, DetChain.mul_zero]
  | a :: α, k, 0, r => by
    show Bf K ((if k = k then scaleT K (cN K a) (substM K n O k ((a - 1) :: α)) else []) ++
      mulP K (powP K n (lin n O k) a) (tgt K n O k (k + 1) α)) r = K.mul (cN K a) (Bf K (substM K n O k ((a - 1) :: α)) r)
    rw [if_pos rfl, Bf_app_l, Bf_scale, Bf_mulP_left, tgt_low K n O k α (k + 1) (Nat.lt_succ_self k), DetChain.add_zero']
  | a :: α, k, j + 1, r => by
    have e : k + (j + 1) = k + 1 + j := by lib_nat
    rw [e]
    have hne : k + 1 + j ≠ k := Nat.ne_of_gt (Nat.lt_of_lt_of_le (Nat.lt_succ_self k) (Nat.le_add_right (k + 1) j))
    show Bf K ((if k + 1 + j = k then scaleT K (cN K a) (substM K n O k ((a - 1) :: α)) else []) ++
      mulP K (powP K n (lin n O k) a) (tgt K n O (k + 1 + j) (k + 1) α)) r
      = K.mul (cN K (nthE j α)) (Bf K (mulP K (powP K n (lin n O k) a) (substM K n O (k + 1) (decAt j α))) r)
    rw [if_neg hne, Bf_app_l, Bf_mulP_left, Bf_mulP_left, tgt_at n O α (k + 1) j]
    show K.add K.zero _ = _; rw [K.zero_add]

/-! ### raising an exponent multiplies by the linear form -/

theorem subst_inc (n : Nat) (O : Nat → Nat → R) :
    ∀ (α : List Nat) (k i : Nat), i < α.length →
    Eqv K n (substM K n O k (incAt i α)) (mulP K (lin n O (k + i)) (substM K n O k α))
  | [], _, _, h => absurd h (Nat.not_lt_zero _)
  | a :: α, k, 0, _ => by
    let L := lin n O k
    have hL : LenP n L := lenP_linF n O k n
    let P := powP K n L a
    have hP : LenP n P := lenP_pow K n L hL a
    let S := substM K n O (k + 1) α
    have hS : LenP n S := lenP_substM K n O (k + 1) α
    show Eqv K n (mulP K (mulP K P L) S) (mulP K L (mulP K P S))
    rw [mulP_assoc]
    refine eqv_trans K n _ _ _ (eqv_mul_l K n _ _ P hP (eqv_mul_comm K n L S)) ?_
    rw [← mulP_assoc]
    exact eqv_mul_comm K n _ _
  | a :: α, k, i + 1, h => by
    have ih := subst_inc n O α (k + 1) i (Nat.lt_of_succ_lt_succ h)
    have e : k + (i + 1) = k + 1 + i := by lib_nat
    rw [e]
    let L := lin n O (k + 1 + i)
    have hL : LenP n L := lenP_linF n O (k + 1 + i) n
    let P := powP K n (lin n O k) a
    have hP : LenP n P := lenP_pow K n _ (lenP_linF n O k n) a
    let S := substM K n O (k + 1) α
    have hS : LenP n S := lenP_substM K n O (k + 1) α
    show Eqv K n (mulP K P (substM K n O (k + 1) (incAt i α))) (mulP K L (mulP K P S))
    refine eqv_trans K n _ _ _ (eqv_mul_l K n _ _ P hP ih) ?_
    rw [← mulP_assoc, ← mulP_assoc]
    exact eqv_mul_r K n _ _ S hS (eqv_mul_comm K n P L)

/-! ### integration by parts survives the orthogonal substitution -/

theorem rot_ibp (n : Nat) (O : Nat → Nat → R) (hO : Orth K n O) (α : List Nat) (hl : α.length = n) (i : Nat) (hi : i < n) :
    Gp K (substM K n O 0 (incAt i α)) = K.mul (cN K (nthE i α)) (Gp K (substM K n O 0 (decAt i α))) := by
  let S := substM K n O 0 α
  have hS : LenP n S := lenP_substM K n O 0 α
  have hone := lenP_one K n
  have si := subst_inc K n O α 0 i (by rw [hl]; exact hi)
  rw [Nat.zero_add] at si
  have ta := tgt_at K n O α 0 i (one K n)
  rw [Nat.zero_add] at ta
  rw [Gp_eq_Bf K n _ (lenP_substM K n O 0 _), si _ hone, ← Gp_eq_Bf K n (mulP K (lin n O i) S) (lenP_mulP K n S hS _ (lenP_linF n O i n)),
    Gp_eq_Bf K n _ (lenP_substM K n O 0 _), ← ta]
  show Gp K (mulP K (linF n O i n) S) = _
  rw [Gp_linF K n O i S hS n (Nat.le_refl n)]
  rw [← mix_chain K n O hO i hi α 0 (by rw [Nat.zero_add, hl]; exact Nat.le_refl n) (one K n) hone]
  refine sumK_extB K _ _ n (fun m hm => ?_)
  rw [Gp_ibp K m S (wide_of_len n m hm S hS), Gp_eq_Bf K n _ (lenP_dP K n m S hS), chain K n O m hm 0 α (one K n) hone]

/-! ### rotation invariance -/

def substP (n : Nat) (O : Nat → Nat → R) : List (Term R) → List (Term R)
  | [] => []
  | t :: p => scaleT K t.1 (substM K n O 0 t.2) ++ substP n O p

theorem Gp_substP1 (n : Nat) (O : Nat → Nat → R) (c : R) (α : List Nat) :
    Gp K (substP K n O [(c, α)]) = K.mul c (Gp K (substM K n O 0 α)) := by
  show Gp K (scaleT K c (substM K n O 0 α) ++ []) = _
  rw [Gp_app, Gp_scale]; show K.add _ K.zero = _; rw [DetChain.add_zero']

theorem Gp_mulP_one (n : Nat) (X : List (Term R)) (hX : LenP n X) : Gp K (mulP K (one K n) X) = Gp K X := by
  rw [Gp_mulP, Bf_comm, ← Gp_eq_Bf K n X hX]

theorem Gp_subst_zeros (n : Nat) (O : Nat → Nat → R) : ∀ (m k : Nat), Gp K (substM K n O k (zerosL m)) = K.one
  | 0, _ => by
    show K.add (K.mul K.one (cN K (GM (zerosL n)))) K.zero = K.one
    rw [GM_zeros, SU2CharExp.cN_one, K.one_mul, DetChain.add_zero']
  | m + 1, k => by
    show Gp K (mulP K (one K n) (substM K n O (k + 1) (zerosL m))) = K.one
    rw [Gp_mulP_one K n _ (lenP_substM K n O (k + 1) _), Gp_subst_zeros n O m (k + 1)]

/-- **Rotation invariance of the Gaussian moments:** for O with orthonormal rows, G(x^α ∘ O) = G(x^α). -/
theorem rot_inv (n : Nat) (O : Nat → Nat → R) (hO : Orth K n O) (α : List Nat) (hl : α.length = n) :
    Gp K (substM K n O 0 α) = cN K (GM α) := by
  have u := unique_mono K (fun p => Gp K (substP K n O p)) n
    (fun c β => by
      show Gp K (substP K n O [(c, β)]) = K.mul c (Gp K (substP K n O [(K.one, β)]))
      rw [Gp_substP1, Gp_substP1, K.one_mul])
    (by show Gp K (substP K n O [(K.one, zerosL n)]) = K.one
        rw [Gp_substP1, K.one_mul, Gp_subst_zeros])
    (fun i β hi hb => by
      show Gp K (substP K n O [(K.one, incAt i β)]) = Gp K (substP K n O [(K.mul K.one (cN K (nthE i β)), decAt i β)])
      rw [Gp_substP1, Gp_substP1, rot_ibp K n O hO β hb i hi, K.one_mul, K.one_mul])
    (sumL α) α hl (Nat.le_refl _)
  have e : Gp K (substP K n O [(K.one, α)]) = Gp K (substM K n O 0 α) := by rw [Gp_substP1, K.one_mul]
  rw [← e]; exact u

end GaussRot

#print axioms GaussRot.rot_ibp
#print axioms GaussRot.rot_inv

ym/GaussSphere.lean

lean_all/ym/GaussSphere.lean

/-
  ym/GaussSphere — T45, H0 step 9: the radial moments of ℝ⁴ and the sphere normalisation of the SU(2) moments.

  r² = Σ_{i<n} x_i² as a term list. For Q homogeneous of degree d in n variables,
    G(Q · r²) = (d + n) · G(Q)                 (each x_i² contributes α_i + 1, Σ_i α_i = d)
  hence on ℝ⁴
    norm_moment     G(|x|^{2k}) = 2^k (k+1)!
    haar_sphere     4^k · G(x₀^{2k}) = mom(2k) · G(|x|^{2k})
  i.e. the SU(2) Haar moments of tr U = 2x₀ (walk counts mom(2k) = C_k, SU2Haar) are the normalised averages
  G((2x₀)^{2k}) / G(|x|^{2k}) of the rotation- and SU(2)-bi-invariant functional G (GaussRot, GaussQuat).
  Lean 4 core only, proofs by hand, no axioms.
-/
import ym.GaussCatalan

namespace GaussSphere

open SU2Char SU2CharExp SU2Haar Gauss GaussPoly GaussSubst GaussRot

variable {R : Type} (K : DetChain.CRing R)

/-! ### Nat bookkeeping -/

def sumN (f : Nat → Nat) : Nat → Nat
  | 0 => 0
  | m + 1 => sumN f m + f m

theorem sumN_shift (f : Nat → Nat) : ∀ m, sumN f (m + 1) = f 0 + sumN (fun i => f (i + 1)) m
  | 0 => by show 0 + f 0 = f 0; exact Nat.zero_add _
  | m + 1 => by
    show sumN f (m + 1) + f (m + 1) = f 0 + (sumN (fun i => f (i + 1)) m + f (m + 1))
    rw [sumN_shift f m]; lib_nat

theorem sum_nth : ∀ α : List Nat, sumN (fun i => nthE i α + 1) α.length = sumL α + α.length
  | [] => rfl
  | a :: α => by
    show sumN (fun i => nthE i (a :: α) + 1) (α.length + 1) = (a + sumL α) + (α.length + 1)
    rw [sumN_shift]
    show (a + 1) + sumN (fun i => nthE i α + 1) α.length = _
    rw [sum_nth α]; lib_nat

theorem nth_inc_self : ∀ (i : Nat) (α : List Nat), i < α.length → nthE i (incAt i α) = nthE i α + 1
  | _, [], h => absurd h (Nat.not_lt_zero _)
  | 0, _ :: _, _ => rfl
  | i + 1, _ :: α, h => nth_inc_self i α (Nat.lt_of_succ_lt_succ h)

theorem dec_inc : ∀ (i : Nat) (α : List Nat), decAt i (incAt i α) = α
  | 0, [] => rfl
  | _ + 1, [] => rfl
  | 0, _ :: _ => rfl
  | i + 1, a :: α => by show a :: decAt i (incAt i α) = a :: α; rw [dec_inc i α]

theorem sum_incAt : ∀ (i : Nat) (α : List Nat), i < α.length → sumL (incAt i α) = sumL α + 1
  | _, [], h => absurd h (Nat.not_lt_zero _)
  | 0, a :: α, _ => by show (a + 1) + sumL α = (a + sumL α) + 1; lib_nat
  | i + 1, a :: α, h => by
    show a + sumL (incAt i α) = (a + sumL α) + 1
    rw [sum_incAt i α (Nat.lt_of_succ_lt_succ h)]; lib_nat

theorem sum_addE : ∀ α β : List Nat, sumL (addE α β) = sumL α + sumL β
  | [], β => (Nat.zero_add _).symm
  | a :: α, [] => rfl
  | a :: α, b :: β => by
    show (a + b) + sumL (addE α β) = (a + sumL α) + (b + sumL β)
    rw [sum_addE α β]; lib_nat

theorem sum_zeros : ∀ n, sumL (zerosL n) = 0
  | 0 => rfl
  | n + 1 => by show 0 + sumL (zerosL n) = 0; rw [sum_zeros n]

/-- G(x_i² x^α) = (α_i + 1) G(x^α) -/
theorem GM_sq (i : Nat) (α : List Nat) (h : i < α.length) : GM (incAt i (incAt i α)) = (nthE i α + 1) * GM α := by
  rw [G_ibp i (incAt i α) (by rw [len_incAt]; exact h), nth_inc_self i α h, dec_inc]

/-! ### r² and homogeneity -/

def sq (n i : Nat) : List Nat := incAt i (unitE n i)

def r2F (n : Nat) : Nat → List (Term R)
  | 0 => []
  | m + 1 => r2F n m ++ [(K.one, sq n m)]

def r2 (n : Nat) : List (Term R) := r2F K n n

theorem addE_sq (n m : Nat) (hm : m < n) (α : List Nat) (hl : α.length = n) : addE α (sq n m) = incAt m (incAt m α) := by
  have hz : (zerosL n).length = n := len_zeros n
  have h1 : m < (incAt m (zerosL n)).length := by rw [len_incAt, hz]; exact hm
  show addE α (incAt m (incAt m (zerosL n))) = _
  rw [← inc_addE m α _ h1 (by rw [len_incAt, hz, hl]), ← inc_addE m α _ (by rw [hz]; exact hm) (by rw [hz, hl]), ← hl,
    addE_zeros]

def HomP (n d : Nat) : List (Term R) → Prop
  | [] => True
  | t :: p => t.2.length = n ∧ sumL t.2 = d ∧ HomP n d p

theorem hom_app (n d : Nat) : ∀ p q : List (Term R), HomP n d p → HomP n d q → HomP n d (p ++ q)
  | [], _, _, hq => hq
  | _ :: p, q, hp, hq => ⟨hp.1, hp.2.1, hom_app n d p q hp.2.2 hq⟩

theorem hom_map (n d e : Nat) (t : Term R) (ht : t.2.length = n) (hs : sumL t.2 = d) :
    ∀ B : List (Term R), HomP n e B → HomP n (d + e) (B.map (mulT K t))
  | [], _ => trivial
  | s :: B, h => ⟨(len_addE t.2 s.2 (ht.trans h.1.symm)).trans ht, by show sumL (addE t.2 s.2) = _; rw [sum_addE, hs, h.2.1],
      hom_map n d e t ht hs B h.2.2⟩

theorem hom_mulP (n d e : Nat) (B : List (Term R)) (hB : HomP n e B) :
    ∀ A : List (Term R), HomP n d A → HomP n (d + e) (mulP K A B)
  | [], _ => trivial
  | t :: A, h => hom_app n _ _ _ (hom_map K n d e t h.1 h.2.1 B hB) (hom_mulP n d e B hB A h.2.2)

theorem hom_r2F (n : Nat) : ∀ m, m ≤ n → HomP n 2 (r2F K n m)
  | 0, _ => trivial
  | m + 1, hm => by
    have hz : (zerosL n).length = n := len_zeros n
    have hu : (unitE n m).length = n := (len_incAt m _).trans hz
    refine hom_app n 2 _ _ (hom_r2F n m (Nat.le_of_succ_le hm)) ⟨(len_incAt m _).trans hu, ?_, trivial⟩
    show sumL (incAt m (incAt m (zerosL n))) = 2
    rw [sum_incAt m _ (by rw [len_incAt, hz]; exact hm), sum_incAt m _ (by rw [hz]; exact hm), sum_zeros]

theorem hom_pow (n : Nat) : ∀ k, HomP n (2 * k) (powP K n (r2 K n) k)
  | 0 => ⟨len_zeros n, sum_zeros n, trivial⟩
  | k + 1 => by
    have := hom_mulP K n (2 * k) 2 (r2 K n) (hom_r2F K n n (Nat.le_refl n)) _ (hom_pow n k)
    rw [show 2 * k + 2 = 2 * (k + 1) by lib_nat] at this
    exact this

/-! ### the radial recursion -/

theorem sumK_cN (f : Nat → Nat) : ∀ m, sumK K (fun i => cN K (f i)) m = cN K (sumN f m)
  | 0 => rfl
  | m + 1 => by
    show K.add (sumK K (fun i => cN K (f i)) m) (cN K (f m)) = cN K (sumN f m + f m)
    rw [sumK_cN f m, cN_add]

theorem row_r2F (n : Nat) (t : Term R) (ht : t.2.length = n) : ∀ m, m ≤ n →
    row K t (r2F K n m) = K.mul (sumK K (fun i => cN K (nthE i t.2 + 1)) m) (K.mul t.1 (cN K (GM t.2)))
  | 0, _ => by show K.zero = K.mul K.zero _; rw [K.mul_comm, DetChain.mul_zero]
  | m + 1, hm => by
    rw [show r2F K n (m + 1) = r2F K n m ++ [(K.one, sq n m)] from rfl, row_app, row_r2F n t ht m (Nat.le_of_succ_le hm)]
    show K.add _ (K.add (K.mul (K.mul t.1 K.one) (cN K (GM (addE t.2 (sq n m))))) K.zero)
      = K.mul (K.add (sumK K (fun i => cN K (nthE i t.2 + 1)) m) (cN K (nthE m t.2 + 1))) _
    rw [addE_sq n m hm t.2 ht, GM_sq m t.2 (by rw [ht]; exact hm), cN_mul]
    generalize sumK K (fun i => cN K (nthE i t.2 + 1)) m = s
    generalize cN K (nthE m t.2 + 1) = a
    generalize cN K (GM t.2) = g
    lib_ring

theorem Gp_mul_r2 (n d : Nat) : ∀ Q : List (Term R), HomP n d Q → Gp K (mulP K Q (r2 K n)) = K.mul (cN K (d + n)) (Gp K Q)
  | [], _ => by show K.zero = K.mul _ K.zero; rw [DetChain.mul_zero]
  | t :: Q, h => by
    rw [Gp_mulP]
    show K.add (row K t (r2 K n)) (Bf K Q (r2 K n)) = K.mul (cN K (d + n)) (K.add (K.mul t.1 (cN K (GM t.2))) (Gp K Q))
    rw [← Gp_mulP, Gp_mul_r2 n d Q h.2.2]
    show K.add (row K t (r2F K n n)) _ = _
    rw [row_r2F K n t h.1 n (Nat.le_refl n), sumK_cN, ← h.1, sum_nth, h.2.1, h.1]
    generalize cN K (d + n) = c
    generalize Gp K Q = q
    generalize K.mul t.1 (cN K (GM t.2)) = g
    lib_ring

/-- **Radial moments of ℝ⁴:** G(|x|^{2k}) = 2^k (k+1)!. -/
theorem norm_moment : ∀ k, Gp K (powP K 4 (r2 K 4) k) = cN K (2 ^ k * fact (k + 1))
  | 0 => by
    show K.add (K.mul K.one (cN K (GM (zerosL 4)))) K.zero = cN K 1
    rw [GM_zeros, cN_one, K.one_mul, DetChain.add_zero']
  | k + 1 => by
    show Gp K (mulP K (powP K 4 (r2 K 4) k) (r2 K 4)) = _
    rw [Gp_mul_r2 K 4 (2 * k) _ (hom_pow K 4 k), norm_moment k, ← cN_mul]
    congr 1
    show (2 * k + 4) * (2 ^ k * fact (k + 1)) = 2 ^ k * 2 * (fact (k + 1) * (k + 1 + 1))
    generalize 2 ^ k = p
    generalize fact (k + 1) = f
    lib_nat

theorem pow4 : ∀ k : Nat, 4 ^ k = 2 ^ k * 2 ^ k
  | 0 => rfl
  | k + 1 => by
    show 4 ^ k * 4 = 2 ^ k * 2 * (2 ^ k * 2)
    rw [pow4 k]; generalize 2 ^ k = p; lib_nat

/-- **The SU(2) Haar moments are the normalised Gaussian averages on ℝ⁴:**
    4^k · G(x₀^{2k}) = mom(2k) · G(|x|^{2k}),   i.e.  ∫ (tr U)^{2k} dU = G((2x₀)^{2k}) / G(|x|^{2k}). -/
theorem haar_sphere (k : Nat) :
    K.mul (cN K (4 ^ k)) (Gp K [(K.one, [2 * k, 0, 0, 0])]) = K.mul (cN K (mom (2 * k))) (Gp K (powP K 4 (r2 K 4) k)) := by
  rw [norm_moment, ← cN_mul]
  show K.mul (cN K (4 ^ k)) (K.add (K.mul K.one (cN K (gm (2 * k) * (1 * (1 * (1 * 1)))))) K.zero) = _
  rw [K.one_mul, DetChain.add_zero', ← cN_mul]
  congr 1
  rw [pow4]
  have c := GaussCatalan.catalan_gauss k
  generalize 2 ^ k = p at c ⊢
  generalize gm (2 * k) = g at c ⊢
  generalize mom (2 * k) = M at c ⊢
  generalize fact (k + 1) = f at c ⊢
  calc p * p * (g * (1 * (1 * (1 * 1)))) = p * (p * g) := by lib_nat
    _ = p * (M * f) := by rw [c]
    _ = M * (p * f) := by lib_nat

end GaussSphere

#print axioms GaussSphere.norm_moment
#print axioms GaussSphere.haar_sphere

ym/GaussSubst.lean

lean_all/ym/GaussSubst.lean

/-
  ym/GaussSubst — T45, H0 step 4: linear forms, their powers and derivatives (up to test-equivalence).

  n variables, a matrix O (entries O k j). Unit exponents e_j = incAt j 0, the constant polynomial one = [(1, 0)],
    lin O k  = Σ_{j<n} O_kj x_j,   powP L a = L^a.
    dP_unit         ∂_j x_m = δ_{jm}
    dP_lin          ∂_j L_k ≡ O_kj · 1
    scale_mulP      (c·A)·B = c·(A·B)
    dP_pow          ∂_j L^{a+1} ≡ (a+1) · L^a · ∂_j L
  Lean 4 core only, proofs by hand, no axioms.
-/
import ym.GaussPoly

namespace GaussSubst

open SU2Char Gauss GaussPoly

variable {R : Type} (K : DetChain.CRing R)

theorem nth_zeros : ∀ (j n : Nat), nthE j (zerosL n) = 0
  | 0, 0 => rfl
  | _ + 1, 0 => rfl
  | 0, _ + 1 => rfl
  | j + 1, n + 1 => nth_zeros j n

theorem len_zeros : ∀ n, (zerosL n).length = n
  | 0 => rfl
  | n + 1 => congrArg Nat.succ (len_zeros n)

/-- x_m as an exponent list -/
def unitE (n m : Nat) : List Nat := incAt m (zerosL n)

theorem nth_unit_self : ∀ (n m : Nat), m < n → nthE m (unitE n m) = 1
  | 0, _, h => absurd h (Nat.not_lt_zero _)
  | _ + 1, 0, _ => rfl
  | n + 1, m + 1, h => nth_unit_self n m (Nat.lt_of_succ_lt_succ h)

theorem nth_unit_ne : ∀ (n m j : Nat), j ≠ m → nthE j (unitE n m) = 0
  | 0, 0, 0, h => absurd rfl h
  | 0, 0, _ + 1, _ => rfl
  | 0, _ + 1, 0, _ => rfl
  | 0, _ + 1, _ + 1, _ => rfl
  | _ + 1, 0, 0, h => absurd rfl h
  | n + 1, 0, j + 1, _ => nth_zeros j n
  | n + 1, m + 1, 0, _ => rfl
  | n + 1, m + 1, j + 1, h => nth_unit_ne n m j (fun e => h (by rw [e]))

theorem dec_unit_self : ∀ (n m : Nat), m < n → decAt m (unitE n m) = zerosL n
  | 0, _, h => absurd h (Nat.not_lt_zero _)
  | _ + 1, 0, _ => rfl
  | n + 1, m + 1, h => by
    show 0 :: decAt m (unitE n m) = 0 :: zerosL n
    rw [dec_unit_self n m (Nat.lt_of_succ_lt_succ h)]

def one (n : Nat) : List (Term R) := [(K.one, zerosL n)]

def linF (n : Nat) (O : Nat → Nat → R) (k : Nat) : Nat → List (Term R)
  | 0 => []
  | m + 1 => linF n O k m ++ [(O k m, unitE n m)]

def lin (n : Nat) (O : Nat → Nat → R) (k : Nat) : List (Term R) := linF n O k n

def powP (n : Nat) (L : List (Term R)) : Nat → List (Term R)
  | 0 => one K n
  | a + 1 => mulP K (powP n L a) L

theorem app_nil {α : Type} : ∀ L : List α, L ++ [] = L
  | [] => rfl
  | x :: L => by show x :: (L ++ []) = x :: L; rw [app_nil L]

theorem eqv_zero_term (n : Nat) (δ : List Nat) : Eqv K n [(K.zero, δ)] [] := fun r _ => by
  rw [Bf_single, row_zero_coef]; rfl

theorem dP_app' (j : Nat) (L1 L2 : List (Term R)) : dP K j (L1 ++ L2) = dP K j L1 ++ dP K j L2 := dP_app K j L1 L2

/-- **∂_j of the m-term partial linear form.** -/
theorem dP_linF (n : Nat) (O : Nat → Nat → R) (k j : Nat) (hj : j < n) : ∀ m, m ≤ n →
    Eqv K n (dP K j (linF n O k m)) (if j < m then scaleT K (O k j) (one K n) else [])
  | 0, _ => by
    show Eqv K n [] (if j < 0 then _ else [])
    rw [MaskSum.ineg (Nat.not_lt_zero j)]; exact eqv_refl K n _
  | m + 1, hm => by
    show Eqv K n (dP K j (linF n O k m ++ [(O k m, unitE n m)])) _
    rw [dP_app']
    have ih := dP_linF n O k j hj m (Nat.le_of_succ_le hm)
    by_cases e : j = m
    · -- the new term is ∂_j x_j = 1
      have nl : ¬ j < m := by rw [e]; exact Nat.lt_irrefl m
      rw [MaskSum.ineg nl] at ih
      rw [MaskSum.ip (show j < m + 1 by rw [e]; exact Nat.lt_succ_self m)]
      have t : dP K j [(O k m, unitE n m)] = scaleT K (O k j) (one K n) := by
        show [(K.mul (O k m) (cN K (nthE j (unitE n m))), decAt j (unitE n m))] = [(K.mul (O k j) K.one, zerosL n)]
        rw [e, nth_unit_self n m (by rw [← e]; exact hj), dec_unit_self n m (by rw [← e]; exact hj), SU2CharExp.cN_one]
      rw [t]
      exact eqv_app K n _ _ _ _ ih (eqv_refl K n _)
    · have t : Eqv K n (dP K j [(O k m, unitE n m)]) [] := by
        show Eqv K n [(K.mul (O k m) (cN K (nthE j (unitE n m))), decAt j (unitE n m))] []
        rw [nth_unit_ne n m j e, show cN K 0 = K.zero from rfl, DetChain.mul_zero]
        exact eqv_zero_term K n _
      have h2 := eqv_app K n _ _ _ _ ih t
      by_cases hl : j < m
      · rw [MaskSum.ip hl] at h2; rw [MaskSum.ip (Nat.lt_succ_of_lt hl)]
        refine eqv_trans K n _ _ _ h2 ?_
        rw [app_nil]; exact eqv_refl K n _
      · rw [MaskSum.ineg hl] at h2
        rw [MaskSum.ineg (fun h => hl (Nat.lt_of_le_of_ne (Nat.le_of_lt_succ h) e))]
        exact h2

/-- **∂_j L_k ≡ O_kj.** -/
theorem dP_lin (n : Nat) (O : Nat → Nat → R) (k j : Nat) (hj : j < n) :
    Eqv K n (dP K j (lin n O k)) (scaleT K (O k j) (one K n)) := by
  have := dP_linF K n O k j hj n (Nat.le_refl n)
  rw [MaskSum.ip hj] at this; exact this

theorem len_unit (n m : Nat) : (unitE n m).length = n := (len_incAt m (zerosL n)).trans (len_zeros n)

theorem lenP_one (n : Nat) : LenP n (one K n) := ⟨len_zeros n, trivial⟩

theorem lenP_linF (n : Nat) (O : Nat → Nat → R) (k : Nat) : ∀ m, LenP n (linF n O k m)
  | 0 => trivial
  | m + 1 => lenP_app n _ _ (lenP_linF n O k m) ⟨len_unit n m, trivial⟩

theorem lenP_pow (n : Nat) (L : List (Term R)) (hL : LenP n L) : ∀ a, LenP n (powP K n L a)
  | 0 => lenP_one K n
  | a + 1 => lenP_mulP K n L hL _ (lenP_pow n L hL a)

theorem lenP_scale (n : Nat) (c : R) : ∀ p : List (Term R), LenP n p → LenP n (scaleT K c p)
  | [], _ => trivial
  | _ :: p, h => ⟨h.1, lenP_scale n c p h.2⟩

theorem scale_map (c : R) (t : Term R) : ∀ B : List (Term R), B.map (mulT K (K.mul c t.1, t.2)) = scaleT K c (B.map (mulT K t))
  | [] => rfl
  | s :: B => by
    show (K.mul (K.mul c t.1) s.1, addE t.2 s.2) :: _ = (K.mul c (K.mul t.1 s.1), addE t.2 s.2) :: _
    rw [K.mul_assoc, scale_map c t B]
    rfl

theorem scale_app (c : R) (L1 L2 : List (Term R)) : scaleT K c (L1 ++ L2) = scaleT K c L1 ++ scaleT K c L2 :=
  map_app' _ L1 L2

/-- **(c·A)·B = c·(A·B).** -/
theorem scale_mulP (c : R) (B : List (Term R)) : ∀ A : List (Term R), mulP K (scaleT K c A) B = scaleT K c (mulP K A B)
  | [] => rfl
  | t :: A => by
    show B.map (mulT K (K.mul c t.1, t.2)) ++ mulP K (scaleT K c A) B = scaleT K c (B.map (mulT K t) ++ mulP K A B)
    rw [scale_map, scale_mulP c B A, scale_app]

theorem eqv_scale_one (n : Nat) (p : List (Term R)) : Eqv K n (scaleT K K.one p) p := fun r _ => by
  rw [Bf_scale, K.one_mul]

theorem eqv_add_scale (n : Nat) (c : R) (p : List (Term R)) : Eqv K n (scaleT K c p ++ p) (scaleT K (K.add c K.one) p) :=
  fun r _ => by rw [Bf_app_l, Bf_scale, Bf_scale]; lib_ring

theorem dP_one (n j : Nat) : Eqv K n (dP K j (one K n)) [] := by
  show Eqv K n [(K.mul K.one (cN K (nthE j (zerosL n))), decAt j (zerosL n))] []
  rw [nth_zeros, show cN K 0 = K.zero from rfl, DetChain.mul_zero]
  exact eqv_zero_term K n _

theorem mulP_nil (B : List (Term R)) : mulP K [] B = [] := rfl

/-- **∂_j L^{a+1} ≡ (a+1) · L^a · ∂_j L.** -/
theorem dP_pow (n j : Nat) (L : List (Term R)) (hL : LenP n L) : ∀ a,
    Eqv K n (dP K j (powP K n L (a + 1))) (scaleT K (cN K (a + 1)) (mulP K (powP K n L a) (dP K j L)))
  | 0 => by
    show Eqv K n (dP K j (mulP K (one K n) L)) _
    refine eqv_trans K n _ _ _ (leib_eqv K n j (one K n) L) ?_
    have h1 : Eqv K n (mulP K (dP K j (one K n)) L) [] := by
      have := eqv_mul_r K n _ [] L hL (dP_one K n j)
      rw [mulP_nil] at this; exact this
    have h2 := eqv_app K n _ _ _ _ h1 (eqv_refl K n (mulP K (one K n) (dP K j L)))
    refine eqv_trans K n _ _ _ h2 ?_
    show Eqv K n (mulP K (one K n) (dP K j L)) (scaleT K (K.add K.one K.zero) (mulP K (one K n) (dP K j L)))
    rw [DetChain.add_zero']
    exact eqv_symm K n _ _ (eqv_scale_one K n _)
  | a + 1 => by
    have ih := dP_pow n j L hL a
    let P := powP K n L a
    let dL := dP K j L
    have hP := lenP_pow K n L hL a
    have hdL := lenP_dP K n j L hL
    show Eqv K n (dP K j (mulP K (powP K n L (a + 1)) L)) _
    refine eqv_trans K n _ _ _ (leib_eqv K n j _ L) ?_
    -- first summand
    have s1 : Eqv K n (mulP K (dP K j (powP K n L (a + 1))) L) (scaleT K (cN K (a + 1)) (mulP K (powP K n L (a + 1)) dL)) := by
      refine eqv_trans K n _ _ _ (eqv_mul_r K n _ _ L hL ih) ?_
      rw [scale_mulP]
      refine eqv_scale K n _ _ _ ?_
      refine eqv_trans K n _ _ _ (eqv_mul_assoc K n P dL L) ?_
      refine eqv_trans K n _ _ _ (eqv_mul_l K n _ _ P hP (eqv_mul_comm K n dL L)) ?_
      exact eqv_symm K n _ _ (eqv_mul_assoc K n P L dL)
    refine eqv_trans K n _ _ _ (eqv_app K n _ _ _ _ s1 (eqv_refl K n _)) ?_
    have := eqv_add_scale K n (cN K (a + 1)) (mulP K (powP K n L (a + 1)) dL)
    have e : cN K (a + 1 + 1) = K.add (cN K (a + 1)) K.one := by
      show K.add K.one (cN K (a + 1)) = _; rw [K.add_comm]
    rw [e]; exact this

/-! ### substitution of monomials and the chain rule -/

/-- x^α ↦ Π_i L_{k+i}^{α_i} -/
def substM (n : Nat) (O : Nat → Nat → R) : Nat → List Nat → List (Term R)
  | _, [] => one K n
  | k, a :: α => mulP K (powP K n (lin n O k) a) (substM n O (k + 1) α)

theorem lenP_substM (n : Nat) (O : Nat → Nat → R) : ∀ (k : Nat) (α : List Nat), LenP n (substM K n O k α)
  | _, [] => lenP_one K n
  | k, a :: α => lenP_mulP K n _ (lenP_substM n O (k + 1) α) _ (lenP_pow K n _ (lenP_linF n O k n) a)

theorem scale_scale (c d : R) (p : List (Term R)) : scaleT K c (scaleT K d p) = scaleT K (K.mul c d) p := by
  induction p with
  | nil => rfl
  | cons t p ih => show (K.mul c (K.mul d t.1), t.2) :: scaleT K c (scaleT K d p) = (K.mul (K.mul c d) t.1, t.2) :: scaleT K (K.mul c d) p; rw [ih, K.mul_assoc]

theorem map_mulT_scale (c : R) (t : Term R) : ∀ B : List (Term R), (scaleT K c B).map (mulT K t) = scaleT K c (B.map (mulT K t))
  | [] => rfl
  | s :: B => by
    show (K.mul t.1 (K.mul c s.1), addE t.2 s.2) :: (scaleT K c B).map (mulT K t)
      = (K.mul c (K.mul t.1 s.1), addE t.2 s.2) :: scaleT K c (B.map (mulT K t))
    rw [map_mulT_scale c t B]
    have : K.mul t.1 (K.mul c s.1) = K.mul c (K.mul t.1 s.1) := by lib_ring
    rw [this]

/-- A·(c·B) = c·(A·B) -/
theorem mulP_scale_r (c : R) (B : List (Term R)) : ∀ A : List (Term R), mulP K A (scaleT K c B) = scaleT K c (mulP K A B)
  | [] => rfl
  | t :: A => by
    show (scaleT K c B).map (mulT K t) ++ mulP K A (scaleT K c B) = scaleT K c (B.map (mulT K t) ++ mulP K A B)
    rw [map_mulT_scale, mulP_scale_r c B A, scale_app]

theorem eqv_scale_zero (n : Nat) (p : List (Term R)) : Eqv K n (scaleT K K.zero p) [] := fun r _ => by
  rw [Bf_scale, K.mul_comm, DetChain.mul_zero]; rfl

theorem addE_zeros : ∀ (α : List Nat), addE α (zerosL α.length) = α
  | [] => rfl
  | a :: α => by show (a + 0) :: addE α (zerosL α.length) = a :: α; rw [addE_zeros α]; rfl

theorem mulP_one (n : Nat) : ∀ p : List (Term R), LenP n p → mulP K p (one K n) = scaleT K K.one p
  | [], _ => rfl
  | t :: p, h => by
    show (K.mul t.1 K.one, addE t.2 (zerosL n)) :: mulP K p (one K n) = (K.mul K.one t.1, t.2) :: scaleT K K.one p
    rw [show addE t.2 (zerosL n) = t.2 by rw [← h.1, addE_zeros], mulP_one n p h.2, K.mul_comm t.1 K.one]

/-- the chain-rule right-hand side Σ_i O_{k+i,j} α_i · substM k (α − e_i) -/
def chainT (n : Nat) (O : Nat → Nat → R) (j : Nat) : Nat → List Nat → List (Term R)
  | _, [] => []
  | k, a :: α => scaleT K (K.mul (O k j) (cN K a)) (substM K n O k ((a - 1) :: α)) ++
      mulP K (powP K n (lin n O k) a) (chainT n O j (k + 1) α)

/-- **Chain rule** ∂_j (x^α ∘ O) ≡ Σ_i O_{k+i,j} α_i (x^{α−e_i} ∘ O). -/
theorem chain (n : Nat) (O : Nat → Nat → R) (j : Nat) (hj : j < n) :
    ∀ (k : Nat) (α : List Nat), Eqv K n (dP K j (substM K n O k α)) (chainT K n O j k α)
  | _, [] => dP_one K n j
  | k, a :: α => by
    have ih := chain n O j hj (k + 1) α
    let L := lin n O k
    have hL : LenP n L := lenP_linF n O k n
    let S := substM K n O (k + 1) α
    have hS : LenP n S := lenP_substM K n O (k + 1) α
    show Eqv K n (dP K j (mulP K (powP K n L a) S)) _
    refine eqv_trans K n _ _ _ (leib_eqv K n j _ S) ?_
    refine eqv_app K n _ _ _ _ ?_ (eqv_mul_l K n _ _ _ (lenP_pow K n L hL a) ih)
    cases a with
    | zero =>
      have h1 : Eqv K n (mulP K (dP K j (one K n)) S) [] := by
        have := eqv_mul_r K n _ [] S hS (dP_one K n j); rw [mulP_nil] at this; exact this
      refine eqv_trans K n _ _ _ h1 (eqv_symm K n _ _ ?_)
      show Eqv K n (scaleT K (K.mul (O k j) K.zero) _) []
      rw [DetChain.mul_zero]; exact eqv_scale_zero K n _
    | succ b =>
      -- ∂_j L^{b+1} · S ≡ (b+1) L^b (O_kj · 1) S ≡ O_kj (b+1) L^b S
      have d1 := eqv_mul_r K n _ _ S hS (dP_pow K n j L hL b)
      refine eqv_trans K n _ _ _ d1 ?_
      rw [scale_mulP]
      have d2 : Eqv K n (mulP K (mulP K (powP K n L b) (dP K j L)) S)
          (mulP K (mulP K (powP K n L b) (scaleT K (O k j) (one K n))) S) :=
        eqv_mul_r K n _ _ S hS (eqv_mul_l K n _ _ _ (lenP_pow K n L hL b) (dP_lin K n O k j hj))
      refine eqv_trans K n _ _ _ (eqv_scale K n _ _ _ d2) ?_
      rw [mulP_scale_r, mulP_one K n _ (lenP_pow K n L hL b), scale_mulP, scale_mulP, scale_scale, scale_scale]
      show Eqv K n (scaleT K (K.mul (K.mul (cN K (b + 1)) (O k j)) K.one) (mulP K (powP K n L b) S))
        (scaleT K (K.mul (O k j) (cN K (b + 1))) (mulP K (powP K n L b) S))
      have e : K.mul (K.mul (cN K (b + 1)) (O k j)) K.one = K.mul (O k j) (cN K (b + 1)) := by lib_ring
      rw [e]; exact eqv_refl K n _

end GaussSubst

#print axioms GaussSubst.dP_lin
#print axioms GaussSubst.dP_pow
#print axioms GaussSubst.chain

ym/GaussTailR.lean

lean_all/ym/GaussTailR.lean

/-
  ym/GaussTailR — T45, G78m route (f), part 6e(b): neighbouring half-lattice Gaussian tails
    G(m, T) = Σ_{t<T} Q^{(m+2t)²}      (B_n = G(n+2, T)),   0 ≤ Q ≤ 1:
    tail_up    G(m+1, T) ≤ Q^{2m+1} · G(m, T)
    tail_low   G(m, T+1) ≤ Q^{m²} + G(m+1, T)
  Lean 4 core only, no axioms.
-/
import ym.HeatOddB
import ym.ConeBound

namespace GaussTailR

open YMChain LinkIntegral SU2Char MigdalCone

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

def G (Q : R) (m T : Nat) : R := QBinom.sumN K (fun t => pwR K Q ((m + 2 * t) * (m + 2 * t))) T

theorem tail_up (h1 : O.le K.zero K.one) (Q : R) (hQ0 : O.le K.zero Q) (hQ1 : O.le Q K.one) (m T : Nat) :
    O.le (G K Q (m + 1) T) (K.mul (pwR K Q (2 * m + 1)) (G K Q m T)) := by
  show O.le (QBinom.sumN K _ T) (K.mul _ (QBinom.sumN K _ T))
  rw [← QBinom.sumN_mul]
  exact TripleE.sumN_mono_lt K O _ _ T (fun t _ => by
    show O.le (pwR K Q ((m + 1 + 2 * t) * (m + 1 + 2 * t)))
      (K.mul (pwR K Q (2 * m + 1)) (pwR K Q ((m + 2 * t) * (m + 2 * t))))
    rw [← GKS.pwR_add]
    exact ConeBound.pw_anti K O h1 Q hQ0 hQ1 _ _ (by
      rw [show (m + 1 + 2 * t) * (m + 1 + 2 * t) = (2 * m + 1 + (m + 2 * t) * (m + 2 * t)) + 4 * t by lib_nat]
      exact Nat.le_add_right _ _))

theorem tail_low (h1 : O.le K.zero K.one) (Q : R) (hQ0 : O.le K.zero Q) (hQ1 : O.le Q K.one) (m T : Nat) :
    O.le (G K Q m (T + 1)) (K.add (pwR K Q (m * m)) (G K Q (m + 1) T)) := by
  show O.le (QBinom.sumN K _ (T + 1)) _
  rw [ThetaDup2.sumN_front]
  exact O.add_le_add _ _ _ _ (by rw [show m + 2 * 0 = m by lib_nat]; exact O.le_refl _)
    (TripleE.sumN_mono_lt K O _ _ T (fun t _ => by
      show O.le (pwR K Q ((m + 2 * (t + 1)) * (m + 2 * (t + 1)))) (pwR K Q ((m + 1 + 2 * t) * (m + 1 + 2 * t)))
      exact ConeBound.pw_anti K O h1 Q hQ0 hQ1 _ _ (by
        rw [show (m + 2 * (t + 1)) * (m + 2 * (t + 1)) = (m + 1 + 2 * t) * (m + 1 + 2 * t) + (2 * m + 4 * t + 3) by lib_nat]
        exact Nat.le_add_right _ _)))

end GaussTailR

#print axioms GaussTailR.tail_up
#print axioms GaussTailR.tail_low

ym/GaussVar.lean

lean_all/ym/GaussVar.lean

/-
  ym/GaussVar — T45, G78m 6f-A′-1: the discrete Gaussian second moment is at most 1/(1 − y²).
    gs       gs t n = Σ_{i<n} t^{2i}  (gs t (n+1) = 1 + t² gs t n)
    gs_top   gs t (n+1) = gs t n + t^{2n}
    amgm1    2 t^m ≤ 1 + t^{2m}
    gs_low   (n + 1) t^n ≤ gs t (n + 1)            (AM–GM, step n → n + 2)
    gs_mul   (1 − t²) gs t n = 1 − t^{2n}
    pair     2 m² (1 − y²) y^{m²} ≤ m (y^{(m−1)²} − y^{(m+1)²})   (m = N + 1)
    var_le   (1 − y²) Σ_{m=1}^{N} 2 m² y^{m²} + (N+1) y^{N²} + N y^{(N+1)²} ≤ ϑ₃⁽ᴺ⁾(y) = U_N(y^{c²})
  The identity behind var_le is the telescoping ϑ₃⁽ᴺ⁾ − (boundary) = Σ_{m ≤ N} m (y^{(m−1)²} − y^{(m+1)²});
  each term dominates 2m²(1 − y²) y^{m²} by AM–GM on the pairs y^{2i}, y^{2(2m−1−i)}.
  Lean 4 core only, no axioms.
-/
import ym.ThetaLow
import ym.ThetaBound
import ym.GKS
import ym.SU2CharExp

namespace GaussVar

open YMChain LinkIntegral SU2Char

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

/-- gs t n = Σ_{i<n} t^{2i} -/
def gs (t : R) : Nat → R
  | 0 => K.zero
  | n + 1 => K.add K.one (K.mul (K.mul t t) (gs t n))

/-- t^{2(n+1)} = t² t^{2n} -/
theorem pw2 (t : R) (n : Nat) : pwR K t (2 * (n + 1)) = K.mul (K.mul t t) (pwR K t (2 * n)) := by
  rw [show 2 * (n + 1) = 2 * n + 2 by lib_nat, GKS.pwR_add K t (2 * n) 2]
  show K.mul (pwR K t (2 * n)) (K.mul (K.mul K.one t) t) = _
  generalize pwR K t (2 * n) = p
  lib_ring

/-- gs t (n+1) = gs t n + t^{2n} -/
theorem gs_top (t : R) : ∀ n, gs K t (n + 1) = K.add (gs K t n) (pwR K t (2 * n))
  | 0 => by
    show K.add K.one (K.mul (K.mul t t) K.zero) = K.add K.zero K.one
    lib_ring
  | n + 1 => by
    show K.add K.one (K.mul (K.mul t t) (gs K t (n + 1))) = K.add (gs K t (n + 1)) (pwR K t (2 * (n + 1)))
    rw [pw2 K t n]
    show K.add K.one (K.mul (K.mul t t) (gs K t (n + 1)))
      = K.add (K.add K.one (K.mul (K.mul t t) (gs K t n))) (K.mul (K.mul t t) (pwR K t (2 * n)))
    rw [gs_top t n]
    generalize gs K t n = g
    generalize pwR K t (2 * n) = p
    lib_ring

/-- AM–GM: 2 t^m ≤ 1 + t^{2m} -/
theorem amgm1 (t : R) (m : Nat) :
    O.le (K.mul (AltDiff.two K) (pwR K t m)) (K.add K.one (pwR K t (2 * m))) := by
  apply ThetaLow.le_of_sub K O
  have e : K.add (K.add K.one (pwR K t (2 * m))) (K.neg (K.mul (AltDiff.two K) (pwR K t m)))
      = K.mul (K.add K.one (K.neg (pwR K t m))) (K.add K.one (K.neg (pwR K t m))) := by
    rw [show 2 * m = m + m by lib_nat, GKS.pwR_add K t m m]
    show K.add (K.add K.one (K.mul (pwR K t m) (pwR K t m))) (K.neg (K.mul (K.add K.one K.one) (pwR K t m))) = _
    generalize pwR K t m = p
    lib_ring
  rw [e]
  exact ThetaBound.sq_nn K O _

/-- **(n + 1) t^n ≤ Σ_{i ≤ n} t^{2i}** for 0 ≤ t -/
theorem gs_low (t : R) (ht : O.le K.zero t) : ∀ n, O.le (K.mul (cN K (n + 1)) (pwR K t n)) (gs K t (n + 1))
  | 0 => by
    have e : K.mul (cN K (0 + 1)) (pwR K t 0) = gs K t (0 + 1) := by
      show K.mul (K.add K.one K.zero) K.one = K.add K.one (K.mul (K.mul t t) K.zero)
      lib_ring
    rw [e]; exact O.le_refl _
  | 1 => by
    have a := amgm1 K O t 1
    have e1 : K.mul (AltDiff.two K) (pwR K t 1) = K.mul (cN K (1 + 1)) (pwR K t 1) := by
      show K.mul (K.add K.one K.one) (pwR K t 1) = K.mul (K.add K.one (K.add K.one K.zero)) (pwR K t 1)
      generalize pwR K t 1 = p
      lib_ring
    have e2 : K.add K.one (pwR K t (2 * 1)) = gs K t (1 + 1) := by
      show K.add K.one (K.mul (K.mul K.one t) t) = K.add K.one (K.mul (K.mul t t) (K.add K.one (K.mul (K.mul t t) K.zero)))
      lib_ring
    rw [e1, e2] at a
    exact a
  | n + 2 => by
    have a := amgm1 K O t (n + 2)
    have b := O.mul_le_mul_right _ _ _ (gs_low t ht n) (O.mul_nonneg _ _ ht ht)
    have c := O.add_le_add _ _ _ _ a b
    have eL : K.add (K.mul (AltDiff.two K) (pwR K t (n + 2))) (K.mul (K.mul (cN K (n + 1)) (pwR K t n)) (K.mul t t))
        = K.mul (cN K (n + 2 + 1)) (pwR K t (n + 2)) := by
      show K.add (K.mul (K.add K.one K.one) (K.mul (K.mul (pwR K t n) t) t)) (K.mul (K.mul (cN K (n + 1)) (pwR K t n)) (K.mul t t))
        = K.mul (K.add K.one (K.add K.one (cN K (n + 1)))) (K.mul (K.mul (pwR K t n) t) t)
      generalize pwR K t n = p
      generalize cN K (n + 1) = q
      lib_ring
    have eR : K.add (K.add K.one (pwR K t (2 * (n + 2)))) (K.mul (gs K t (n + 1)) (K.mul t t))
        = gs K t (n + 2 + 1) := by
      show K.add (K.add K.one (pwR K t (2 * (n + 1 + 1)))) (K.mul (gs K t (n + 1)) (K.mul t t))
        = K.add K.one (K.mul (K.mul t t) (gs K t (n + 1 + 1)))
      rw [gs_top K t (n + 1), pw2 K t (n + 1)]
      generalize gs K t (n + 1) = g
      generalize pwR K t (2 * (n + 1)) = p
      lib_ring
    rw [eL, eR] at c
    exact c

/-- (1 − t²) gs t n = 1 − t^{2n} -/
theorem gs_mul (t : R) : ∀ n, K.mul (K.add K.one (K.neg (K.mul t t))) (gs K t n) = K.add K.one (K.neg (pwR K t (2 * n)))
  | 0 => by
    show K.mul (K.add K.one (K.neg (K.mul t t))) K.zero = K.add K.one (K.neg K.one)
    lib_ring
  | n + 1 => by
    show K.mul (K.add K.one (K.neg (K.mul t t))) (K.add K.one (K.mul (K.mul t t) (gs K t n)))
      = K.add K.one (K.neg (pwR K t (2 * (n + 1))))
    have ih := gs_mul t n
    rw [pw2 K t n]
    have e : K.mul (K.add K.one (K.neg (K.mul t t))) (K.add K.one (K.mul (K.mul t t) (gs K t n)))
        = K.add (K.add K.one (K.neg (K.mul t t)))
            (K.mul (K.mul t t) (K.mul (K.add K.one (K.neg (K.mul t t))) (gs K t n))) := by
      generalize gs K t n = g
      lib_ring
    rw [e, ih]
    generalize pwR K t (2 * n) = p
    lib_ring

/-- **pair**: 2 (N+1)² (1 − y²) y^{(N+1)²} ≤ (N+1) (y^{N²} − y^{(N+2)²}) for 0 ≤ y ≤ 1 -/
theorem pair (h1 : O.le K.zero K.one) (y : R) (hy0 : O.le K.zero y) (hy1 : O.le y K.one) (N : Nat) :
    O.le (K.mul (AltDiff.two K) (K.mul (K.mul (cN K (N + 1)) (cN K (N + 1)))
        (K.mul (K.add K.one (K.neg (K.mul y y))) (pwR K y ((N + 1) * (N + 1))))))
      (K.mul (cN K (N + 1)) (K.add (pwR K y (N * N)) (K.neg (pwR K y ((N + 1 + 1) * (N + 1 + 1)))))) := by
  have hyy : O.le (K.mul y y) K.one := by
    have := O.mul_le_mul_right _ _ _ hy1 hy0
    rw [show K.mul K.one y = y by lib_ring] at this
    exact O.le_trans _ _ _ this hy1
  have h1y : O.le K.zero (K.add K.one (K.neg (K.mul y y))) := AltSum.le_sub K O _ _ hyy
  have g := gs_low K O y hy0 (2 * N + 1)
  have g1 := O.mul_le_mul_right _ _ _ g h1y
  have g2 := O.mul_le_mul_right _ _ _ g1 (ThetaDup5.pw_nn K O y hy0 h1 (N * N))
  have g3 := O.mul_le_mul_right _ _ _ g2 (SU2CharExp.cN_nn K O h1 (N + 1))
  have eL : K.mul (K.mul (K.mul (K.mul (cN K (2 * N + 1 + 1)) (pwR K y (2 * N + 1))) (K.add K.one (K.neg (K.mul y y))))
        (pwR K y (N * N))) (cN K (N + 1))
      = K.mul (AltDiff.two K) (K.mul (K.mul (cN K (N + 1)) (cN K (N + 1)))
        (K.mul (K.add K.one (K.neg (K.mul y y))) (pwR K y ((N + 1) * (N + 1))))) := by
    rw [show 2 * N + 1 + 1 = (N + 1) + (N + 1) by lib_nat, SU2Char.cN_add K (N + 1),
      show (N + 1) * (N + 1) = N * N + (2 * N + 1) by lib_nat, GKS.pwR_add K y (N * N) (2 * N + 1)]
    show _ = K.mul (K.add K.one K.one) _
    generalize cN K (N + 1) = c
    generalize pwR K y (2 * N + 1) = p
    generalize pwR K y (N * N) = q
    lib_ring
  have eR : K.mul (K.mul (K.mul (gs K y (2 * N + 1 + 1)) (K.add K.one (K.neg (K.mul y y)))) (pwR K y (N * N))) (cN K (N + 1))
      = K.mul (cN K (N + 1)) (K.add (pwR K y (N * N)) (K.neg (pwR K y ((N + 1 + 1) * (N + 1 + 1))))) := by
    have m := gs_mul K y (2 * N + 1 + 1)
    have e1 : K.mul (K.mul (K.mul (gs K y (2 * N + 1 + 1)) (K.add K.one (K.neg (K.mul y y)))) (pwR K y (N * N))) (cN K (N + 1))
        = K.mul (K.mul (K.mul (K.add K.one (K.neg (K.mul y y))) (gs K y (2 * N + 1 + 1))) (pwR K y (N * N))) (cN K (N + 1)) := by
      generalize gs K y (2 * N + 1 + 1) = g
      lib_ring
    rw [e1, m, show (N + 1 + 1) * (N + 1 + 1) = N * N + 2 * (2 * N + 1 + 1) by lib_nat, GKS.pwR_add K y (N * N) (2 * (2 * N + 1 + 1))]
    generalize cN K (N + 1) = c
    generalize pwR K y (2 * (2 * N + 1 + 1)) = p
    generalize pwR K y (N * N) = q
    lib_ring
  rw [eL, eR] at g3
  exact g3

/-- V y N = Σ_{m=1}^{N} 2 m² y^{m²} -/
def V (y : R) : Nat → R
  | 0 => K.zero
  | N + 1 => K.add (V y N) (K.mul (AltDiff.two K) (K.mul (K.mul (cN K (N + 1)) (cN K (N + 1))) (pwR K y ((N + 1) * (N + 1)))))

/-- **discrete Gaussian variance bound**:
  (1 − y²) Σ_{m=1}^{N} 2m² y^{m²} + (N+1) y^{N²} + N y^{(N+1)²} ≤ ϑ₃⁽ᴺ⁾(y) for 0 ≤ y ≤ 1 -/
theorem var_le (h1 : O.le K.zero K.one) (y : R) (hy0 : O.le K.zero y) (hy1 : O.le y K.one) : ∀ N,
    O.le (K.add (K.mul (K.add K.one (K.neg (K.mul y y))) (V K y N))
        (K.add (K.mul (cN K (N + 1)) (pwR K y (N * N))) (K.mul (cN K N) (pwR K y ((N + 1) * (N + 1))))))
      (AltDiff.tU K (fun c => pwR K y (c * c)) N)
  | 0 => by
    have e : K.add (K.mul (K.add K.one (K.neg (K.mul y y))) (V K y 0))
        (K.add (K.mul (cN K (0 + 1)) (pwR K y (0 * 0))) (K.mul (cN K 0) (pwR K y ((0 + 1) * (0 + 1)))))
        = AltDiff.tU K (fun c => pwR K y (c * c)) 0 := by
      show K.add (K.mul (K.add K.one (K.neg (K.mul y y))) K.zero)
          (K.add (K.mul (K.add K.one K.zero) (pwR K y (0 * 0))) (K.mul K.zero (pwR K y ((0 + 1) * (0 + 1)))))
          = pwR K y (0 * 0)
      generalize pwR K y (0 * 0) = p
      generalize pwR K y ((0 + 1) * (0 + 1)) = r
      lib_ring
    rw [e]; exact O.le_refl _
  | N + 1 => by
    have ih := var_le h1 y hy0 hy1 N
    have pr := pair K O h1 y hy0 hy1 N
    have s := O.add_le_add _ _ _ _ ih pr
    have s2 := O.add_le_add _ _ _ _ s (O.le_refl (K.add (K.mul (AltDiff.two K) (pwR K y ((N + 1) * (N + 1))))
      (K.neg (K.mul (cN K (N + 1)) (K.add (pwR K y (N * N)) (K.neg (pwR K y ((N + 1 + 1) * (N + 1 + 1)))))))))
    have eL : K.add (K.add (K.add (K.mul (K.add K.one (K.neg (K.mul y y))) (V K y N))
          (K.add (K.mul (cN K (N + 1)) (pwR K y (N * N))) (K.mul (cN K N) (pwR K y ((N + 1) * (N + 1))))))
          (K.mul (AltDiff.two K) (K.mul (K.mul (cN K (N + 1)) (cN K (N + 1)))
            (K.mul (K.add K.one (K.neg (K.mul y y))) (pwR K y ((N + 1) * (N + 1)))))))
        (K.add (K.mul (AltDiff.two K) (pwR K y ((N + 1) * (N + 1))))
          (K.neg (K.mul (cN K (N + 1)) (K.add (pwR K y (N * N)) (K.neg (pwR K y ((N + 1 + 1) * (N + 1 + 1))))))))
        = K.add (K.mul (K.add K.one (K.neg (K.mul y y))) (V K y (N + 1)))
          (K.add (K.mul (cN K (N + 1 + 1)) (pwR K y ((N + 1) * (N + 1))))
            (K.mul (cN K (N + 1)) (pwR K y ((N + 1 + 1) * (N + 1 + 1))))) := by
      show _ = K.add (K.mul (K.add K.one (K.neg (K.mul y y))) (K.add (V K y N) (K.mul (K.add K.one K.one)
            (K.mul (K.mul (K.add K.one (cN K N)) (K.add K.one (cN K N))) (pwR K y ((N + 1) * (N + 1)))))))
          (K.add (K.mul (K.add K.one (K.add K.one (cN K N))) (pwR K y ((N + 1) * (N + 1))))
            (K.mul (K.add K.one (cN K N)) (pwR K y ((N + 1 + 1) * (N + 1 + 1)))))
      show K.add (K.add (K.add (K.mul (K.add K.one (K.neg (K.mul y y))) (V K y N))
          (K.add (K.mul (K.add K.one (cN K N)) (pwR K y (N * N))) (K.mul (cN K N) (pwR K y ((N + 1) * (N + 1))))))
          (K.mul (K.add K.one K.one) (K.mul (K.mul (K.add K.one (cN K N)) (K.add K.one (cN K N)))
            (K.mul (K.add K.one (K.neg (K.mul y y))) (pwR K y ((N + 1) * (N + 1)))))))
        (K.add (K.mul (K.add K.one K.one) (pwR K y ((N + 1) * (N + 1))))
          (K.neg (K.mul (K.add K.one (cN K N)) (K.add (pwR K y (N * N)) (K.neg (pwR K y ((N + 1 + 1) * (N + 1 + 1))))))))
        = _
      generalize V K y N = v
      generalize cN K N = c
      generalize pwR K y (N * N) = a
      generalize pwR K y ((N + 1) * (N + 1)) = b
      generalize pwR K y ((N + 1 + 1) * (N + 1 + 1)) = d
      lib_ring
    have eR : K.add (K.add (AltDiff.tU K (fun c => pwR K y (c * c)) N)
          (K.mul (cN K (N + 1)) (K.add (pwR K y (N * N)) (K.neg (pwR K y ((N + 1 + 1) * (N + 1 + 1)))))))
        (K.add (K.mul (AltDiff.two K) (pwR K y ((N + 1) * (N + 1))))
          (K.neg (K.mul (cN K (N + 1)) (K.add (pwR K y (N * N)) (K.neg (pwR K y ((N + 1 + 1) * (N + 1 + 1))))))))
        = AltDiff.tU K (fun c => pwR K y (c * c)) (N + 1) := by
      show _ = K.add (AltDiff.tU K (fun c => pwR K y (c * c)) N) (K.mul (AltDiff.two K) (pwR K y ((N + 1) * (N + 1))))
      generalize AltDiff.tU K (fun c => pwR K y (c * c)) N = T
      generalize K.mul (cN K (N + 1)) (K.add (pwR K y (N * N)) (K.neg (pwR K y ((N + 1 + 1) * (N + 1 + 1))))) = P
      generalize K.mul (AltDiff.two K) (pwR K y ((N + 1) * (N + 1))) = W
      lib_ring
    rw [eL, eR] at s2
    exact s2

end GaussVar

#print axioms GaussVar.pw2
#print axioms GaussVar.gs_top
#print axioms GaussVar.amgm1
#print axioms GaussVar.gs_low
#print axioms GaussVar.gs_mul
#print axioms GaussVar.pair
#print axioms GaussVar.var_le

ym/GaussVar2.lean

lean_all/ym/GaussVar2.lean

/-
  ym/GaussVar2 — T45, G78m 6f-A′-1b: a lower bound for the slack in the discrete Gaussian variance bound.
    gs1        gs1 x n = Σ_{i<n} x^i
    gs1_mul    (1 − x) gs1 x n = 1 − x^n
    gs1_low    (2r+1) x^r ≤ gs1 x (2r+1)                       (AM–GM on x^i, x^{2r−i})
    one_sub    (2r+1)(1 − x) x^r ≤ 1 − x^{2r+1}
    oddSq M    = Σ_{i ≤ M} (2i+1)²
    resid      (1 − x)² x^{2M} oddSq M ≤ Σ_{i<2M+2} x^{2i} − (2M+2) x^{2M+1}      (Q_{m+1} = x² Q_m + (1 − x^{2m+1})²)
    slack_eq   (N+1)(x^{N²} − x^{(N+2)²}) = 2(N+1)²(1 − x²) x^{(N+1)²} + (N+1)(1 − x²) x^{N²} Q_{N+1}
    slack_low  wl x N + 2(N+1)²(1 − x²) x^{(N+1)²} ≤ (N+1)(x^{N²} − x^{(N+2)²}),
               wl x N = (N+1)(1 − x²)(1 − x)² x^{N² + 2N} oddSq N
    var_low    (1 − x²) V_N + (N+1) x^{N²} + N x^{(N+1)²} + Σ_{M<N} wl x M ≤ ϑ₃⁽ᴺ⁾(x)
  With oddSq N = (N+1)(2N+1)(2N+3)/3 the slack sum is ≈ √π·√s for x = e^{−s} → 1 (the true size of
  ϑ₃ − (1 − x²)Σ c² x^{c²}), which beats the ϑ₄ part of 6f-A′-1 (ThetaBound3) by a factor ≥ 3 for s ≤ 0.235.
  Lean 4 core only, no axioms.
-/
import ym.GaussVar
import ym.ThetaBound3

namespace GaussVar2

open YMChain LinkIntegral SU2Char GaussVar

variable {R : Type} (K : DetChain.CRing R) (O : ORing K)

/-- gs1 x n = Σ_{i<n} x^i -/
def gs1 (x : R) : Nat → R
  | 0 => K.zero
  | n + 1 => K.add K.one (K.mul x (gs1 x n))

/-- gs1 x (n+1) = gs1 x n + x^n -/
theorem gs1_top (x : R) : ∀ n, gs1 K x (n + 1) = K.add (gs1 K x n) (pwR K x n)
  | 0 => by
    show K.add K.one (K.mul x K.zero) = K.add K.zero K.one
    lib_ring
  | n + 1 => by
    show K.add K.one (K.mul x (gs1 K x (n + 1))) = K.add (K.add K.one (K.mul x (gs1 K x n))) (K.mul (pwR K x n) x)
    rw [gs1_top x n]
    generalize gs1 K x n = g
    generalize pwR K x n = p
    lib_ring

/-- (1 − x) gs1 x n = 1 − x^n -/
theorem gs1_mul (x : R) : ∀ n, K.mul (K.add K.one (K.neg x)) (gs1 K x n) = K.add K.one (K.neg (pwR K x n))
  | 0 => by
    show K.mul (K.add K.one (K.neg x)) K.zero = K.add K.one (K.neg K.one)
    lib_ring
  | n + 1 => by
    have ih := gs1_mul x n
    show K.mul (K.add K.one (K.neg x)) (K.add K.one (K.mul x (gs1 K x n))) = K.add K.one (K.neg (K.mul (pwR K x n) x))
    have e : K.mul (K.add K.one (K.neg x)) (K.add K.one (K.mul x (gs1 K x n)))
        = K.add (K.add K.one (K.neg x)) (K.mul x (K.mul (K.add K.one (K.neg x)) (gs1 K x n))) := by
      generalize gs1 K x n = g
      lib_ring
    rw [e, ih]
    generalize pwR K x n = p
    lib_ring

/-- **(2r+1) x^r ≤ Σ_{i ≤ 2r} x^i** for 0 ≤ x -/
theorem gs1_low (x : R) (hx : O.le K.zero x) : ∀ r, O.le (K.mul (cN K (2 * r + 1)) (pwR K x r)) (gs1 K x (2 * r + 1))
  | 0 => by
    have e : K.mul (cN K (2 * 0 + 1)) (pwR K x 0) = gs1 K x (2 * 0 + 1) := by
      show K.mul (K.add K.one K.zero) K.one = K.add K.one (K.mul x K.zero)
      lib_ring
    rw [e]; exact O.le_refl _
  | r + 1 => by
    have a := amgm1 K O x (r + 1)
    have b := O.mul_le_mul_right _ _ _ (gs1_low x hx r) hx
    have c := O.add_le_add _ _ _ _ a b
    have eL : K.add (K.mul (AltDiff.two K) (pwR K x (r + 1))) (K.mul (K.mul (cN K (2 * r + 1)) (pwR K x r)) x)
        = K.mul (cN K (2 * (r + 1) + 1)) (pwR K x (r + 1)) := by
      rw [show 2 * (r + 1) + 1 = (2 * r + 1) + 1 + 1 by lib_nat]
      show K.add (K.mul (K.add K.one K.one) (K.mul (pwR K x r) x)) (K.mul (K.mul (cN K (2 * r + 1)) (pwR K x r)) x)
        = K.mul (K.add K.one (K.add K.one (cN K (2 * r + 1)))) (K.mul (pwR K x r) x)
      generalize pwR K x r = p
      generalize cN K (2 * r + 1) = q
      lib_ring
    have eR : K.add (K.add K.one (pwR K x (2 * (r + 1)))) (K.mul (gs1 K x (2 * r + 1)) x)
        = gs1 K x (2 * (r + 1) + 1) := by
      rw [show 2 * (r + 1) + 1 = (2 * r + 1) + 1 + 1 by lib_nat, show 2 * (r + 1) = (2 * r + 1) + 1 by lib_nat]
      show _ = K.add K.one (K.mul x (gs1 K x (2 * r + 1 + 1)))
      rw [gs1_top K x (2 * r + 1)]
      show K.add (K.add K.one (K.mul (pwR K x (2 * r + 1)) x)) (K.mul (gs1 K x (2 * r + 1)) x)
        = K.add K.one (K.mul x (K.add (gs1 K x (2 * r + 1)) (pwR K x (2 * r + 1))))
      generalize gs1 K x (2 * r + 1) = g
      generalize pwR K x (2 * r + 1) = p
      lib_ring
    rw [eL, eR] at c
    exact c

/-- **(2r+1)(1 − x) x^r ≤ 1 − x^{2r+1}** for 0 ≤ x ≤ 1 -/
theorem one_sub (x : R) (hx0 : O.le K.zero x) (hx1 : O.le x K.one) (r : Nat) :
    O.le (K.mul (cN K (2 * r + 1)) (K.mul (K.add K.one (K.neg x)) (pwR K x r))) (K.add K.one (K.neg (pwR K x (2 * r + 1)))) := by
  have h1x : O.le K.zero (K.add K.one (K.neg x)) := AltSum.le_sub K O _ _ hx1
  have g := O.mul_le_mul_right _ _ _ (gs1_low K O x hx0 r) h1x
  have m := gs1_mul K x (2 * r + 1)
  rw [show K.mul (gs1 K x (2 * r + 1)) (K.add K.one (K.neg x)) = K.mul (K.add K.one (K.neg x)) (gs1 K x (2 * r + 1)) by
    generalize gs1 K x (2 * r + 1) = q; lib_ring, m] at g
  rw [show K.mul (cN K (2 * r + 1)) (K.mul (K.add K.one (K.neg x)) (pwR K x r))
      = K.mul (K.mul (cN K (2 * r + 1)) (pwR K x r)) (K.add K.one (K.neg x)) by
    generalize cN K (2 * r + 1) = c; generalize pwR K x r = p; lib_ring]
  exact g

/-- oddSq M = Σ_{i ≤ M} (2i+1)² -/
def oddSq : Nat → R
  | 0 => K.one
  | M + 1 => K.add (oddSq M) (K.mul (cN K (2 * M + 3)) (cN K (2 * M + 3)))

theorem oddSq_nn (h1 : O.le K.zero K.one) : ∀ M, O.le K.zero (oddSq K M)
  | 0 => h1
  | M + 1 => by
    have := O.add_le_add _ _ _ _ (oddSq_nn h1 M) (ThetaBound.sq_nn K O (cN K (2 * M + 3)))
    rw [K.zero_add] at this
    exact this

/-- **AM–GM residual**: (1 − x)² x^{2M} Σ_{i≤M}(2i+1)² ≤ Σ_{i<2M+2} x^{2i} − (2M+2) x^{2M+1} -/
theorem resid (h1 : O.le K.zero K.one) (x : R) (hx0 : O.le K.zero x) (hx1 : O.le x K.one) : ∀ M,
    O.le (K.mul (K.mul (K.add K.one (K.neg x)) (K.add K.one (K.neg x))) (K.mul (pwR K x (2 * M)) (oddSq K M)))
      (K.add (gs K x (2 * M + 2)) (K.neg (K.mul (cN K (2 * M + 2)) (pwR K x (2 * M + 1)))))
  | 0 => by
    have e : K.mul (K.mul (K.add K.one (K.neg x)) (K.add K.one (K.neg x))) (K.mul (pwR K x (2 * 0)) (oddSq K 0))
        = K.add (gs K x (2 * 0 + 2)) (K.neg (K.mul (cN K (2 * 0 + 2)) (pwR K x (2 * 0 + 1)))) := by
      show K.mul (K.mul (K.add K.one (K.neg x)) (K.add K.one (K.neg x))) (K.mul K.one K.one)
        = K.add (K.add K.one (K.mul (K.mul x x) (K.add K.one (K.mul (K.mul x x) K.zero))))
          (K.neg (K.mul (K.add K.one (K.add K.one K.zero)) (K.mul K.one x)))
      lib_ring
    rw [e]; exact O.le_refl _
  | M + 1 => by
    have ih := resid h1 x hx0 hx1 M
    have hxx : O.le K.zero (K.mul x x) := O.mul_nonneg _ _ hx0 hx0
    have a := O.mul_le_mul_right _ _ _ ih hxx
    -- (2M+3)(1−x)x^{M+1} ≤ 1 − x^{2M+3}, squared
    have os := one_sub K O x hx0 hx1 (M + 1)
    have hnn : O.le K.zero (K.mul (cN K (2 * (M + 1) + 1)) (K.mul (K.add K.one (K.neg x)) (pwR K x (M + 1)))) :=
      O.mul_nonneg _ _ (SU2CharExp.cN_nn K O h1 _) (O.mul_nonneg _ _ (AltSum.le_sub K O _ _ hx1) (ThetaDup5.pw_nn K O x hx0 h1 _))
    have hc : O.le K.zero (K.add K.one (K.neg (pwR K x (2 * (M + 1) + 1)))) := O.le_trans _ _ _ hnn os
    have hnc : O.le (K.neg (K.add K.one (K.neg (pwR K x (2 * (M + 1) + 1))))) K.zero := by
      apply ThetaLow.le_of_sub K O
      rw [show K.add K.zero (K.neg (K.neg (K.add K.one (K.neg (pwR K x (2 * (M + 1) + 1))))))
        = K.add K.one (K.neg (pwR K x (2 * (M + 1) + 1))) by lib_ring]
      exact hc
    have sq := ThetaBound.sq_le K O _ _ ⟨O.le_trans _ _ _ hnc hnn, os⟩
    have c := O.add_le_add _ _ _ _ a sq
    have eL : K.add (K.mul (K.mul (K.mul (K.add K.one (K.neg x)) (K.add K.one (K.neg x))) (K.mul (pwR K x (2 * M)) (oddSq K M))) (K.mul x x))
          (K.mul (K.mul (cN K (2 * (M + 1) + 1)) (K.mul (K.add K.one (K.neg x)) (pwR K x (M + 1))))
            (K.mul (cN K (2 * (M + 1) + 1)) (K.mul (K.add K.one (K.neg x)) (pwR K x (M + 1)))))
        = K.mul (K.mul (K.add K.one (K.neg x)) (K.add K.one (K.neg x))) (K.mul (pwR K x (2 * (M + 1))) (oddSq K (M + 1))) := by
      rw [show 2 * (M + 1) = (M + 1) + (M + 1) by lib_nat, GKS.pwR_add K x (M + 1) (M + 1),
        show (M + 1) + (M + 1) + 1 = 2 * M + 3 by lib_nat]
      show _ = K.mul _ (K.mul _ (K.add (oddSq K M) (K.mul (cN K (2 * M + 3)) (cN K (2 * M + 3)))))
      rw [show pwR K x (2 * M) = K.mul (pwR K x M) (pwR K x M) by
        rw [show 2 * M = M + M by lib_nat, GKS.pwR_add K x M M]]
      show K.add (K.mul (K.mul (K.mul (K.add K.one (K.neg x)) (K.add K.one (K.neg x))) (K.mul (K.mul (pwR K x M) (pwR K x M)) (oddSq K M))) (K.mul x x))
          (K.mul (K.mul (cN K (2 * M + 3)) (K.mul (K.add K.one (K.neg x)) (K.mul (pwR K x M) x)))
            (K.mul (cN K (2 * M + 3)) (K.mul (K.add K.one (K.neg x)) (K.mul (pwR K x M) x))))
        = K.mul (K.mul (K.add K.one (K.neg x)) (K.add K.one (K.neg x)))
          (K.mul (K.mul (K.mul (pwR K x M) x) (K.mul (pwR K x M) x)) (K.add (oddSq K M) (K.mul (cN K (2 * M + 3)) (cN K (2 * M + 3)))))
      generalize pwR K x M = p
      generalize oddSq K M = o
      generalize cN K (2 * M + 3) = c
      lib_ring
    have eR : K.add (K.mul (K.add (gs K x (2 * M + 2)) (K.neg (K.mul (cN K (2 * M + 2)) (pwR K x (2 * M + 1))))) (K.mul x x))
          (K.mul (K.add K.one (K.neg (pwR K x (2 * (M + 1) + 1)))) (K.add K.one (K.neg (pwR K x (2 * (M + 1) + 1)))))
        = K.add (gs K x (2 * (M + 1) + 2)) (K.neg (K.mul (cN K (2 * (M + 1) + 2)) (pwR K x (2 * (M + 1) + 1)))) := by
      rw [show 2 * (M + 1) + 2 = (2 * M + 2) + 1 + 1 by lib_nat, show 2 * (M + 1) + 1 = 2 * M + 3 by lib_nat]
      show _ = K.add (K.add K.one (K.mul (K.mul x x) (gs K x (2 * M + 2 + 1))))
        (K.neg (K.mul (K.add K.one (K.add K.one (cN K (2 * M + 2)))) (pwR K x (2 * M + 3))))
      rw [gs_top K x (2 * M + 2), show 2 * (2 * M + 2) = (2 * M + 1) + (2 * M + 3) by lib_nat,
        GKS.pwR_add K x (2 * M + 1) (2 * M + 3)]
      show K.add (K.mul (K.add (gs K x (2 * M + 2)) (K.neg (K.mul (cN K (2 * M + 2)) (pwR K x (2 * M + 1))))) (K.mul x x))
          (K.mul (K.add K.one (K.neg (K.mul (K.mul (pwR K x (2 * M + 1)) x) x))) (K.add K.one (K.neg (K.mul (K.mul (pwR K x (2 * M + 1)) x) x))))
        = K.add (K.add K.one (K.mul (K.mul x x) (K.add (gs K x (2 * M + 2))
            (K.mul (pwR K x (2 * M + 1)) (K.mul (K.mul (pwR K x (2 * M + 1)) x) x)))))
          (K.neg (K.mul (K.add K.one (K.add K.one (cN K (2 * M + 2)))) (K.mul (K.mul (pwR K x (2 * M + 1)) x) x)))
      generalize gs K x (2 * M + 2) = g
      generalize pwR K x (2 * M + 1) = p
      generalize cN K (2 * M + 2) = c
      lib_ring
    rw [eL, eR] at c
    exact c

/-- the slack lower-bound term wl x N = (N+1)(1 − x²)(1 − x)² x^{N²} x^{2N} oddSq N -/
def wl (x : R) (N : Nat) : R :=
  K.mul (cN K (N + 1)) (K.mul (K.add K.one (K.neg (K.mul x x)))
    (K.mul (pwR K x (N * N)) (K.mul (K.mul (K.add K.one (K.neg x)) (K.add K.one (K.neg x))) (K.mul (pwR K x (2 * N)) (oddSq K N)))))

/-- **slack lower bound** -/
theorem slack_low (h1 : O.le K.zero K.one) (x : R) (hx0 : O.le K.zero x) (hx1 : O.le x K.one) (N : Nat) :
    O.le (K.add (wl K x N) (K.mul (AltDiff.two K) (K.mul (K.mul (cN K (N + 1)) (cN K (N + 1)))
        (K.mul (K.add K.one (K.neg (K.mul x x))) (pwR K x ((N + 1) * (N + 1)))))))
      (K.mul (cN K (N + 1)) (K.add (pwR K x (N * N)) (K.neg (pwR K x ((N + 1 + 1) * (N + 1 + 1)))))) := by
  have q := ThetaBound3.sq_unit K O x hx0 hx1
  have h1x : O.le K.zero (K.add K.one (K.neg (K.mul x x))) := AltSum.le_sub K O _ _ q.2
  have r := resid K O h1 x hx0 hx1 N
  have r1 := O.mul_le_mul_right _ _ _ r (O.mul_nonneg _ _ (SU2CharExp.cN_nn K O h1 (N + 1))
    (O.mul_nonneg _ _ h1x (ThetaDup5.pw_nn K O x hx0 h1 (N * N))))
  have r2 := O.add_le_add _ _ _ _ r1 (O.le_refl (K.mul (AltDiff.two K) (K.mul (K.mul (cN K (N + 1)) (cN K (N + 1)))
        (K.mul (K.add K.one (K.neg (K.mul x x))) (pwR K x ((N + 1) * (N + 1)))))))
  have eL : K.add (K.mul (K.mul (K.mul (K.add K.one (K.neg x)) (K.add K.one (K.neg x))) (K.mul (pwR K x (2 * N)) (oddSq K N)))
        (K.mul (cN K (N + 1)) (K.mul (K.add K.one (K.neg (K.mul x x))) (pwR K x (N * N)))))
        (K.mul (AltDiff.two K) (K.mul (K.mul (cN K (N + 1)) (cN K (N + 1)))
          (K.mul (K.add K.one (K.neg (K.mul x x))) (pwR K x ((N + 1) * (N + 1))))))
      = K.add (wl K x N) (K.mul (AltDiff.two K) (K.mul (K.mul (cN K (N + 1)) (cN K (N + 1)))
          (K.mul (K.add K.one (K.neg (K.mul x x))) (pwR K x ((N + 1) * (N + 1)))))) := by
    show _ = K.add (K.mul (cN K (N + 1)) (K.mul (K.add K.one (K.neg (K.mul x x)))
        (K.mul (pwR K x (N * N)) (K.mul (K.mul (K.add K.one (K.neg x)) (K.add K.one (K.neg x))) (K.mul (pwR K x (2 * N)) (oddSq K N)))))) _
    generalize K.mul (AltDiff.two K) (K.mul (K.mul (cN K (N + 1)) (cN K (N + 1)))
          (K.mul (K.add K.one (K.neg (K.mul x x))) (pwR K x ((N + 1) * (N + 1))))) = Z
    generalize cN K (N + 1) = c
    generalize pwR K x (N * N) = p
    generalize pwR K x (2 * N) = p2
    generalize oddSq K N = o
    lib_ring
  have eR : K.add (K.mul (K.add (gs K x (2 * N + 2)) (K.neg (K.mul (cN K (2 * N + 2)) (pwR K x (2 * N + 1)))))
        (K.mul (cN K (N + 1)) (K.mul (K.add K.one (K.neg (K.mul x x))) (pwR K x (N * N)))))
        (K.mul (AltDiff.two K) (K.mul (K.mul (cN K (N + 1)) (cN K (N + 1)))
          (K.mul (K.add K.one (K.neg (K.mul x x))) (pwR K x ((N + 1) * (N + 1))))))
      = K.mul (cN K (N + 1)) (K.add (pwR K x (N * N)) (K.neg (pwR K x ((N + 1 + 1) * (N + 1 + 1))))) := by
    have m := gs_mul K x (2 * N + 2)
    have e1 : K.mul (K.add (gs K x (2 * N + 2)) (K.neg (K.mul (cN K (2 * N + 2)) (pwR K x (2 * N + 1)))))
          (K.mul (cN K (N + 1)) (K.mul (K.add K.one (K.neg (K.mul x x))) (pwR K x (N * N))))
        = K.add (K.mul (K.mul (K.add K.one (K.neg (K.mul x x))) (gs K x (2 * N + 2))) (K.mul (cN K (N + 1)) (pwR K x (N * N))))
          (K.neg (K.mul (K.mul (cN K (2 * N + 2)) (pwR K x (2 * N + 1)))
            (K.mul (cN K (N + 1)) (K.mul (K.add K.one (K.neg (K.mul x x))) (pwR K x (N * N)))))) := by
      generalize gs K x (2 * N + 2) = g
      generalize cN K (2 * N + 2) = c2
      generalize pwR K x (2 * N + 1) = p1
      generalize cN K (N + 1) = c
      generalize pwR K x (N * N) = p
      lib_ring
    rw [e1, m, show 2 * N + 2 = (N + 1) + (N + 1) by lib_nat, SU2Char.cN_add K (N + 1),
      show (N + 1 + 1) * (N + 1 + 1) = N * N + 2 * ((N + 1) + (N + 1)) by lib_nat,
      GKS.pwR_add K x (N * N) (2 * ((N + 1) + (N + 1))),
      show (N + 1) * (N + 1) = N * N + (2 * N + 1) by lib_nat, GKS.pwR_add K x (N * N) (2 * N + 1)]
    show _ = K.mul (cN K (N + 1)) (K.add (pwR K x (N * N)) (K.neg (K.mul (pwR K x (N * N)) (pwR K x (2 * ((N + 1) + (N + 1)))))))
    generalize pwR K x (2 * ((N + 1) + (N + 1))) = p4
    generalize pwR K x (2 * N + 1) = p1
    generalize cN K (N + 1) = c
    generalize pwR K x (N * N) = p
    show K.add (K.add (K.mul (K.add K.one (K.neg p4)) (K.mul c p)) (K.neg (K.mul (K.mul (K.add c c) p1)
        (K.mul c (K.mul (K.add K.one (K.neg (K.mul x x))) p)))))
      (K.mul (K.add K.one K.one) (K.mul (K.mul c c) (K.mul (K.add K.one (K.neg (K.mul x x))) (K.mul p p1))))
      = K.mul c (K.add p (K.neg (K.mul p p4)))
    lib_ring
  rw [eL, eR] at r2
  exact r2

/-- **variance bound with slack**: (1 − x²) V_N + (N+1) x^{N²} + N x^{(N+1)²} + Σ_{M<N} wl x M ≤ ϑ₃⁽ᴺ⁾(x) -/
def W (x : R) : Nat → R
  | 0 => K.zero
  | N + 1 => K.add (W x N) (wl K x N)

theorem var_low (h1 : O.le K.zero K.one) (y : R) (hy0 : O.le K.zero y) (hy1 : O.le y K.one) : ∀ N,
    O.le (K.add (K.add (K.mul (K.add K.one (K.neg (K.mul y y))) (V K y N))
        (K.add (K.mul (cN K (N + 1)) (pwR K y (N * N))) (K.mul (cN K N) (pwR K y ((N + 1) * (N + 1)))))) (W K y N))
      (AltDiff.tU K (fun c => pwR K y (c * c)) N)
  | 0 => by
    have e : K.add (K.add (K.mul (K.add K.one (K.neg (K.mul y y))) (V K y 0))
        (K.add (K.mul (cN K (0 + 1)) (pwR K y (0 * 0))) (K.mul (cN K 0) (pwR K y ((0 + 1) * (0 + 1)))))) (W K y 0)
        = AltDiff.tU K (fun c => pwR K y (c * c)) 0 := by
      show K.add (K.add (K.mul (K.add K.one (K.neg (K.mul y y))) K.zero)
          (K.add (K.mul (K.add K.one K.zero) (pwR K y (0 * 0))) (K.mul K.zero (pwR K y ((0 + 1) * (0 + 1)))))) K.zero
          = pwR K y (0 * 0)
      generalize pwR K y (0 * 0) = p
      generalize pwR K y ((0 + 1) * (0 + 1)) = r
      lib_ring
    rw [e]; exact O.le_refl _
  | N + 1 => by
    have ih := var_low h1 y hy0 hy1 N
    have pr := slack_low K O h1 y hy0 hy1 N
    have s := O.add_le_add _ _ _ _ ih pr
    have s2 := O.add_le_add _ _ _ _ s (O.le_refl (K.add (K.mul (AltDiff.two K) (pwR K y ((N + 1) * (N + 1))))
      (K.neg (K.mul (cN K (N + 1)) (K.add (pwR K y (N * N)) (K.neg (pwR K y ((N + 1 + 1) * (N + 1 + 1)))))))))
    have eL : K.add (K.add (K.add (K.add (K.mul (K.add K.one (K.neg (K.mul y y))) (V K y N))
          (K.add (K.mul (cN K (N + 1)) (pwR K y (N * N))) (K.mul (cN K N) (pwR K y ((N + 1) * (N + 1)))))) (W K y N))
          (K.add (wl K y N) (K.mul (AltDiff.two K) (K.mul (K.mul (cN K (N + 1)) (cN K (N + 1)))
            (K.mul (K.add K.one (K.neg (K.mul y y))) (pwR K y ((N + 1) * (N + 1))))))))
        (K.add (K.mul (AltDiff.two K) (pwR K y ((N + 1) * (N + 1))))
          (K.neg (K.mul (cN K (N + 1)) (K.add (pwR K y (N * N)) (K.neg (pwR K y ((N + 1 + 1) * (N + 1 + 1))))))))
        = K.add (K.add (K.mul (K.add K.one (K.neg (K.mul y y))) (V K y (N + 1)))
          (K.add (K.mul (cN K (N + 1 + 1)) (pwR K y ((N + 1) * (N + 1))))
            (K.mul (cN K (N + 1)) (pwR K y ((N + 1 + 1) * (N + 1 + 1)))))) (W K y (N + 1)) := by
      show _ = K.add (K.add (K.mul (K.add K.one (K.neg (K.mul y y))) (K.add (V K y N) (K.mul (K.add K.one K.one)
            (K.mul (K.mul (K.add K.one (cN K N)) (K.add K.one (cN K N))) (pwR K y ((N + 1) * (N + 1)))))))
          (K.add (K.mul (K.add K.one (K.add K.one (cN K N))) (pwR K y ((N + 1) * (N + 1))))
            (K.mul (K.add K.one (cN K N)) (pwR K y ((N + 1 + 1) * (N + 1 + 1)))))) (K.add (W K y N) (wl K y N))
      show K.add (K.add (K.add (K.add (K.mul (K.add K.one (K.neg (K.mul y y))) (V K y N))
          (K.add (K.mul (K.add K.one (cN K N)) (pwR K y (N * N))) (K.mul (cN K N) (pwR K y ((N + 1) * (N + 1)))))) (W K y N))
          (K.add (wl K y N) (K.mul (K.add K.one K.one) (K.mul (K.mul (K.add K.one (cN K N)) (K.add K.one (cN K N)))
            (K.mul (K.add K.one (K.neg (K.mul y y))) (pwR K y ((N + 1) * (N + 1))))))))
        (K.add (K.mul (K.add K.one K.one) (pwR K y ((N + 1) * (N + 1))))
          (K.neg (K.mul (K.add K.one (cN K N)) (K.add (pwR K y (N * N)) (K.neg (pwR K y ((N + 1 + 1) * (N + 1 + 1))))))))
        = _
      generalize V K y N = v
      generalize W K y N = w
      generalize wl K y N = l
      generalize cN K N = c
      generalize pwR K y (N * N) = a
      generalize pwR K y ((N + 1) * (N + 1)) = b
      generalize pwR K y ((N + 1 + 1) * (N + 1 + 1)) = d
      lib_ring
    have eR : K.add (K.add (AltDiff.tU K (fun c => pwR K y (c * c)) N)
          (K.mul (cN K (N + 1)) (K.add (pwR K y (N * N)) (K.neg (pwR K y ((N + 1 + 1) * (N + 1 + 1)))))))
        (K.add (K.mul (AltDiff.two K) (pwR K y ((N + 1) * (N + 1))))
          (K.neg (K.mul (cN K (N + 1)) (K.add (pwR K y (N * N)) (K.neg (pwR K y ((N + 1 + 1) * (N + 1 + 1))))))))
        = AltDiff.tU K (fun c => pwR K y (c * c)) (N + 1) := by
      show _ = K.add (AltDiff.tU K (fun c => pwR K y (c * c)) N) (K.mul (AltDiff.two K) (pwR K y ((N + 1) * (N + 1))))
      generalize AltDiff.tU K (fun c => pwR K y (c * c)) N = T
      generalize K.mul (cN K (N + 1)) (K.add (pwR K y (N * N)) (K.neg (pwR K y ((N + 1 + 1) * (N + 1 + 1))))) = P
      generalize K.mul (AltDiff.two K) (pwR K y ((N + 1) * (N + 1))) = Wv
      lib_ring
    rw [eL, eR] at s2
    exact s2

end GaussVar2

#print axioms GaussVar2.gs1_top
#print axioms GaussVar2.gs1_mul
#print axioms GaussVar2.gs1_low
#print axioms GaussVar2.one_sub
#print axioms GaussVar2.oddSq_nn
#print axioms GaussVar2.resid
#print axioms GaussVar2.slack_low
#print axioms GaussVar2.var_low

ym/GenA1.lean

lean_all/ym/GenA1.lean

/-
  ym/GenA1 — T45, G54: generated c-level identity for (A) at n = 1 (cert/A/gen/gen_ident.py).
  Lean 4 core only, no axioms.
-/
import ym.AVs
import ym.RingZ
import ym.A2

set_option linter.unusedSectionVars false

namespace GenA1

open YMChain QBinom CgWindow A1Ip A2Ip MigdalCone HeatPair

variable {R : Type} (K : DetChain.CRing R)

def pv2 (x : Nat → R) : Nat → R
  | 0 => (x 2)
  | 1 => (K.add (x 1) (x 3))
  | d + 2 => (K.add (K.add (x d) (x (d + 2))) (x (d + 4)))

def pv3 (x : Nat → R) : Nat → R
  | 0 => (x 3)
  | 1 => (K.add (x 2) (x 4))
  | 2 => (K.add (K.add (x 1) (x 3)) (x 5))
  | d + 3 => (K.add (K.add (K.add (x d) (x (d + 2))) (x (d + 4))) (x (d + 6)))

theorem psi2 (X : List R) : ∀ j, CgWindow.Psi K X j 2 = pv2 K (HeatPair.co K X) j
  | 0 => by
    have := CgWindow.Psi_lo K X 0 2; rw [show 0 + 2 = 2 from rfl] at this; rw [this]
    show (K.add K.zero (HeatPair.co K X 2)) = (HeatPair.co K X 2)
    lib_ring
  | 1 => by
    have := CgWindow.Psi_lo K X 1 1; rw [show 1 + 1 = 2 from rfl] at this; rw [this]
    show (K.add (K.add K.zero (HeatPair.co K X 1)) (HeatPair.co K X 3)) = (K.add (HeatPair.co K X 1) (HeatPair.co K X 3))
    lib_ring
  | d + 2 => by
    have := CgWindow.Psi_hi K X 2 d; rw [show 2 + d = d + 2 by lib_nat] at this; rw [this]
    show (K.add (K.add (K.add K.zero (HeatPair.co K X (d + 2 * 0))) (HeatPair.co K X (d + 2 * 1))) (HeatPair.co K X (d + 2 * 2))) = (K.add (K.add (HeatPair.co K X d) (HeatPair.co K X (d + 2))) (HeatPair.co K X (d + 4)))
    rw [show d + 2 * 0 = d by lib_nat, show d + 2 * 1 = d + 2 by lib_nat, show d + 2 * 2 = d + 4 by lib_nat]; lib_ring

theorem psi3 (X : List R) : ∀ j, CgWindow.Psi K X j 3 = pv3 K (HeatPair.co K X) j
  | 0 => by
    have := CgWindow.Psi_lo K X 0 3; rw [show 0 + 3 = 3 from rfl] at this; rw [this]
    show (K.add K.zero (HeatPair.co K X 3)) = (HeatPair.co K X 3)
    lib_ring
  | 1 => by
    have := CgWindow.Psi_lo K X 1 2; rw [show 1 + 2 = 3 from rfl] at this; rw [this]
    show (K.add (K.add K.zero (HeatPair.co K X 2)) (HeatPair.co K X 4)) = (K.add (HeatPair.co K X 2) (HeatPair.co K X 4))
    lib_ring
  | 2 => by
    have := CgWindow.Psi_lo K X 2 1; rw [show 2 + 1 = 3 from rfl] at this; rw [this]
    show (K.add (K.add (K.add K.zero (HeatPair.co K X 1)) (HeatPair.co K X 3)) (HeatPair.co K X 5)) = (K.add (K.add (HeatPair.co K X 1) (HeatPair.co K X 3)) (HeatPair.co K X 5))
    lib_ring
  | d + 3 => by
    have := CgWindow.Psi_hi K X 3 d; rw [show 3 + d = d + 3 by lib_nat] at this; rw [this]
    show (K.add (K.add (K.add (K.add K.zero (HeatPair.co K X (d + 2 * 0))) (HeatPair.co K X (d + 2 * 1))) (HeatPair.co K X (d + 2 * 2))) (HeatPair.co K X (d + 2 * 3))) = (K.add (K.add (K.add (HeatPair.co K X d) (HeatPair.co K X (d + 2))) (HeatPair.co K X (d + 4))) (HeatPair.co K X (d + 6)))
    rw [show d + 2 * 0 = d by lib_nat, show d + 2 * 1 = d + 2 by lib_nat, show d + 2 * 2 = d + 4 by lib_nat, show d + 2 * 3 = d + 6 by lib_nat]; lib_ring

section ident

variable (x : Nat → R) (L : Nat) (hz : ∀ t, L ≤ t → x t = K.zero)

include hz in
theorem ip0 : ip K (Zs K (Zs K (Zs K x))) (Zs K x) (L + 8) = (K.add (K.add (K.add (Rk K x L 2) (K.neg K.zero)) K.zero) K.zero) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_zz]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 5 + 1) = _; rw [ip_z1]
  show ip K x (fun i => x (i + 2)) (L + 5) = _
  rw [ip_ext K _ (AVs.vsum K x [0]) _ (AVs.vsum K x [2]) (fun i => by show (x (i + 0)) = (K.add (x (i + 0)) K.zero); lib_ring) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [0] [2]) = _; rfl

include hz in
theorem ip1 : ip K (Zs K (Zs K x)) x (L + 8) = (K.add (K.add (K.add (Rk K x L 2) (K.neg K.zero)) K.zero) K.zero) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_z1]
  show ip K x (fun i => x (i + 2)) (L + 6) = _
  rw [ip_ext K _ (AVs.vsum K x [0]) _ (AVs.vsum K x [2]) (fun i => by show (x (i + 0)) = (K.add (x (i + 0)) K.zero); lib_ring) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [0] [2]) = _; rfl

include hz in
theorem ip2 : ip K (Zs K (Zs K (Zs K x))) x (L + 8) = (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) K.zero) K.zero) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 5 + 1) = _; rw [ip_z1]
  show ip K x (fun i => x (i + 3)) (L + 5) = _
  rw [ip_ext K _ (AVs.vsum K x [0]) _ (AVs.vsum K x [3]) (fun i => by show (x (i + 0)) = (K.add (x (i + 0)) K.zero); lib_ring) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [0] [3]) = _; rfl

include hz in
theorem ip3 : ip K (Zs K (Zs K x)) (Zs K x) (L + 8) = (K.add (K.add (K.add (Rk K x L 1) (K.neg K.zero)) K.zero) K.zero) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_zz]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_z1]
  show ip K x (fun i => x (i + 1)) (L + 6) = _
  rw [ip_ext K _ (AVs.vsum K x [0]) _ (AVs.vsum K x [1]) (fun i => by show (x (i + 0)) = (K.add (x (i + 0)) K.zero); lib_ring) (fun i => by show (x (i + 1)) = (K.add (x (i + 1)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [0] [1]) = _; rfl

include hz in
theorem ip4 : ip K (Zs K (c1v K x)) x (L + 8) = (K.add (K.mul (K.add K.zero (x 1)) (x 1)) (K.add (K.add (K.add (Rk K x L 2) (K.neg K.zero)) K.zero) (K.add (K.add (K.add (Rk K x L 0) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 0))) (K.mul (x 1) (x 1))))) K.zero) K.zero))) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K (c1v K x) (fun i => x (i + 1)) (L + 7) = _
  rw [show L + 7 = L + 6 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [0, 2]) _ (AVs.vsum K x [2]) (fun i => by show (K.add (x (i + 0)) (x (i + 2))) = (K.add (x (i + 0)) (K.add (x (i + 2)) K.zero)); lib_ring) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (K.add K.zero (x 1)) (x 1)) (AVs.psum K x L [0, 2] [2])) = _; rfl

include hz in
theorem ip5 : ip K (Zs K (c1v K x)) (Zs K x) (L + 8) = (K.add (K.mul (K.add K.zero (x 1)) (x 0)) (K.add (K.add (K.add (Rk K x L 1) (K.neg K.zero)) K.zero) (K.add (K.add (K.add (Rk K x L 1) (K.neg (K.add K.zero (K.mul (x 0) (x 1))))) K.zero) K.zero))) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_zz]
  show ip K (c1v K x) x (L + 7) = _
  rw [show L + 7 = L + 6 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [0, 2]) _ (AVs.vsum K x [1]) (fun i => by show (K.add (x (i + 0)) (x (i + 2))) = (K.add (x (i + 0)) (K.add (x (i + 2)) K.zero)); lib_ring) (fun i => by show (x (i + 1)) = (K.add (x (i + 1)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (K.add K.zero (x 1)) (x 0)) (AVs.psum K x L [0, 2] [1])) = _; rfl

include hz in
theorem ip6 : ip K (Zs K (Zs K (c1v K x))) (Zs K x) (L + 8) = (K.add (K.mul (K.add K.zero (x 1)) (x 1)) (K.add (K.add (K.add (Rk K x L 2) (K.neg K.zero)) K.zero) (K.add (K.add (K.add (Rk K x L 0) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 0))) (K.mul (x 1) (x 1))))) K.zero) K.zero))) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_zz]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_z1]
  show ip K (c1v K x) (fun i => x (i + 1)) (L + 6) = _
  rw [show L + 6 = L + 5 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [0, 2]) _ (AVs.vsum K x [2]) (fun i => by show (K.add (x (i + 0)) (x (i + 2))) = (K.add (x (i + 0)) (K.add (x (i + 2)) K.zero)); lib_ring) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (K.add K.zero (x 1)) (x 1)) (AVs.psum K x L [0, 2] [2])) = _; rfl

include hz in
theorem ip7 : ip K (Zs K (Zs K (c1v K x))) x (L + 8) = (K.add (K.mul (K.add K.zero (x 1)) (x 2)) (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) K.zero) (K.add (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))))) K.zero) K.zero))) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_z1]
  show ip K (c1v K x) (fun i => x (i + 2)) (L + 6) = _
  rw [show L + 6 = L + 5 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [0, 2]) _ (AVs.vsum K x [3]) (fun i => by show (K.add (x (i + 0)) (x (i + 2))) = (K.add (x (i + 0)) (K.add (x (i + 2)) K.zero)); lib_ring) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (K.add K.zero (x 1)) (x 2)) (AVs.psum K x L [0, 2] [3])) = _; rfl

include hz in
theorem ip8 : ip K x (Zs K (c1v K x)) (L + 8) = (K.add (K.mul (x 1) (K.add K.zero (x 1))) (K.add (K.add (K.add (Rk K x L 2) (K.neg K.zero)) (K.add (K.add (Rk K x L 0) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 0))) (K.mul (x 1) (x 1))))) K.zero)) K.zero)) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_1z]
  show ip K (fun i => x (i + 1)) (c1v K x) (L + 7) = _
  rw [show L + 7 = L + 6 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [2]) _ (AVs.vsum K x [0, 2]) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring) (fun i => by show (K.add (x (i + 0)) (x (i + 2))) = (K.add (x (i + 0)) (K.add (x (i + 2)) K.zero)); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 1) (K.add K.zero (x 1))) (AVs.psum K x L [2] [0, 2])) = _; rfl

include hz in
theorem ip9 : ip K (Zs K x) (Zs K (pv2 K x)) (L + 8) = (K.add (K.mul (x 0) (x 2)) (K.add (K.mul (x 1) (K.add (x 1) (x 3))) (K.add (K.add (K.add (Rk K x L 2) (K.neg K.zero)) (K.add (K.add (Rk K x L 0) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 0))) (K.mul (x 1) (x 1))))) (K.add (K.add (Rk K x L 2) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 2))) (K.mul (x 1) (x 3))))) K.zero))) K.zero))) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_zz]
  show ip K x (pv2 K x) (L + 7) = _
  rw [show L + 7 = L + 5 + 1 + 1 from rfl, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [2]) _ (AVs.vsum K x [0, 2, 4]) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring) (fun i => by show (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) K.zero))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 0) (x 2)) (K.add (K.mul (x 1) (K.add (x 1) (x 3))) (AVs.psum K x L [2] [0, 2, 4]))) = _; rfl

include hz in
theorem ip10 : ip K x (Zs K (pv2 K x)) (L + 8) = (K.add (K.mul (x 1) (x 2)) (K.add (K.mul (x 2) (K.add (x 1) (x 3))) (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))))) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))) (K.mul (x 2) (x 3))))) K.zero)  -- (+18 chars; full line in the Zenodo source)
  show ip K _ _ (L + 7 + 1) = _; rw [ip_1z]
  show ip K (fun i => x (i + 1)) (pv2 K x) (L + 7) = _
  rw [show L + 7 = L + 5 + 1 + 1 from rfl, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [3]) _ (AVs.vsum K x [0, 2, 4]) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring) (fun i => by show (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) K.zero))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 1) (x 2)) (K.add (K.mul (x 2) (K.add (x 1) (x 3))) (AVs.psum K x L [3] [0, 2, 4]))) = _; rfl

include hz in
theorem ip11 : ip K (Zs K x) (Zs K (c1v K x)) (L + 8) = (K.add (K.mul (x 0) (K.add K.zero (x 1))) (K.add (K.add (K.add (Rk K x L 1) (K.neg K.zero)) (K.add (K.add (Rk K x L 1) (K.neg (K.add K.zero (K.mul (x 0) (x 1))))) K.zero)) K.zero)) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_zz]
  show ip K x (c1v K x) (L + 7) = _
  rw [show L + 7 = L + 6 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [1]) _ (AVs.vsum K x [0, 2]) (fun i => by show (x (i + 1)) = (K.add (x (i + 1)) K.zero); lib_ring) (fun i => by show (K.add (x (i + 0)) (x (i + 2))) = (K.add (x (i + 0)) (K.add (x (i + 2)) K.zero)); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 0) (K.add K.zero (x 1))) (AVs.psum K x L [1] [0, 2])) = _; rfl

include hz in
theorem ip12 : ip K x (c1v K x) (L + 8) = (K.add (K.mul (x 0) (K.add K.zero (x 1))) (K.add (K.add (K.add (Rk K x L 1) (K.neg K.zero)) (K.add (K.add (Rk K x L 1) (K.neg (K.add K.zero (K.mul (x 0) (x 1))))) K.zero)) K.zero)) := by
  show ip K x (c1v K x) (L + 8) = _
  rw [show L + 8 = L + 7 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [1]) _ (AVs.vsum K x [0, 2]) (fun i => by show (x (i + 1)) = (K.add (x (i + 1)) K.zero); lib_ring) (fun i => by show (K.add (x (i + 0)) (x (i + 2))) = (K.add (x (i + 0)) (K.add (x (i + 2)) K.zero)); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 0) (K.add K.zero (x 1))) (AVs.psum K x L [1] [0, 2])) = _; rfl

include hz in
theorem ip13 : ip K x (pv2 K x) (L + 8) = (K.add (K.mul (x 0) (x 2)) (K.add (K.mul (x 1) (K.add (x 1) (x 3))) (K.add (K.add (K.add (Rk K x L 2) (K.neg K.zero)) (K.add (K.add (Rk K x L 0) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 0))) (K.mul (x 1) (x 1))))) (K.add (K.add (Rk K x L 2) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 2))) (K.mul (x 1) (x 3))))) K.zero))) K.zero))) := by
  show ip K x (pv2 K x) (L + 8) = _
  rw [show L + 8 = L + 6 + 1 + 1 from rfl, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [2]) _ (AVs.vsum K x [0, 2, 4]) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring) (fun i => by show (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) K.zero))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 0) (x 2)) (K.add (K.mul (x 1) (K.add (x 1) (x 3))) (AVs.psum K x L [2] [0, 2, 4]))) = _; rfl

include hz in
theorem ip14 : ip K x (pv3 K x) (L + 8) = (K.add (K.mul (x 0) (x 3)) (K.add (K.mul (x 1) (K.add (x 2) (x 4))) (K.add (K.mul (x 2) (K.add (K.add (x 1) (x 3)) (x 5))) (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))))) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.  -- (+195 chars; full line in the Zenodo source)
  show ip K x (pv3 K x) (L + 8) = _
  rw [show L + 8 = L + 5 + 1 + 1 + 1 from rfl, ip_head, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [3]) _ (AVs.vsum K x [0, 2, 4, 6]) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring) (fun i => by show (K.add (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) (x (i + 6))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) (K.add (x (i + 6)) K.zero)))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 0) (x 3)) (K.add (K.mul (x 1) (K.add (x 2) (x 4))) (K.add (K.mul (x 2) (K.add (K.add (x 1) (x 3)) (x 5))) (AVs.psum K x L [3] [0, 2, 4, 6])))) = _; rfl

include hz in
theorem ident : K.add (K.mul (LibRing.castN K 8) (K.mul (ip K x (pv2 K x) (L + 8)) (ip K x (pv2 K x) (L + 8)))) (K.neg (K.mul (LibRing.castN K 9) (K.mul (ip K x (c1v K x) (L + 8)) (ip K x (pv3 K x) (L + 8))))) = (K.add (K.mul (LibRing.castN K 8) (K.add (K.mul (ip K (Zs K (Zs K (Zs K x))) (Zs K x) (L + 8)) (ip K (Zs K (Zs K x)) x (L + 8))) (K.neg (K.mul (ip K (Zs K (Zs K (Zs K x))) x (L + 8)) (ip K  -- (+730 chars; full line in the Zenodo source)
  rw [ip0 K x L hz, ip1 K x L hz, ip2 K x L hz, ip3 K x L hz, ip4 K x L hz, ip5 K x L hz, ip6 K x L hz, ip7 K x L hz, ip8 K x L hz, ip9 K x L hz, ip10 K x L hz, ip11 K x L hz, ip12 K x L hz, ip13 K x L hz, ip14 K x L hz]
  ring_z

end ident

section signs

variable (O : ORing K) (x : Nat → R) (hx : ∀ j, O.le K.zero (x j))
  (hT : ∀ a w, O.le K.zero (K.add (K.mul (Zs K x (a + 1)) (Zs K x (a + w))) (K.neg (K.mul (Zs K x a) (Zs K x (a + w + 1))))))
  (hD : ∀ a k, O.le K.zero (Window.Dl K (Zs K x) a (a + k)))

include hx hT hD in
theorem sg0 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (Zs K (Zs K (Zs K x))) (Zs K (Zs K x)) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul K.zero K.zero) (K.neg (K.mul K.zero K.zero))))
      exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (1))) (K.neg (K.mul K.zero K.zero))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (2))) (K.neg (K.mul (Zs K x (1)) K.zero))))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          rw [show 0 + (w + 1 + 1 + 1) + 1 = w + 4 by lib_nat]
          show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (w + 3))) (K.neg (K.mul (Zs K x (w + 2)) K.zero))))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (1))) (K.neg (K.mul K.zero K.zero))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (2))) (K.neg (K.mul (Zs K x (1)) K.zero))))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) K.zero))))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
          | succ w =>
            rw [show 0 + 1 + (w + 1 + 1 + 1) + 1 = w + 5 by lib_nat]
            show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (w + 4))) (K.neg (K.mul (Zs K x (w + 3)) K.zero))))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (2))) (K.neg (K.mul (Zs K x (1)) (Zs K x (1))))))
          have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (1))) := O.mul_nonneg _ _ (hx (0)) (hx (0))
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (1))))))
            have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (0)) (hx (1))
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (1))))))
              have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (0)) (hx (2))
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              rw [show 0 + 1 + 1 + (w + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (w + 5))) (K.neg (K.mul (Zs K x (w + 4)) (Zs K x (1))))))
              have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (w + 4))) := O.mul_nonneg _ _ (hx (0)) (hx (w + 3))
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2)))))) := by
              have h := A2.mk K O x hT 1 (0) (0)
              try rw [show (0) + (0) + 1 + 1 = 2 by lib_nat] at h
              try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
              try rw [show (0) + 1 = 1 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (2))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3)))))) := by
                have h := A2.mk K O x hT 2 (0) (0)
                try rw [show (0) + (0) + 1 + 2 = 3 by lib_nat] at h
                try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                try rw [show (0) + 2 = 2 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (2))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (2)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT 3 (0) (0)
                  try rw [show (0) + (0) + 1 + 3 = 4 by lib_nat] at h
                  try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                  try rw [show (0) + 3 = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 6))) (K.neg (K.mul (Zs K x (w + 5)) (Zs K x (2))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 6))) (K.neg (K.mul (Zs K x (w + 5)) (Zs K x (2)))))) := by
                  have h := A2.mk K O x hT 1 (0) (w + 3)
                  try rw [show (0) + (w + 3) + 1 + 1 = w + 5 by lib_nat] at h
                  try rw [show (0) + (w + 3) + 1 = w + 4 by lib_nat] at h
                  try rw [show (0) + 1 = 1 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ a =>
          cases w with
          | zero =>
            rw [show a + 1 + 1 + 1 + 1 + 0 + 1 = a + 5 by lib_nat]
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 2)) (Zs K x (a + 4))) (K.neg (K.mul (Zs K x (a + 3)) (Zs K x (a + 3))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 2)) (Zs K x (a + 4))) (K.neg (K.mul (Zs K x (a + 3)) (Zs K x (a + 3)))))) := by
              have h := A2.mk K O x hT 1 (a + 1) (0)
              try rw [show (a + 1) + (0) + 1 + 1 = a + 3 by lib_nat] at h
              try rw [show (a + 1) + (0) + 1 = a + 2 by lib_nat] at h
              try rw [show (a + 1) + 1 = a + 2 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              rw [show a + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 2)) (Zs K x (a + 5))) (K.neg (K.mul (Zs K x (a + 4)) (Zs K x (a + 3))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 2)) (Zs K x (a + 5))) (K.neg (K.mul (Zs K x (a + 3)) (Zs K x (a + 4)))))) := by
                have h := A2.mk K O x hT 2 (a + 1) (0)
                try rw [show (a + 1) + (0) + 1 + 2 = a + 4 by lib_nat] at h
                try rw [show (a + 1) + (0) + 1 = a + 2 by lib_nat] at h
                try rw [show (a + 1) + 2 = a + 3 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 2)) (Zs K x (a + 6))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 3))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 2)) (Zs K x (a + 6))) (K.neg (K.mul (Zs K x (a + 3)) (Zs K x (a + 5)))))) := by
                  have h := A2.mk K O x hT 3 (a + 1) (0)
                  try rw [show (a + 1) + (0) + 1 + 3 = a + 5 by lib_nat] at h
                  try rw [show (a + 1) + (0) + 1 = a + 2 by lib_nat] at h
                  try rw [show (a + 1) + 3 = a + 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show a + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1) + 1 = a + w + 8 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 2)) (Zs K x (a + w + 7))) (K.neg (K.mul (Zs K x (a + w + 6)) (Zs K x (a + 3))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 2)) (Zs K x (a + w + 7))) (K.neg (K.mul (Zs K x (a + w + 6)) (Zs K x (a + 3)))))) := by
                  have h := A2.mk K O x hT 1 (a + 1) (w + 3)
                  try rw [show (a + 1) + (w + 3) + 1 + 1 = a + w + 6 by lib_nat] at h
                  try rw [show (a + 1) + (w + 3) + 1 = a + w + 5 by lib_nat] at h
                  try rw [show (a + 1) + 1 = a + 2 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

include hx hT hD in
theorem sg1 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (Zs K x) x i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (2))) (K.neg (K.mul (Zs K x (1)) (Zs K x (1))))))
      have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (1))) := O.mul_nonneg _ _ (hx (0)) (hx (0))
      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (1))))))
        have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (0)) (hx (1))
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (1))))))
          have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (0)) (hx (2))
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          rw [show 0 + (w + 1 + 1 + 1) + 1 = w + 4 by lib_nat]
          show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (w + 5))) (K.neg (K.mul (Zs K x (w + 4)) (Zs K x (1))))))
          have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (w + 4))) := O.mul_nonneg _ _ (hx (0)) (hx (w + 3))
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2))))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2)))))) := by
          have h := A2.mk K O x hT 1 (0) (0)
          try rw [show (0) + (0) + 1 + 1 = 2 by lib_nat] at h
          try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
          try rw [show (0) + 1 = 1 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (2))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3)))))) := by
            have h := A2.mk K O x hT 2 (0) (0)
            try rw [show (0) + (0) + 1 + 2 = 3 by lib_nat] at h
            try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
            try rw [show (0) + 2 = 2 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (2))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (2)) (Zs K x (4)))))) := by
              have h := A2.mk K O x hT 3 (0) (0)
              try rw [show (0) + (0) + 1 + 3 = 4 by lib_nat] at h
              try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
              try rw [show (0) + 3 = 3 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            rw [show 0 + 1 + (w + 1 + 1 + 1) + 1 = w + 5 by lib_nat]
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 6))) (K.neg (K.mul (Zs K x (w + 5)) (Zs K x (2))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 6))) (K.neg (K.mul (Zs K x (w + 5)) (Zs K x (2)))))) := by
              have h := A2.mk K O x hT 1 (0) (w + 3)
              try rw [show (0) + (w + 3) + 1 + 1 = w + 5 by lib_nat] at h
              try rw [show (0) + (w + 3) + 1 = w + 4 by lib_nat] at h
              try rw [show (0) + 1 = 1 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3)))))) := by
            have h := A2.mk K O x hT 1 (1) (0)
            try rw [show (1) + (0) + 1 + 1 = 3 by lib_nat] at h
            try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
            try rw [show (1) + 1 = 2 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (3))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
              have h := A2.mk K O x hT 2 (1) (0)
              try rw [show (1) + (0) + 1 + 2 = 4 by lib_nat] at h
              try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
              try rw [show (1) + 2 = 3 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (3))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
                have h := A2.mk K O x hT 3 (1) (0)
                try rw [show (1) + (0) + 1 + 3 = 5 by lib_nat] at h
                try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                try rw [show (1) + 3 = 4 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              rw [show 0 + 1 + 1 + (w + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 7))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (3))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 7))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (3)))))) := by
                have h := A2.mk K O x hT 1 (1) (w + 3)
                try rw [show (1) + (w + 3) + 1 + 1 = w + 6 by lib_nat] at h
                try rw [show (1) + (w + 3) + 1 = w + 5 by lib_nat] at h
                try rw [show (1) + 1 = 2 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
              have h := A2.mk K O x hT 1 (2) (0)
              try rw [show (2) + (0) + 1 + 1 = 4 by lib_nat] at h
              try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
              try rw [show (2) + 1 = 3 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (4))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
                have h := A2.mk K O x hT 2 (2) (0)
                try rw [show (2) + (0) + 1 + 2 = 5 by lib_nat] at h
                try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                try rw [show (2) + 2 = 4 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (4))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                  have h := A2.mk K O x hT 3 (2) (0)
                  try rw [show (2) + (0) + 1 + 3 = 6 by lib_nat] at h
                  try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                  try rw [show (2) + 3 = 5 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (4))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT 1 (2) (w + 3)
                  try rw [show (2) + (w + 3) + 1 + 1 = w + 7 by lib_nat] at h
                  try rw [show (2) + (w + 3) + 1 = w + 6 by lib_nat] at h
                  try rw [show (2) + 1 = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ a =>
          cases w with
          | zero =>
            rw [show a + 1 + 1 + 1 + 1 + 0 + 1 = a + 5 by lib_nat]
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 6))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 5))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 6))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 5)))))) := by
              have h := A2.mk K O x hT 1 (a + 3) (0)
              try rw [show (a + 3) + (0) + 1 + 1 = a + 5 by lib_nat] at h
              try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
              try rw [show (a + 3) + 1 = a + 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              rw [show a + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 7))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 5))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 7))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 6)))))) := by
                have h := A2.mk K O x hT 2 (a + 3) (0)
                try rw [show (a + 3) + (0) + 1 + 2 = a + 6 by lib_nat] at h
                try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                try rw [show (a + 3) + 2 = a + 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 5))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 7)))))) := by
                  have h := A2.mk K O x hT 3 (a + 3) (0)
                  try rw [show (a + 3) + (0) + 1 + 3 = a + 7 by lib_nat] at h
                  try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                  try rw [show (a + 3) + 3 = a + 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show a + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1) + 1 = a + w + 8 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + w + 9))) (K.neg (K.mul (Zs K x (a + w + 8)) (Zs K x (a + 5))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + w + 9))) (K.neg (K.mul (Zs K x (a + w + 8)) (Zs K x (a + 5)))))) := by
                  have h := A2.mk K O x hT 1 (a + 3) (w + 3)
                  try rw [show (a + 3) + (w + 3) + 1 + 1 = a + w + 8 by lib_nat] at h
                  try rw [show (a + 3) + (w + 3) + 1 = a + w + 7 by lib_nat] at h
                  try rw [show (a + 3) + 1 = a + 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

include hx hT hD in
theorem sg2 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (Zs K (Zs K (Zs K x))) (Zs K (c1v K x)) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add K.zero (Zs K x (2)))) (K.neg (K.mul K.zero K.zero))))
      exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (1)) (Zs K x (3)))) (K.neg (K.mul K.zero K.zero))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (Zs K x (1)) K.zero))))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          rw [show 0 + (w + 1 + 1 + 1) + 1 = w + 4 by lib_nat]
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (w + 3)) (Zs K x (w + 5)))) (K.neg (K.mul (Zs K x (w + 2)) K.zero))))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (1)) (Zs K x (3)))) (K.neg (K.mul K.zero (K.add K.zero (Zs K x (2)))))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (Zs K x (1)) (K.add K.zero (Zs K x (2)))))))
          have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (0)) (hx (1))
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (2)) (K.add K.zero (Zs K x (2)))))))
            have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (1)) (hx (1))
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            rw [show 0 + 1 + (w + 1 + 1 + 1) + 1 = w + 5 by lib_nat]
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (w + 4)) (Zs K x (w + 6)))) (K.neg (K.mul (Zs K x (w + 3)) (K.add K.zero (Zs K x (2)))))))
            have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (w + 3))) := O.mul_nonneg _ _ (hx (1)) (hx (w + 2))
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (Zs K x (1)) (K.add (Zs K x (1)) (Zs K x (3)))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (2))))) := A1.Dn K O x hD (0) (1) (0) (1) (2) (1) (2) (3) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t1 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (1)) (hx (1))
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (2)) (K.add (Zs K x (1)) (Zs K x (3)))))))
            have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (0)) (hx (1))
            have t1 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (1)) (hx (2))
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (3)) (K.add (Zs K x (1)) (Zs K x (3)))))))
              have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (0)) (hx (2))
              have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (2)) (hx (2))
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
            | succ w =>
              rw [show 0 + 1 + 1 + (w + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (w + 5)) (Zs K x (w + 7)))) (K.neg (K.mul (Zs K x (w + 4)) (K.add (Zs K x (1)) (Zs K x (3)))))))
              have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (w + 4))) := O.mul_nonneg _ _ (hx (0)) (hx (w + 3))
              have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (w + 4))) := O.mul_nonneg _ _ (hx (2)) (hx (w + 3))
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (2)) (K.add (Zs K x (2)) (Zs K x (4)))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3)))))) := by
              have h := A2.mk K O x hT 2 (0) (1)
              try rw [show (0) + (1) + 1 + 2 = 4 by lib_nat] at h
              try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
              try rw [show (0) + 2 = 2 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (3)) (K.add (Zs K x (2)) (Zs K x (4)))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3)))))) := by
                have h := A2.mk K O x hT 2 (0) (0)
                try rw [show (0) + (0) + 1 + 2 = 3 by lib_nat] at h
                try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                try rw [show (0) + 2 = 2 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
                have h := A2.mk K O x hT 3 (0) (1)
                try rw [show (0) + (1) + 1 + 3 = 5 by lib_nat] at h
                try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
                try rw [show (0) + 3 = 3 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (Zs K x (4)) (K.add (Zs K x (2)) (Zs K x (4)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (2)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT 3 (0) (0)
                  try rw [show (0) + (0) + 1 + 3 = 4 by lib_nat] at h
                  try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                  try rw [show (0) + 3 = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT 3 (0) (2)
                  try rw [show (0) + (2) + 1 + 3 = 6 by lib_nat] at h
                  try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
                  try rw [show (0) + 3 = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (w + 6)) (Zs K x (w + 8)))) (K.neg (K.mul (Zs K x (w + 5)) (K.add (Zs K x (2)) (Zs K x (4)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 6))) (K.neg (K.mul (Zs K x (w + 5)) (Zs K x (2)))))) := by
                  have h := A2.mk K O x hT 1 (0) (w + 3)
                  try rw [show (0) + (w + 3) + 1 + 1 = w + 5 by lib_nat] at h
                  try rw [show (0) + (w + 3) + 1 = w + 4 by lib_nat] at h
                  try rw [show (0) + 1 = 1 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 5)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT 3 (0) (w + 3)
                  try rw [show (0) + (w + 3) + 1 + 3 = w + 7 by lib_nat] at h
                  try rw [show (0) + (w + 3) + 1 = w + 4 by lib_nat] at h
                  try rw [show (0) + 3 = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
        | succ a =>
          cases w with
          | zero =>
            rw [show a + 1 + 1 + 1 + 1 + 0 + 1 = a + 5 by lib_nat]
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 2)) (K.add (Zs K x (a + 4)) (Zs K x (a + 6)))) (K.neg (K.mul (Zs K x (a + 3)) (K.add (Zs K x (a + 3)) (Zs K x (a + 5)))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 2)) (Zs K x (a + 6))) (K.neg (K.mul (Zs K x (a + 4)) (Zs K x (a + 4)))))) := by
              have h := A2.mk K O x hT 2 (a + 1) (1)
              try rw [show (a + 1) + (1) + 1 + 2 = a + 5 by lib_nat] at h
              try rw [show (a + 1) + (1) + 1 = a + 3 by lib_nat] at h
              try rw [show (a + 1) + 2 = a + 3 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 4))))) := A1.Dn K O x hD (a + 2) (1) (a + 2) (a + 3) (a + 4) (a + 3) (a + 4) (a + 5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              rw [show a + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 2)) (K.add (Zs K x (a + 5)) (Zs K x (a + 7)))) (K.neg (K.mul (Zs K x (a + 4)) (K.add (Zs K x (a + 3)) (Zs K x (a + 5)))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 2)) (Zs K x (a + 5))) (K.neg (K.mul (Zs K x (a + 3)) (Zs K x (a + 4)))))) := by
                have h := A2.mk K O x hT 2 (a + 1) (0)
                try rw [show (a + 1) + (0) + 1 + 2 = a + 4 by lib_nat] at h
                try rw [show (a + 1) + (0) + 1 = a + 2 by lib_nat] at h
                try rw [show (a + 1) + 2 = a + 3 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 2)) (Zs K x (a + 7))) (K.neg (K.mul (Zs K x (a + 4)) (Zs K x (a + 5)))))) := by
                have h := A2.mk K O x hT 3 (a + 1) (1)
                try rw [show (a + 1) + (1) + 1 + 3 = a + 6 by lib_nat] at h
                try rw [show (a + 1) + (1) + 1 = a + 3 by lib_nat] at h
                try rw [show (a + 1) + 3 = a + 4 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 2)) (K.add (Zs K x (a + 6)) (Zs K x (a + 8)))) (K.neg (K.mul (Zs K x (a + 5)) (K.add (Zs K x (a + 3)) (Zs K x (a + 5)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 2)) (Zs K x (a + 6))) (K.neg (K.mul (Zs K x (a + 3)) (Zs K x (a + 5)))))) := by
                  have h := A2.mk K O x hT 3 (a + 1) (0)
                  try rw [show (a + 1) + (0) + 1 + 3 = a + 5 by lib_nat] at h
                  try rw [show (a + 1) + (0) + 1 = a + 2 by lib_nat] at h
                  try rw [show (a + 1) + 3 = a + 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 2)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 5)))))) := by
                  have h := A2.mk K O x hT 3 (a + 1) (2)
                  try rw [show (a + 1) + (2) + 1 + 3 = a + 7 by lib_nat] at h
                  try rw [show (a + 1) + (2) + 1 = a + 4 by lib_nat] at h
                  try rw [show (a + 1) + 3 = a + 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
              | succ w =>
                rw [show a + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1) + 1 = a + w + 8 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 2)) (K.add (Zs K x (a + w + 7)) (Zs K x (a + w + 9)))) (K.neg (K.mul (Zs K x (a + w + 6)) (K.add (Zs K x (a + 3)) (Zs K x (a + 5)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 2)) (Zs K x (a + w + 7))) (K.neg (K.mul (Zs K x (a + w + 6)) (Zs K x (a + 3)))))) := by
                  have h := A2.mk K O x hT 1 (a + 1) (w + 3)
                  try rw [show (a + 1) + (w + 3) + 1 + 1 = a + w + 6 by lib_nat] at h
                  try rw [show (a + 1) + (w + 3) + 1 = a + w + 5 by lib_nat] at h
                  try rw [show (a + 1) + 1 = a + 2 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 2)) (Zs K x (a + w + 9))) (K.neg (K.mul (Zs K x (a + w + 6)) (Zs K x (a + 5)))))) := by
                  have h := A2.mk K O x hT 3 (a + 1) (w + 3)
                  try rw [show (a + 1) + (w + 3) + 1 + 3 = a + w + 8 by lib_nat] at h
                  try rw [show (a + 1) + (w + 3) + 1 = a + w + 5 by lib_nat] at h
                  try rw [show (a + 1) + 3 = a + 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)

include hx hT hD in
theorem sg3 (i w : Nat) : O.le K.zero (Lagrange.minor K (Zs K (Zs K x)) (Zs K (Zs K (c1v K x))) i (i + w + 1)) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.add (K.mul K.zero K.zero) (K.neg (K.mul K.zero K.zero)))
      exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.add (K.mul K.zero (K.add K.zero (Zs K x (2)))) (K.neg (K.mul (Zs K x (1)) K.zero)))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (1)) (Zs K x (3)))) (K.neg (K.mul (Zs K x (2)) K.zero)))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          rw [show 0 + (w + 1 + 1 + 1) + 1 = w + 4 by lib_nat]
          show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (w + 2)) (Zs K x (w + 4)))) (K.neg (K.mul (Zs K x (w + 3)) K.zero)))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.add (K.mul K.zero (K.add K.zero (Zs K x (2)))) (K.neg (K.mul (Zs K x (1)) K.zero)))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (1)) (Zs K x (3)))) (K.neg (K.mul (Zs K x (2)) K.zero)))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (Zs K x (3)) K.zero)))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
          | succ w =>
            rw [show 0 + 1 + (w + 1 + 1 + 1) + 1 = w + 5 by lib_nat]
            show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (w + 3)) (Zs K x (w + 5)))) (K.neg (K.mul (Zs K x (w + 4)) K.zero)))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (1)) (Zs K x (3)))) (K.neg (K.mul (Zs K x (2)) (K.add K.zero (Zs K x (2))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (2))))) := A1.Dn K O x hD (0) (1) (0) (1) (2) (1) (2) (3) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (Zs K x (3)) (K.add K.zero (Zs K x (2))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (4)) (K.add K.zero (Zs K x (2))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              rw [show 0 + 1 + 1 + (w + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (w + 4)) (Zs K x (w + 6)))) (K.neg (K.mul (Zs K x (w + 5)) (K.add K.zero (Zs K x (2))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 5))))) := A1.Dn K O x hD (0) (w + 4) (0) (1) (2) (w + 4) (w + 5) (w + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (Zs K x (3)) (K.add (Zs K x (1)) (Zs K x (3))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (4)) (K.add (Zs K x (1)) (Zs K x (3))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (5)) (K.add (Zs K x (1)) (Zs K x (3))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (w + 5)) (Zs K x (w + 7)))) (K.neg (K.mul (Zs K x (w + 6)) (K.add (Zs K x (1)) (Zs K x (3))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 6))))) := A1.Dn K O x hD (1) (w + 4) (1) (2) (3) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ a =>
          cases w with
          | zero =>
            rw [show a + 1 + 1 + 1 + 1 + 0 + 1 = a + 5 by lib_nat]
            show O.le K.zero (K.add (K.mul (Zs K x (a + 3)) (K.add (Zs K x (a + 3)) (Zs K x (a + 5)))) (K.neg (K.mul (Zs K x (a + 4)) (K.add (Zs K x (a + 2)) (Zs K x (a + 4))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 4))))) := A1.Dn K O x hD (a + 2) (1) (a + 2) (a + 3) (a + 4) (a + 3) (a + 4) (a + 5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              rw [show a + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 6 by lib_nat]
              show O.le K.zero (K.add (K.mul (Zs K x (a + 3)) (K.add (Zs K x (a + 4)) (Zs K x (a + 6)))) (K.neg (K.mul (Zs K x (a + 5)) (K.add (Zs K x (a + 2)) (Zs K x (a + 4))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 5))))) := A1.Dn K O x hD (a + 2) (2) (a + 2) (a + 3) (a + 4) (a + 4) (a + 5) (a + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.add (K.mul (Zs K x (a + 3)) (K.add (Zs K x (a + 5)) (Zs K x (a + 7)))) (K.neg (K.mul (Zs K x (a + 6)) (K.add (Zs K x (a + 2)) (Zs K x (a + 4))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 2) (3) (a + 2) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show a + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1) + 1 = a + w + 8 by lib_nat]
                show O.le K.zero (K.add (K.mul (Zs K x (a + 3)) (K.add (Zs K x (a + w + 6)) (Zs K x (a + w + 8)))) (K.neg (K.mul (Zs K x (a + w + 7)) (K.add (Zs K x (a + 2)) (Zs K x (a + 4))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 6)) (Zs K x (a + w + 8))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + w + 7))))) := A1.Dn K O x hD (a + 2) (w + 4) (a + 2) (a + 3) (a + 4) (a + w + 6) (a + w + 7) (a + w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

include hx hT hD in
theorem sg4 (i w : Nat) : O.le K.zero (Lagrange.minor K x (Zs K x) i (i + w + 1)) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.add (K.mul (Zs K x (1)) (Zs K x (1))) (K.neg (K.mul (Zs K x (2)) K.zero)))
      have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (1))) := O.mul_nonneg _ _ (hx (0)) (hx (0))
      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.add (K.mul (Zs K x (1)) (Zs K x (2))) (K.neg (K.mul (Zs K x (3)) K.zero)))
        have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (0)) (hx (1))
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (4)) K.zero)))
          have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (0)) (hx (2))
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          rw [show 0 + (w + 1 + 1 + 1) + 1 = w + 4 by lib_nat]
          show O.le K.zero (K.add (K.mul (Zs K x (1)) (Zs K x (w + 4))) (K.neg (K.mul (Zs K x (w + 5)) K.zero)))
          have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (w + 4))) := O.mul_nonneg _ _ (hx (0)) (hx (w + 3))
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.add (K.mul (Zs K x (2)) (Zs K x (2))) (K.neg (K.mul (Zs K x (3)) (Zs K x (1)))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2)))))) := by
          have h := A2.mk K O x hT 1 (0) (0)
          try rw [show (0) + (0) + 1 + 1 = 2 by lib_nat] at h
          try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
          try rw [show (0) + 1 = 1 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul (Zs K x (2)) (Zs K x (3))) (K.neg (K.mul (Zs K x (4)) (Zs K x (1)))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3)))))) := by
            have h := A2.mk K O x hT 2 (0) (0)
            try rw [show (0) + (0) + 1 + 2 = 3 by lib_nat] at h
            try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
            try rw [show (0) + 2 = 2 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (5)) (Zs K x (1)))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (2)) (Zs K x (4)))))) := by
              have h := A2.mk K O x hT 3 (0) (0)
              try rw [show (0) + (0) + 1 + 3 = 4 by lib_nat] at h
              try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
              try rw [show (0) + 3 = 3 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            rw [show 0 + 1 + (w + 1 + 1 + 1) + 1 = w + 5 by lib_nat]
            show O.le K.zero (K.add (K.mul (Zs K x (2)) (Zs K x (w + 5))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (1)))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 6))) (K.neg (K.mul (Zs K x (w + 5)) (Zs K x (2)))))) := by
              have h := A2.mk K O x hT 1 (0) (w + 3)
              try rw [show (0) + (w + 3) + 1 + 1 = w + 5 by lib_nat] at h
              try rw [show (0) + (w + 3) + 1 = w + 4 by lib_nat] at h
              try rw [show (0) + 1 = 1 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul (Zs K x (3)) (Zs K x (3))) (K.neg (K.mul (Zs K x (4)) (Zs K x (2)))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3)))))) := by
            have h := A2.mk K O x hT 1 (1) (0)
            try rw [show (1) + (0) + 1 + 1 = 3 by lib_nat] at h
            try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
            try rw [show (1) + 1 = 2 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (3)) (Zs K x (4))) (K.neg (K.mul (Zs K x (5)) (Zs K x (2)))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
              have h := A2.mk K O x hT 2 (1) (0)
              try rw [show (1) + (0) + 1 + 2 = 4 by lib_nat] at h
              try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
              try rw [show (1) + 2 = 3 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (6)) (Zs K x (2)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
                have h := A2.mk K O x hT 3 (1) (0)
                try rw [show (1) + (0) + 1 + 3 = 5 by lib_nat] at h
                try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                try rw [show (1) + 3 = 4 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              rw [show 0 + 1 + 1 + (w + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.add (K.mul (Zs K x (3)) (Zs K x (w + 6))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (2)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 7))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (3)))))) := by
                have h := A2.mk K O x hT 1 (1) (w + 3)
                try rw [show (1) + (w + 3) + 1 + 1 = w + 6 by lib_nat] at h
                try rw [show (1) + (w + 3) + 1 = w + 5 by lib_nat] at h
                try rw [show (1) + 1 = 2 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (4))) (K.neg (K.mul (Zs K x (5)) (Zs K x (3)))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
              have h := A2.mk K O x hT 1 (2) (0)
              try rw [show (2) + (0) + 1 + 1 = 4 by lib_nat] at h
              try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
              try rw [show (2) + 1 = 3 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (5))) (K.neg (K.mul (Zs K x (6)) (Zs K x (3)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
                have h := A2.mk K O x hT 2 (2) (0)
                try rw [show (2) + (0) + 1 + 2 = 5 by lib_nat] at h
                try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                try rw [show (2) + 2 = 4 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (7)) (Zs K x (3)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                  have h := A2.mk K O x hT 3 (2) (0)
                  try rw [show (2) + (0) + 1 + 3 = 6 by lib_nat] at h
                  try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                  try rw [show (2) + 3 = 5 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (w + 7))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (3)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT 1 (2) (w + 3)
                  try rw [show (2) + (w + 3) + 1 + 1 = w + 7 by lib_nat] at h
                  try rw [show (2) + (w + 3) + 1 = w + 6 by lib_nat] at h
                  try rw [show (2) + 1 = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ a =>
          cases w with
          | zero =>
            rw [show a + 1 + 1 + 1 + 1 + 0 + 1 = a + 5 by lib_nat]
            show O.le K.zero (K.add (K.mul (Zs K x (a + 5)) (Zs K x (a + 5))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 4)))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 6))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 5)))))) := by
              have h := A2.mk K O x hT 1 (a + 3) (0)
              try rw [show (a + 3) + (0) + 1 + 1 = a + 5 by lib_nat] at h
              try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
              try rw [show (a + 3) + 1 = a + 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              rw [show a + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 6 by lib_nat]
              show O.le K.zero (K.add (K.mul (Zs K x (a + 5)) (Zs K x (a + 6))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 4)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 7))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 6)))))) := by
                have h := A2.mk K O x hT 2 (a + 3) (0)
                try rw [show (a + 3) + (0) + 1 + 2 = a + 6 by lib_nat] at h
                try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                try rw [show (a + 3) + 2 = a + 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.add (K.mul (Zs K x (a + 5)) (Zs K x (a + 7))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 4)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 7)))))) := by
                  have h := A2.mk K O x hT 3 (a + 3) (0)
                  try rw [show (a + 3) + (0) + 1 + 3 = a + 7 by lib_nat] at h
                  try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                  try rw [show (a + 3) + 3 = a + 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show a + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1) + 1 = a + w + 8 by lib_nat]
                show O.le K.zero (K.add (K.mul (Zs K x (a + 5)) (Zs K x (a + w + 8))) (K.neg (K.mul (Zs K x (a + w + 9)) (Zs K x (a + 4)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + w + 9))) (K.neg (K.mul (Zs K x (a + w + 8)) (Zs K x (a + 5)))))) := by
                  have h := A2.mk K O x hT 1 (a + 3) (w + 3)
                  try rw [show (a + 3) + (w + 3) + 1 + 1 = a + w + 8 by lib_nat] at h
                  try rw [show (a + 3) + (w + 3) + 1 = a + w + 7 by lib_nat] at h
                  try rw [show (a + 3) + 1 = a + 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

include hx hT hD in
theorem sg5 (i w : Nat) : O.le K.zero (Lagrange.minor K (Zs K (c1v K x)) (Zs K (pv2 K x)) i (i + w + 1)) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.add (K.mul K.zero (Zs K x (3))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) K.zero)))
      exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) K.zero)))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul K.zero (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) K.zero)))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          rw [show 0 + (w + 1 + 1 + 1) + 1 = w + 4 by lib_nat]
          show O.le K.zero (K.add (K.mul K.zero (K.add (K.add (Zs K x (w + 2)) (Zs K x (w + 4))) (Zs K x (w + 6)))) (K.neg (K.mul (K.add (Zs K x (w + 3)) (Zs K x (w + 5))) K.zero)))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.add (K.mul (K.add K.zero (Zs K x (2))) (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3)))))
        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul (K.add K.zero (Zs K x (2))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (3)))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (K.add K.zero (Zs K x (2))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3)))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
          | succ w =>
            rw [show 0 + 1 + (w + 1 + 1 + 1) + 1 = w + 5 by lib_nat]
            show O.le K.zero (K.add (K.mul (K.add K.zero (Zs K x (2))) (K.add (K.add (Zs K x (w + 3)) (Zs K x (w + 5))) (Zs K x (w + 7)))) (K.neg (K.mul (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (3)))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 5))))) := A1.Dn K O x hD (0) (w + 4) (0) (1) (2) (w + 4) (w + 5) (w + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 3)) (Zs K x (w + 5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 4))))) := A1.Dn K O x hD (1) (w + 2) (1) (2) (3) (w + 3) (w + 4) (w + 5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 6))))) := A1.Dn K O x hD (1) (w + 4) (1) (2) (3) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (K.add (Zs K x (2)) (Zs K x (4))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (2))))) := A1.Dn K O x hD (0) (1) (0) (1) (2) (1) (2) (3) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (Zs K x (2)) (Zs K x (4))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (K.add (Zs K x (2)) (Zs K x (4))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
            | succ w =>
              rw [show 0 + 1 + 1 + (w + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (K.add (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (w + 8)))) (K.neg (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (K.add (Zs K x (2)) (Zs K x (4))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 5))))) := A1.Dn K O x hD (0) (w + 4) (0) (1) (2) (w + 4) (w + 5) (w + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 7))))) := A1.Dn K O x hD (0) (w + 6) (0) (1) (2) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 6))))) := A1.Dn K O x hD (1) (w + 4) (1) (2) (3) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 5))))) := A1.Dn K O x hD (2) (w + 2) (2) (3) (4) (w + 4) (w + 5) (w + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 7))))) := A1.Dn K O x hD (2) (w + 4) (2) (3) (4) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (K.add (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (w + 9)))) (K.neg (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 6))))) := A1.Dn K O x hD (1) (w + 4) (1) (2) (3) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 8))))) := A1.Dn K O x hD (1) (w + 6) (1) (2) (3) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 7))))) := A1.Dn K O x hD (2) (w + 4) (2) (3) (4) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 6))))) := A1.Dn K O x hD (3) (w + 2) (3) (4) (5) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 8))))) := A1.Dn K O x hD (3) (w + 4) (3) (4) (5) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
        | succ a =>
          cases w with
          | zero =>
            rw [show a + 1 + 1 + 1 + 1 + 0 + 1 = a + 5 by lib_nat]
            show O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (K.add (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7)))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 4))))) := A1.Dn K O x hD (a + 2) (1) (a + 2) (a + 3) (a + 4) (a + 3) (a + 4) (a + 5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 2) (3) (a + 2) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 4) (1) (a + 4) (a + 5) (a + 6) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              rw [show a + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 6 by lib_nat]
              show O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8)))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 5))))) := A1.Dn K O x hD (a + 2) (2) (a + 2) (a + 3) (a + 4) (a + 4) (a + 5) (a + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 2) (4) (a + 2) (a + 3) (a + 4) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 3) (2) (a + 3) (a + 4) (a + 5) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 4) (2) (a + 4) (a + 5) (a + 6) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (K.add (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9)))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 2) (3) (a + 2) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 2) (5) (a + 2) (a + 3) (a + 4) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 3) (3) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 4) (1) (a + 4) (a + 5) (a + 6) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 4) (3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
              | succ w =>
                rw [show a + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1) + 1 = a + w + 8 by lib_nat]
                show O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (K.add (K.add (Zs K x (a + w + 6)) (Zs K x (a + w + 8))) (Zs K x (a + w + 10)))) (K.neg (K.mul (K.add (Zs K x (a + w + 7)) (Zs K x (a + w + 9))) (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 6)) (Zs K x (a + w + 8))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + w + 7))))) := A1.Dn K O x hD (a + 2) (w + 4) (a + 2) (a + 3) (a + 4) (a + w + 6) (a + w + 7) (a + w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 8)) (Zs K x (a + w + 10))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + w + 9))))) := A1.Dn K O x hD (a + 2) (w + 6) (a + 2) (a + 3) (a + 4) (a + w + 8) (a + w + 9) (a + w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 7)) (Zs K x (a + w + 9))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + w + 8))))) := A1.Dn K O x hD (a + 3) (w + 4) (a + 3) (a + 4) (a + 5) (a + w + 7) (a + w + 8) (a + w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 6)) (Zs K x (a + w + 8))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + w + 7))))) := A1.Dn K O x hD (a + 4) (w + 2) (a + 4) (a + 5) (a + 6) (a + w + 6) (a + w + 7) (a + w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 8)) (Zs K x (a + w + 10))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + w + 9))))) := A1.Dn K O x hD (a + 4) (w + 4) (a + 4) (a + 5) (a + 6) (a + w + 8) (a + w + 9) (a + w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)

end signs

section final

variable (O : ORing K)

/-- **(A) at n = 1 for every length** (generated): a v-good X gives 9 c_1 c_3 ≤ 8 c_2² -/
theorem prod_lc (F : OField.OF K O) (h1 : O.le K.zero K.one) (X : List R) (hXg : L1Full.Good K O X) (M : Nat) (hX : X.length = M + 2) :
    O.le (K.mul (LibRing.castN K 9) (K.mul (cgc K X X 1) (cgc K X X 3)))
      (K.mul (LibRing.castN K 8) (K.mul (cgc K X X 2) (cgc K X X 2))) := by
  have ⟨hb, hpos, hv, h0⟩ := hXg
  let x := co K X
  have hzY : ∀ t, M + 3 ≤ t → Zs K x t = K.zero := fun t ht => by
    cases t with
    | zero => exact absurd ht (Nat.not_succ_le_zero _)
    | succ t => exact HeatLR.co_out K X t (by rw [hX]; exact Nat.le_of_succ_le_succ ht)
  have hY : ∀ j, O.le K.zero (Zs K x j) := fun j => by cases j with
    | zero => exact O.le_refl _
    | succ j => exact hb j
  have hD : ∀ a k, O.le K.zero (Window.Dl K (Zs K x) a (a + k)) := fun a k =>
    Window.dl_nn_t K O F (Zs K x) hY (M + 3)
      (fun j hj => hpos j (by rw [hX]; exact Nat.lt_of_succ_lt_succ hj))
      hzY (CgWindow.VV_Zs K O x hv h0) a k
  have hT : ∀ a w, O.le K.zero (K.add (K.mul (Zs K x (a + 1)) (Zs K x (a + w))) (K.neg (K.mul (Zs K x a) (Zs K x (a + w + 1))))) := by
    intro a w
    rw [← Lagrange.tail_minor K (Zs K x) (M + 3) hzY a w (M + 3) (by lib_nat_le)]
    exact CauchyBinet2.sum_nn K O _ (fun i => by rw [show a + w + i = a + i + w by lib_nat]; exact hD (a + i) w) _
  have hxz : ∀ t, M + 1 + 1 ≤ t → x t = K.zero := A1C.hzX K X (M + 1) hX
  have cb0 := CauchyBinet2.cb_nonneg K O (Zs K (Zs K (Zs K x))) (Zs K (Zs K x)) (Zs K x) x (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => A1.prod_np K O _ _ (A1.nn_neg K O _ (sg0 K O x hb hT hD i w)) (A1.nn_neg K O _ (sg1 K O x hb hT hD i w))))
  have cn0 := SU2CharExp.cN_nn K O h1 8
  have cb1 := CauchyBinet2.cb_nonneg K O (Zs K (Zs K (Zs K x))) (Zs K (c1v K x)) (Zs K x) x (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => A1.prod_np K O _ _ (A1.nn_neg K O _ (sg2 K O x hb hT hD i w)) (A1.nn_neg K O _ (sg1 K O x hb hT hD i w))))
  have cn1 := SU2CharExp.cN_nn K O h1 4
  have cb2 := CauchyBinet2.cb_nonneg K O (Zs K (Zs K x)) (Zs K (Zs K (c1v K x))) x (Zs K x) (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => O.mul_nonneg _ _ (sg3 K O x hb hT hD i w) (sg4 K O x hb hT hD i w)))
  have cn2 := SU2CharExp.cN_nn K O h1 4
  have cb3 := CauchyBinet2.cb_nonneg K O x (Zs K x) (Zs K (c1v K x)) (Zs K (pv2 K x)) (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => O.mul_nonneg _ _ (sg4 K O x hb hT hD i w) (sg5 K O x hb hT hD i w)))
  have cn3 := SU2CharExp.cN_nn K O h1 8
  have tot := (A1.nn_add K O _ _ (A1.pos_mul K O _ _ cn0 cb0) (A1.nn_add K O _ _ (A1.pos_mul K O _ _ cn1 cb1) (A1.nn_add K O _ _ (A1.pos_mul K O _ _ cn2 cb2) (A1.nn_add K O _ _ (A1.pos_mul K O _ _ cn3 cb3) (O.le_refl K.zero)))))
  have id := ident K x (M + 1 + 1) hxz
  apply A1.le_of_sub_nn K O
  rw [A1C.cgc_ip K X (M + 1) 1 hX (c1v K (co K X)) (fun j => by rw [LC0.psi1]; cases j with
      | zero => show co K X 1 = K.add K.zero (co K X 1); lib_ring
      | succ j => rfl) 8]
  rw [A1C.cgc_ip K X (M + 1) 2 hX (pv2 K (co K X)) (psi2 K X) 8]
  rw [A1C.cgc_ip K X (M + 1) 3 hX (pv3 K (co K X)) (psi3 K X) 8]
  show O.le K.zero _
  rw [id]; exact tot

end final

end GenA1

#print axioms GenA1.ident
#print axioms GenA1.prod_lc

ym/GenA2.lean

lean_all/ym/GenA2.lean

/-
  ym/GenA2 — T45, G54: generated c-level identity for (A) at n = 2 (cert/A/gen/gen_ident.py).
  Lean 4 core only, no axioms.
-/
import ym.AVs
import ym.RingZ
import ym.A2

set_option linter.unusedSectionVars false

namespace GenA2

open YMChain QBinom CgWindow A1Ip A2Ip MigdalCone HeatPair

variable {R : Type} (K : DetChain.CRing R)

def pv2 (x : Nat → R) : Nat → R
  | 0 => (x 2)
  | 1 => (K.add (x 1) (x 3))
  | d + 2 => (K.add (K.add (x d) (x (d + 2))) (x (d + 4)))

def pv3 (x : Nat → R) : Nat → R
  | 0 => (x 3)
  | 1 => (K.add (x 2) (x 4))
  | 2 => (K.add (K.add (x 1) (x 3)) (x 5))
  | d + 3 => (K.add (K.add (K.add (x d) (x (d + 2))) (x (d + 4))) (x (d + 6)))

def pv4 (x : Nat → R) : Nat → R
  | 0 => (x 4)
  | 1 => (K.add (x 3) (x 5))
  | 2 => (K.add (K.add (x 2) (x 4)) (x 6))
  | 3 => (K.add (K.add (K.add (x 1) (x 3)) (x 5)) (x 7))
  | d + 4 => (K.add (K.add (K.add (K.add (x d) (x (d + 2))) (x (d + 4))) (x (d + 6))) (x (d + 8)))

theorem psi2 (X : List R) : ∀ j, CgWindow.Psi K X j 2 = pv2 K (HeatPair.co K X) j
  | 0 => by
    have := CgWindow.Psi_lo K X 0 2; rw [show 0 + 2 = 2 from rfl] at this; rw [this]
    show (K.add K.zero (HeatPair.co K X 2)) = (HeatPair.co K X 2)
    lib_ring
  | 1 => by
    have := CgWindow.Psi_lo K X 1 1; rw [show 1 + 1 = 2 from rfl] at this; rw [this]
    show (K.add (K.add K.zero (HeatPair.co K X 1)) (HeatPair.co K X 3)) = (K.add (HeatPair.co K X 1) (HeatPair.co K X 3))
    lib_ring
  | d + 2 => by
    have := CgWindow.Psi_hi K X 2 d; rw [show 2 + d = d + 2 by lib_nat] at this; rw [this]
    show (K.add (K.add (K.add K.zero (HeatPair.co K X (d + 2 * 0))) (HeatPair.co K X (d + 2 * 1))) (HeatPair.co K X (d + 2 * 2))) = (K.add (K.add (HeatPair.co K X d) (HeatPair.co K X (d + 2))) (HeatPair.co K X (d + 4)))
    rw [show d + 2 * 0 = d by lib_nat, show d + 2 * 1 = d + 2 by lib_nat, show d + 2 * 2 = d + 4 by lib_nat]; lib_ring

theorem psi3 (X : List R) : ∀ j, CgWindow.Psi K X j 3 = pv3 K (HeatPair.co K X) j
  | 0 => by
    have := CgWindow.Psi_lo K X 0 3; rw [show 0 + 3 = 3 from rfl] at this; rw [this]
    show (K.add K.zero (HeatPair.co K X 3)) = (HeatPair.co K X 3)
    lib_ring
  | 1 => by
    have := CgWindow.Psi_lo K X 1 2; rw [show 1 + 2 = 3 from rfl] at this; rw [this]
    show (K.add (K.add K.zero (HeatPair.co K X 2)) (HeatPair.co K X 4)) = (K.add (HeatPair.co K X 2) (HeatPair.co K X 4))
    lib_ring
  | 2 => by
    have := CgWindow.Psi_lo K X 2 1; rw [show 2 + 1 = 3 from rfl] at this; rw [this]
    show (K.add (K.add (K.add K.zero (HeatPair.co K X 1)) (HeatPair.co K X 3)) (HeatPair.co K X 5)) = (K.add (K.add (HeatPair.co K X 1) (HeatPair.co K X 3)) (HeatPair.co K X 5))
    lib_ring
  | d + 3 => by
    have := CgWindow.Psi_hi K X 3 d; rw [show 3 + d = d + 3 by lib_nat] at this; rw [this]
    show (K.add (K.add (K.add (K.add K.zero (HeatPair.co K X (d + 2 * 0))) (HeatPair.co K X (d + 2 * 1))) (HeatPair.co K X (d + 2 * 2))) (HeatPair.co K X (d + 2 * 3))) = (K.add (K.add (K.add (HeatPair.co K X d) (HeatPair.co K X (d + 2))) (HeatPair.co K X (d + 4))) (HeatPair.co K X (d + 6)))
    rw [show d + 2 * 0 = d by lib_nat, show d + 2 * 1 = d + 2 by lib_nat, show d + 2 * 2 = d + 4 by lib_nat, show d + 2 * 3 = d + 6 by lib_nat]; lib_ring

theorem psi4 (X : List R) : ∀ j, CgWindow.Psi K X j 4 = pv4 K (HeatPair.co K X) j
  | 0 => by
    have := CgWindow.Psi_lo K X 0 4; rw [show 0 + 4 = 4 from rfl] at this; rw [this]
    show (K.add K.zero (HeatPair.co K X 4)) = (HeatPair.co K X 4)
    lib_ring
  | 1 => by
    have := CgWindow.Psi_lo K X 1 3; rw [show 1 + 3 = 4 from rfl] at this; rw [this]
    show (K.add (K.add K.zero (HeatPair.co K X 3)) (HeatPair.co K X 5)) = (K.add (HeatPair.co K X 3) (HeatPair.co K X 5))
    lib_ring
  | 2 => by
    have := CgWindow.Psi_lo K X 2 2; rw [show 2 + 2 = 4 from rfl] at this; rw [this]
    show (K.add (K.add (K.add K.zero (HeatPair.co K X 2)) (HeatPair.co K X 4)) (HeatPair.co K X 6)) = (K.add (K.add (HeatPair.co K X 2) (HeatPair.co K X 4)) (HeatPair.co K X 6))
    lib_ring
  | 3 => by
    have := CgWindow.Psi_lo K X 3 1; rw [show 3 + 1 = 4 from rfl] at this; rw [this]
    show (K.add (K.add (K.add (K.add K.zero (HeatPair.co K X 1)) (HeatPair.co K X 3)) (HeatPair.co K X 5)) (HeatPair.co K X 7)) = (K.add (K.add (K.add (HeatPair.co K X 1) (HeatPair.co K X 3)) (HeatPair.co K X 5)) (HeatPair.co K X 7))
    lib_ring
  | d + 4 => by
    have := CgWindow.Psi_hi K X 4 d; rw [show 4 + d = d + 4 by lib_nat] at this; rw [this]
    show (K.add (K.add (K.add (K.add (K.add K.zero (HeatPair.co K X (d + 2 * 0))) (HeatPair.co K X (d + 2 * 1))) (HeatPair.co K X (d + 2 * 2))) (HeatPair.co K X (d + 2 * 3))) (HeatPair.co K X (d + 2 * 4))) = (K.add (K.add (K.add (K.add (HeatPair.co K X d) (HeatPair.co K X (d + 2))) (HeatPair.co K X (d + 4))) (HeatPair.co K X (d + 6))) (HeatPair.co K X (d + 8)))
    rw [show d + 2 * 0 = d by lib_nat, show d + 2 * 1 = d + 2 by lib_nat, show d + 2 * 2 = d + 4 by lib_nat, show d + 2 * 3 = d + 6 by lib_nat, show d + 2 * 4 = d + 8 by lib_nat]; lib_ring

section ident

variable (x : Nat → R) (L : Nat) (hz : ∀ t, L ≤ t → x t = K.zero)

include hz in
theorem ip0 : ip K (Zs K (Zs K (Zs K x))) x (L + 8) = (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) K.zero) K.zero) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 5 + 1) = _; rw [ip_z1]
  show ip K x (fun i => x (i + 3)) (L + 5) = _
  rw [ip_ext K _ (AVs.vsum K x [0]) _ (AVs.vsum K x [3]) (fun i => by show (x (i + 0)) = (K.add (x (i + 0)) K.zero); lib_ring) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [0] [3]) = _; rfl

include hz in
theorem ip1 : ip K (Zs K (Zs K x)) (fun i => x (i + 1)) (L + 8) = (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) K.zero) K.zero) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_z1]
  show ip K x (fun i => x (i + 3)) (L + 6) = _
  rw [ip_ext K _ (AVs.vsum K x [0]) _ (AVs.vsum K x [3]) (fun i => by show (x (i + 0)) = (K.add (x (i + 0)) K.zero); lib_ring) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [0] [3]) = _; rfl

include hz in
theorem ip2 : ip K (Zs K (Zs K (Zs K x))) (fun i => x (i + 1)) (L + 8) = (K.add (K.add (K.add (Rk K x L 4) (K.neg K.zero)) K.zero) K.zero) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 5 + 1) = _; rw [ip_z1]
  show ip K x (fun i => x (i + 4)) (L + 5) = _
  rw [ip_ext K _ (AVs.vsum K x [0]) _ (AVs.vsum K x [4]) (fun i => by show (x (i + 0)) = (K.add (x (i + 0)) K.zero); lib_ring) (fun i => by show (x (i + 4)) = (K.add (x (i + 4)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [0] [4]) = _; rfl

include hz in
theorem ip3 : ip K (Zs K (Zs K x)) x (L + 8) = (K.add (K.add (K.add (Rk K x L 2) (K.neg K.zero)) K.zero) K.zero) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_z1]
  show ip K x (fun i => x (i + 2)) (L + 6) = _
  rw [ip_ext K _ (AVs.vsum K x [0]) _ (AVs.vsum K x [2]) (fun i => by show (x (i + 0)) = (K.add (x (i + 0)) K.zero); lib_ring) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [0] [2]) = _; rfl

include hz in
theorem ip4 : ip K (Zs K (c1v K x)) (fun i => x (i + 1)) (L + 8) = (K.add (K.mul (K.add K.zero (x 1)) (x 2)) (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) K.zero) (K.add (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))))) K.zero) K.zero))) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K (c1v K x) (fun i => x (i + 2)) (L + 7) = _
  rw [show L + 7 = L + 6 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [0, 2]) _ (AVs.vsum K x [3]) (fun i => by show (K.add (x (i + 0)) (x (i + 2))) = (K.add (x (i + 0)) (K.add (x (i + 2)) K.zero)); lib_ring) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (K.add K.zero (x 1)) (x 2)) (AVs.psum K x L [0, 2] [3])) = _; rfl

include hz in
theorem ip5 : ip K (Zs K (c1v K x)) x (L + 8) = (K.add (K.mul (K.add K.zero (x 1)) (x 1)) (K.add (K.add (K.add (Rk K x L 2) (K.neg K.zero)) K.zero) (K.add (K.add (K.add (Rk K x L 0) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 0))) (K.mul (x 1) (x 1))))) K.zero) K.zero))) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K (c1v K x) (fun i => x (i + 1)) (L + 7) = _
  rw [show L + 7 = L + 6 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [0, 2]) _ (AVs.vsum K x [2]) (fun i => by show (K.add (x (i + 0)) (x (i + 2))) = (K.add (x (i + 0)) (K.add (x (i + 2)) K.zero)); lib_ring) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (K.add K.zero (x 1)) (x 1)) (AVs.psum K x L [0, 2] [2])) = _; rfl

include hz in
theorem ip6 : ip K (pv2 K x) (fun i => x (i + 1)) (L + 8) = (K.add (K.mul (x 2) (x 1)) (K.add (K.mul (K.add (x 1) (x 3)) (x 2)) (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) K.zero) (K.add (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))))) K.zero) (K.add (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x   -- (+59 chars; full line in the Zenodo source)
  show ip K (pv2 K x) (fun i => x (i + 1)) (L + 8) = _
  rw [show L + 8 = L + 6 + 1 + 1 from rfl, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [0, 2, 4]) _ (AVs.vsum K x [3]) (fun i => by show (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) K.zero))); lib_ring) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 2) (x 1)) (K.add (K.mul (K.add (x 1) (x 3)) (x 2)) (AVs.psum K x L [0, 2, 4] [3]))) = _; rfl

include hz in
theorem ip7 : ip K (pv2 K x) x (L + 8) = (K.add (K.mul (x 2) (x 0)) (K.add (K.mul (K.add (x 1) (x 3)) (x 1)) (K.add (K.add (K.add (Rk K x L 2) (K.neg K.zero)) K.zero) (K.add (K.add (K.add (Rk K x L 0) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 0))) (K.mul (x 1) (x 1))))) K.zero) (K.add (K.add (K.add (Rk K x L 2) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 2))) (K.mul (x 1) (x 3))))) K.zero) K.zer  -- (+12 chars; full line in the Zenodo source)
  show ip K (pv2 K x) x (L + 8) = _
  rw [show L + 8 = L + 6 + 1 + 1 from rfl, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [0, 2, 4]) _ (AVs.vsum K x [2]) (fun i => by show (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) K.zero))); lib_ring) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 2) (x 0)) (K.add (K.mul (K.add (x 1) (x 3)) (x 1)) (AVs.psum K x L [0, 2, 4] [2]))) = _; rfl

include hz in
theorem ip8 : ip K (Zs K (Zs K x)) (Zs K (Zs K (pv3 K x))) (L + 8) = (K.add (K.mul (x 0) (x 3)) (K.add (K.mul (x 1) (K.add (x 2) (x 4))) (K.add (K.mul (x 2) (K.add (K.add (x 1) (x 3)) (x 5))) (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))))) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add (K.add K.ze  -- (+222 chars; full line in the Zenodo source)
  show ip K _ _ (L + 7 + 1) = _; rw [ip_zz]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_zz]
  show ip K x (pv3 K x) (L + 6) = _
  rw [show L + 6 = L + 3 + 1 + 1 + 1 from rfl, ip_head, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [3]) _ (AVs.vsum K x [0, 2, 4, 6]) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring) (fun i => by show (K.add (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) (x (i + 6))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) (K.add (x (i + 6)) K.zero)))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 0) (x 3)) (K.add (K.mul (x 1) (K.add (x 2) (x 4))) (K.add (K.mul (x 2) (K.add (K.add (x 1) (x 3)) (x 5))) (AVs.psum K x L [3] [0, 2, 4, 6])))) = _; rfl

include hz in
theorem ip9 : ip K (Zs K x) (Zs K (Zs K (pv2 K x))) (L + 8) = (K.add (K.mul (x 1) (x 2)) (K.add (K.mul (x 2) (K.add (x 1) (x 3))) (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))))) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))) (K.mul (x 2) (x 3  -- (+31 chars; full line in the Zenodo source)
  show ip K _ _ (L + 7 + 1) = _; rw [ip_zz]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_1z]
  show ip K (fun i => x (i + 1)) (pv2 K x) (L + 6) = _
  rw [show L + 6 = L + 4 + 1 + 1 from rfl, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [3]) _ (AVs.vsum K x [0, 2, 4]) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring) (fun i => by show (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) K.zero))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 1) (x 2)) (K.add (K.mul (x 2) (K.add (x 1) (x 3))) (AVs.psum K x L [3] [0, 2, 4]))) = _; rfl

include hz in
theorem ip10 : ip K (Zs K (Zs K x)) (Zs K (Zs K (pv2 K x))) (L + 8) = (K.add (K.mul (x 0) (x 2)) (K.add (K.mul (x 1) (K.add (x 1) (x 3))) (K.add (K.add (K.add (Rk K x L 2) (K.neg K.zero)) (K.add (K.add (Rk K x L 0) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 0))) (K.mul (x 1) (x 1))))) (K.add (K.add (Rk K x L 2) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 2))) (K.mul (x 1) (x 3))))) K.zero))) K.ze  -- (+11 chars; full line in the Zenodo source)
  show ip K _ _ (L + 7 + 1) = _; rw [ip_zz]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_zz]
  show ip K x (pv2 K x) (L + 6) = _
  rw [show L + 6 = L + 4 + 1 + 1 from rfl, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [2]) _ (AVs.vsum K x [0, 2, 4]) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring) (fun i => by show (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) K.zero))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 0) (x 2)) (K.add (K.mul (x 1) (K.add (x 1) (x 3))) (AVs.psum K x L [2] [0, 2, 4]))) = _; rfl

include hz in
theorem ip11 : ip K (Zs K x) (Zs K (Zs K (pv3 K x))) (L + 8) = (K.add (K.mul (x 1) (x 3)) (K.add (K.mul (x 2) (K.add (x 2) (x 4))) (K.add (K.mul (x 3) (K.add (K.add (x 1) (x 3)) (x 5))) (K.add (K.add (K.add (Rk K x L 4) (K.neg K.zero)) (K.add (K.add (Rk K x L 2) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 2))) (K.mul (x 1) (x 3))))) (K.add (K.add (Rk K x L 0) (K.neg (K.add (K.add (K.add (K.add K.z  -- (+272 chars; full line in the Zenodo source)
  show ip K _ _ (L + 7 + 1) = _; rw [ip_zz]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_1z]
  show ip K (fun i => x (i + 1)) (pv3 K x) (L + 6) = _
  rw [show L + 6 = L + 3 + 1 + 1 + 1 from rfl, ip_head, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [4]) _ (AVs.vsum K x [0, 2, 4, 6]) (fun i => by show (x (i + 4)) = (K.add (x (i + 4)) K.zero); lib_ring) (fun i => by show (K.add (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) (x (i + 6))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) (K.add (x (i + 6)) K.zero)))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 1) (x 3)) (K.add (K.mul (x 2) (K.add (x 2) (x 4))) (K.add (K.mul (x 3) (K.add (K.add (x 1) (x 3)) (x 5))) (AVs.psum K x L [4] [0, 2, 4, 6])))) = _; rfl

include hz in
theorem ip12 : ip K (Zs K (Zs K (c1v K x))) x (L + 8) = (K.add (K.mul (K.add K.zero (x 1)) (x 2)) (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) K.zero) (K.add (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))))) K.zero) K.zero))) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_z1]
  show ip K (c1v K x) (fun i => x (i + 2)) (L + 6) = _
  rw [show L + 6 = L + 5 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [0, 2]) _ (AVs.vsum K x [3]) (fun i => by show (K.add (x (i + 0)) (x (i + 2))) = (K.add (x (i + 0)) (K.add (x (i + 2)) K.zero)); lib_ring) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (K.add K.zero (x 1)) (x 2)) (AVs.psum K x L [0, 2] [3])) = _; rfl

include hz in
theorem ip13 : ip K (Zs K (Zs K (c1v K x))) (fun i => x (i + 1)) (L + 8) = (K.add (K.mul (K.add K.zero (x 1)) (x 3)) (K.add (K.add (K.add (Rk K x L 4) (K.neg K.zero)) K.zero) (K.add (K.add (K.add (Rk K x L 2) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 2))) (K.mul (x 1) (x 3))))) K.zero) K.zero))) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_z1]
  show ip K (c1v K x) (fun i => x (i + 3)) (L + 6) = _
  rw [show L + 6 = L + 5 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [0, 2]) _ (AVs.vsum K x [4]) (fun i => by show (K.add (x (i + 0)) (x (i + 2))) = (K.add (x (i + 0)) (K.add (x (i + 2)) K.zero)); lib_ring) (fun i => by show (x (i + 4)) = (K.add (x (i + 4)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (K.add K.zero (x 1)) (x 3)) (AVs.psum K x L [0, 2] [4])) = _; rfl

include hz in
theorem ip14 : ip K x (Zs K (Zs K (c1v K x))) (L + 8) = (K.add (K.mul (x 2) (K.add K.zero (x 1))) (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))))) K.zero)) K.zero)) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_1z]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_1z]
  show ip K (fun i => x (i + 2)) (c1v K x) (L + 6) = _
  rw [show L + 6 = L + 5 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [3]) _ (AVs.vsum K x [0, 2]) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring) (fun i => by show (K.add (x (i + 0)) (x (i + 2))) = (K.add (x (i + 0)) (K.add (x (i + 2)) K.zero)); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 2) (K.add K.zero (x 1))) (AVs.psum K x L [3] [0, 2])) = _; rfl

include hz in
theorem ip15 : ip K x (Zs K (Zs K (pv2 K x))) (L + 8) = (K.add (K.mul (x 2) (x 2)) (K.add (K.mul (x 3) (K.add (x 1) (x 3))) (K.add (K.add (K.add (Rk K x L 4) (K.neg K.zero)) (K.add (K.add (Rk K x L 2) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 2))) (K.mul (x 1) (x 3))))) (K.add (K.add (Rk K x L 0) (K.neg (K.add (K.add (K.add (K.add K.zero (K.mul (x 0) (x 0))) (K.mul (x 1) (x 1))) (K.mul (x 2) (x   -- (+53 chars; full line in the Zenodo source)
  show ip K _ _ (L + 7 + 1) = _; rw [ip_1z]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_1z]
  show ip K (fun i => x (i + 2)) (pv2 K x) (L + 6) = _
  rw [show L + 6 = L + 4 + 1 + 1 from rfl, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [4]) _ (AVs.vsum K x [0, 2, 4]) (fun i => by show (x (i + 4)) = (K.add (x (i + 4)) K.zero); lib_ring) (fun i => by show (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) K.zero))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 2) (x 2)) (K.add (K.mul (x 3) (K.add (x 1) (x 3))) (AVs.psum K x L [4] [0, 2, 4]))) = _; rfl

include hz in
theorem ip16 : ip K (Zs K x) (Zs K (Zs K (c1v K x))) (L + 8) = (K.add (K.mul (x 1) (K.add K.zero (x 1))) (K.add (K.add (K.add (Rk K x L 2) (K.neg K.zero)) (K.add (K.add (Rk K x L 0) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 0))) (K.mul (x 1) (x 1))))) K.zero)) K.zero)) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_zz]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_1z]
  show ip K (fun i => x (i + 1)) (c1v K x) (L + 6) = _
  rw [show L + 6 = L + 5 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [2]) _ (AVs.vsum K x [0, 2]) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring) (fun i => by show (K.add (x (i + 0)) (x (i + 2))) = (K.add (x (i + 0)) (K.add (x (i + 2)) K.zero)); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 1) (K.add K.zero (x 1))) (AVs.psum K x L [2] [0, 2])) = _; rfl

include hz in
theorem ip17 : ip K (fun i => x (i + 1)) (fun i => x (i + 1)) (L + 8) = (K.add (K.add (K.add (Rk K x L 0) (K.neg (K.add K.zero (K.mul (x 0) (x 0))))) K.zero) K.zero) := by
  show ip K (fun i => x (i + 1)) (fun i => x (i + 1)) (L + 8) = _
  rw [ip_ext K _ (AVs.vsum K x [1]) _ (AVs.vsum K x [1]) (fun i => by show (x (i + 1)) = (K.add (x (i + 1)) K.zero); lib_ring) (fun i => by show (x (i + 1)) = (K.add (x (i + 1)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [1] [1]) = _; rfl

include hz in
theorem ip18 : ip K (fun i => x (i + 2)) (fun i => x (i + 2)) (L + 8) = (K.add (K.add (K.add (Rk K x L 0) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 0))) (K.mul (x 1) (x 1))))) K.zero) K.zero) := by
  show ip K (fun i => x (i + 2)) (fun i => x (i + 2)) (L + 8) = _
  rw [ip_ext K _ (AVs.vsum K x [2]) _ (AVs.vsum K x [2]) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [2] [2]) = _; rfl

include hz in
theorem ip19 : ip K (fun i => x (i + 1)) (fun i => x (i + 2)) (L + 8) = (K.add (K.add (K.add (Rk K x L 1) (K.neg (K.add K.zero (K.mul (x 0) (x 1))))) K.zero) K.zero) := by
  show ip K (fun i => x (i + 1)) (fun i => x (i + 2)) (L + 8) = _
  rw [ip_ext K _ (AVs.vsum K x [1]) _ (AVs.vsum K x [2]) (fun i => by show (x (i + 1)) = (K.add (x (i + 1)) K.zero); lib_ring) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [1] [2]) = _; rfl

include hz in
theorem ip20 : ip K (fun i => x (i + 2)) (fun i => x (i + 1)) (L + 8) = (K.add (K.add (K.add (Rk K x L 1) (K.neg (K.add K.zero (K.mul (x 0) (x 1))))) K.zero) K.zero) := by
  show ip K (fun i => x (i + 2)) (fun i => x (i + 1)) (L + 8) = _
  rw [ip_ext K _ (AVs.vsum K x [2]) _ (AVs.vsum K x [1]) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring) (fun i => by show (x (i + 1)) = (K.add (x (i + 1)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [2] [1]) = _; rfl

include hz in
theorem ip21 : ip K x (pv2 K x) (L + 8) = (K.add (K.mul (x 0) (x 2)) (K.add (K.mul (x 1) (K.add (x 1) (x 3))) (K.add (K.add (K.add (Rk K x L 2) (K.neg K.zero)) (K.add (K.add (Rk K x L 0) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 0))) (K.mul (x 1) (x 1))))) (K.add (K.add (Rk K x L 2) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 2))) (K.mul (x 1) (x 3))))) K.zero))) K.zero))) := by
  show ip K x (pv2 K x) (L + 8) = _
  rw [show L + 8 = L + 6 + 1 + 1 from rfl, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [2]) _ (AVs.vsum K x [0, 2, 4]) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring) (fun i => by show (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) K.zero))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 0) (x 2)) (K.add (K.mul (x 1) (K.add (x 1) (x 3))) (AVs.psum K x L [2] [0, 2, 4]))) = _; rfl

include hz in
theorem ip22 : ip K x (pv3 K x) (L + 8) = (K.add (K.mul (x 0) (x 3)) (K.add (K.mul (x 1) (K.add (x 2) (x 4))) (K.add (K.mul (x 2) (K.add (K.add (x 1) (x 3)) (x 5))) (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))))) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.  -- (+195 chars; full line in the Zenodo source)
  show ip K x (pv3 K x) (L + 8) = _
  rw [show L + 8 = L + 5 + 1 + 1 + 1 from rfl, ip_head, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [3]) _ (AVs.vsum K x [0, 2, 4, 6]) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring) (fun i => by show (K.add (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) (x (i + 6))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) (K.add (x (i + 6)) K.zero)))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 0) (x 3)) (K.add (K.mul (x 1) (K.add (x 2) (x 4))) (K.add (K.mul (x 2) (K.add (K.add (x 1) (x 3)) (x 5))) (AVs.psum K x L [3] [0, 2, 4, 6])))) = _; rfl

include hz in
theorem ip23 : ip K x (pv4 K x) (L + 8) = (K.add (K.mul (x 0) (x 4)) (K.add (K.mul (x 1) (K.add (x 3) (x 5))) (K.add (K.mul (x 2) (K.add (K.add (x 2) (x 4)) (x 6))) (K.add (K.mul (x 3) (K.add (K.add (K.add (x 1) (x 3)) (x 5)) (x 7))) (K.add (K.add (K.add (Rk K x L 4) (K.neg K.zero)) (K.add (K.add (Rk K x L 2) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 2))) (K.mul (x 1) (x 3))))) (K.add (K.add (Rk  -- (+477 chars; full line in the Zenodo source)
  show ip K x (pv4 K x) (L + 8) = _
  rw [show L + 8 = L + 4 + 1 + 1 + 1 + 1 from rfl, ip_head, ip_head, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [4]) _ (AVs.vsum K x [0, 2, 4, 6, 8]) (fun i => by show (x (i + 4)) = (K.add (x (i + 4)) K.zero); lib_ring) (fun i => by show (K.add (K.add (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) (x (i + 6))) (x (i + 8))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) (K.add (x (i + 6)) (K.add (x (i + 8)) K.zero))))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 0) (x 4)) (K.add (K.mul (x 1) (K.add (x 3) (x 5))) (K.add (K.mul (x 2) (K.add (K.add (x 2) (x 4)) (x 6))) (K.add (K.mul (x 3) (K.add (K.add (K.add (x 1) (x 3)) (x 5)) (x 7))) (AVs.psum K x L [4] [0, 2, 4, 6, 8]))))) = _; rfl

include hz in
theorem ident : K.add (K.mul (LibRing.castN K 15) (K.mul (ip K x (pv3 K x) (L + 8)) (ip K x (pv3 K x) (L + 8)))) (K.neg (K.mul (LibRing.castN K 16) (K.mul (ip K x (pv2 K x) (L + 8)) (ip K x (pv4 K x) (L + 8))))) = (K.add (K.mul (LibRing.castN K 8) (K.add (K.mul (ip K (Zs K (Zs K (Zs K x))) x (L + 8)) (ip K (Zs K (Zs K x)) (fun i => x (i + 1)) (L + 8))) (K.neg (K.mul (ip K (Zs K (Zs K (Zs K x))) (f  -- (+1643 chars; full line in the Zenodo source)
  rw [ip0 K x L hz, ip1 K x L hz, ip2 K x L hz, ip3 K x L hz, ip4 K x L hz, ip5 K x L hz, ip6 K x L hz, ip7 K x L hz, ip8 K x L hz, ip9 K x L hz, ip10 K x L hz, ip11 K x L hz, ip12 K x L hz, ip13 K x L hz, ip14 K x L hz, ip15 K x L hz, ip16 K x L hz, ip17 K x L hz, ip18 K x L hz, ip19 K x L hz, ip20 K x L hz, ip21 K x L hz, ip22 K x L hz, ip23 K x L hz]
  ring_z

end ident

section signs

variable (O : ORing K) (x : Nat → R) (hx : ∀ j, O.le K.zero (x j))
  (hT : ∀ a w, O.le K.zero (K.add (K.mul (Zs K x (a + 1)) (Zs K x (a + w))) (K.neg (K.mul (Zs K x a) (Zs K x (a + w + 1))))))
  (hD : ∀ a k, O.le K.zero (Window.Dl K (Zs K x) a (a + k)))

include hx hT hD in
theorem sg0 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (Zs K (Zs K (Zs K x))) (Zs K (Zs K x)) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul K.zero K.zero) (K.neg (K.mul K.zero K.zero))))
      exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (1))) (K.neg (K.mul K.zero K.zero))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (2))) (K.neg (K.mul (Zs K x (1)) K.zero))))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) K.zero))))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
          | succ w =>
            rw [show 0 + (w + 1 + 1 + 1 + 1) + 1 = w + 5 by lib_nat]
            show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (w + 4))) (K.neg (K.mul (Zs K x (w + 3)) K.zero))))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (1))) (K.neg (K.mul K.zero K.zero))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (2))) (K.neg (K.mul (Zs K x (1)) K.zero))))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) K.zero))))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) K.zero))))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
            | succ w =>
              rw [show 0 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (w + 5))) (K.neg (K.mul (Zs K x (w + 4)) K.zero))))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (2))) (K.neg (K.mul (Zs K x (1)) (Zs K x (1))))))
          have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (1))) := O.mul_nonneg _ _ (hx (0)) (hx (0))
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (1))))))
            have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (0)) (hx (1))
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (1))))))
              have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (0)) (hx (2))
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (1))))))
                have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (0)) (hx (3))
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (w + 6))) (K.neg (K.mul (Zs K x (w + 5)) (Zs K x (1))))))
                have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (w + 5))) := O.mul_nonneg _ _ (hx (0)) (hx (w + 4))
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2)))))) := by
              have h := A2.mk K O x hT 1 (0) (0)
              try rw [show (0) + (0) + 1 + 1 = 2 by lib_nat] at h
              try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
              try rw [show (0) + 1 = 1 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (2))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3)))))) := by
                have h := A2.mk K O x hT 2 (0) (0)
                try rw [show (0) + (0) + 1 + 2 = 3 by lib_nat] at h
                try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                try rw [show (0) + 2 = 2 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (2))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (2)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT 3 (0) (0)
                  try rw [show (0) + (0) + 1 + 3 = 4 by lib_nat] at h
                  try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                  try rw [show (0) + 3 = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (2))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (2)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT 4 (0) (0)
                    try rw [show (0) + (0) + 1 + 4 = 5 by lib_nat] at h
                    try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                    try rw [show (0) + 4 = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 7))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (2))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 7))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (2)))))) := by
                    have h := A2.mk K O x hT 1 (0) (w + 4)
                    try rw [show (0) + (w + 4) + 1 + 1 = w + 6 by lib_nat] at h
                    try rw [show (0) + (w + 4) + 1 = w + 5 by lib_nat] at h
                    try rw [show (0) + 1 = 1 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3)))))) := by
                have h := A2.mk K O x hT 1 (1) (0)
                try rw [show (1) + (0) + 1 + 1 = 3 by lib_nat] at h
                try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                try rw [show (1) + 1 = 2 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (3))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT 2 (1) (0)
                  try rw [show (1) + (0) + 1 + 2 = 4 by lib_nat] at h
                  try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                  try rw [show (1) + 2 = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (3))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT 3 (1) (0)
                    try rw [show (1) + (0) + 1 + 3 = 5 by lib_nat] at h
                    try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                    try rw [show (1) + 3 = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (3))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (3)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT 4 (1) (0)
                      try rw [show (1) + (0) + 1 + 4 = 6 by lib_nat] at h
                      try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                      try rw [show (1) + 4 = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (3))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (3)))))) := by
                      have h := A2.mk K O x hT 1 (1) (w + 4)
                      try rw [show (1) + (w + 4) + 1 + 1 = w + 7 by lib_nat] at h
                      try rw [show (1) + (w + 4) + 1 = w + 6 by lib_nat] at h
                      try rw [show (1) + 1 = 2 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ a =>
            cases w with
            | zero =>
              rw [show a + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 5))) (K.neg (K.mul (Zs K x (a + 4)) (Zs K x (a + 4))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 5))) (K.neg (K.mul (Zs K x (a + 4)) (Zs K x (a + 4)))))) := by
                have h := A2.mk K O x hT 1 (a + 2) (0)
                try rw [show (a + 2) + (0) + 1 + 1 = a + 4 by lib_nat] at h
                try rw [show (a + 2) + (0) + 1 = a + 3 by lib_nat] at h
                try rw [show (a + 2) + 1 = a + 3 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 6))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 4))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 6))) (K.neg (K.mul (Zs K x (a + 4)) (Zs K x (a + 5)))))) := by
                  have h := A2.mk K O x hT 2 (a + 2) (0)
                  try rw [show (a + 2) + (0) + 1 + 2 = a + 5 by lib_nat] at h
                  try rw [show (a + 2) + (0) + 1 = a + 3 by lib_nat] at h
                  try rw [show (a + 2) + 2 = a + 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 7))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 4))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 7))) (K.neg (K.mul (Zs K x (a + 4)) (Zs K x (a + 6)))))) := by
                    have h := A2.mk K O x hT 3 (a + 2) (0)
                    try rw [show (a + 2) + (0) + 1 + 3 = a + 6 by lib_nat] at h
                    try rw [show (a + 2) + (0) + 1 = a + 3 by lib_nat] at h
                    try rw [show (a + 2) + 3 = a + 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 4))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 4)) (Zs K x (a + 7)))))) := by
                      have h := A2.mk K O x hT 4 (a + 2) (0)
                      try rw [show (a + 2) + (0) + 1 + 4 = a + 7 by lib_nat] at h
                      try rw [show (a + 2) + (0) + 1 = a + 3 by lib_nat] at h
                      try rw [show (a + 2) + 4 = a + 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = a + w + 10 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + w + 9))) (K.neg (K.mul (Zs K x (a + w + 8)) (Zs K x (a + 4))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + w + 9))) (K.neg (K.mul (Zs K x (a + w + 8)) (Zs K x (a + 4)))))) := by
                      have h := A2.mk K O x hT 1 (a + 2) (w + 4)
                      try rw [show (a + 2) + (w + 4) + 1 + 1 = a + w + 8 by lib_nat] at h
                      try rw [show (a + 2) + (w + 4) + 1 = a + w + 7 by lib_nat] at h
                      try rw [show (a + 2) + 1 = a + 3 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

include hx hT hD in
theorem sg1 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K x (fun i => x (i + 1)) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2))))))
      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2)))))) := by
        have h := A2.mk K O x hT 1 (0) (0)
        try rw [show (0) + (0) + 1 + 1 = 2 by lib_nat] at h
        try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
        try rw [show (0) + 1 = 1 by lib_nat] at h
        exact A2.nn_of_nonpos_neg K O _ h
      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (2))))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3)))))) := by
          have h := A2.mk K O x hT 2 (0) (0)
          try rw [show (0) + (0) + 1 + 2 = 3 by lib_nat] at h
          try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
          try rw [show (0) + 2 = 2 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (2))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (2)) (Zs K x (4)))))) := by
            have h := A2.mk K O x hT 3 (0) (0)
            try rw [show (0) + (0) + 1 + 3 = 4 by lib_nat] at h
            try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
            try rw [show (0) + 3 = 3 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (2))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (2)) (Zs K x (5)))))) := by
              have h := A2.mk K O x hT 4 (0) (0)
              try rw [show (0) + (0) + 1 + 4 = 5 by lib_nat] at h
              try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
              try rw [show (0) + 4 = 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            rw [show 0 + (w + 1 + 1 + 1 + 1) + 1 = w + 5 by lib_nat]
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 7))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (2))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 7))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (2)))))) := by
              have h := A2.mk K O x hT 1 (0) (w + 4)
              try rw [show (0) + (w + 4) + 1 + 1 = w + 6 by lib_nat] at h
              try rw [show (0) + (w + 4) + 1 = w + 5 by lib_nat] at h
              try rw [show (0) + 1 = 1 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3))))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3)))))) := by
          have h := A2.mk K O x hT 1 (1) (0)
          try rw [show (1) + (0) + 1 + 1 = 3 by lib_nat] at h
          try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
          try rw [show (1) + 1 = 2 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (3))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
            have h := A2.mk K O x hT 2 (1) (0)
            try rw [show (1) + (0) + 1 + 2 = 4 by lib_nat] at h
            try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
            try rw [show (1) + 2 = 3 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (3))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
              have h := A2.mk K O x hT 3 (1) (0)
              try rw [show (1) + (0) + 1 + 3 = 5 by lib_nat] at h
              try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
              try rw [show (1) + 3 = 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (3))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (3)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT 4 (1) (0)
                try rw [show (1) + (0) + 1 + 4 = 6 by lib_nat] at h
                try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                try rw [show (1) + 4 = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              rw [show 0 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (3))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (3)))))) := by
                have h := A2.mk K O x hT 1 (1) (w + 4)
                try rw [show (1) + (w + 4) + 1 + 1 = w + 7 by lib_nat] at h
                try rw [show (1) + (w + 4) + 1 = w + 6 by lib_nat] at h
                try rw [show (1) + 1 = 2 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
            have h := A2.mk K O x hT 1 (2) (0)
            try rw [show (2) + (0) + 1 + 1 = 4 by lib_nat] at h
            try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
            try rw [show (2) + 1 = 3 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (4))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
              have h := A2.mk K O x hT 2 (2) (0)
              try rw [show (2) + (0) + 1 + 2 = 5 by lib_nat] at h
              try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
              try rw [show (2) + 2 = 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (4))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT 3 (2) (0)
                try rw [show (2) + (0) + 1 + 3 = 6 by lib_nat] at h
                try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                try rw [show (2) + 3 = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (4))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT 4 (2) (0)
                  try rw [show (2) + (0) + 1 + 4 = 7 by lib_nat] at h
                  try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                  try rw [show (2) + 4 = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (4))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT 1 (2) (w + 4)
                  try rw [show (2) + (w + 4) + 1 + 1 = w + 8 by lib_nat] at h
                  try rw [show (2) + (w + 4) + 1 = w + 7 by lib_nat] at h
                  try rw [show (2) + 1 = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5)))))) := by
              have h := A2.mk K O x hT 1 (3) (0)
              try rw [show (3) + (0) + 1 + 1 = 5 by lib_nat] at h
              try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
              try rw [show (3) + 1 = 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (5))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT 2 (3) (0)
                try rw [show (3) + (0) + 1 + 2 = 6 by lib_nat] at h
                try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                try rw [show (3) + 2 = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (5))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT 3 (3) (0)
                  try rw [show (3) + (0) + 1 + 3 = 7 by lib_nat] at h
                  try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                  try rw [show (3) + 3 = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (5))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (5)) (Zs K x (8)))))) := by
                    have h := A2.mk K O x hT 4 (3) (0)
                    try rw [show (3) + (0) + 1 + 4 = 8 by lib_nat] at h
                    try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                    try rw [show (3) + 4 = 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (5))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT 1 (3) (w + 4)
                    try rw [show (3) + (w + 4) + 1 + 1 = w + 9 by lib_nat] at h
                    try rw [show (3) + (w + 4) + 1 = w + 8 by lib_nat] at h
                    try rw [show (3) + 1 = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT 1 (4) (0)
                try rw [show (4) + (0) + 1 + 1 = 6 by lib_nat] at h
                try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                try rw [show (4) + 1 = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (6))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT 2 (4) (0)
                  try rw [show (4) + (0) + 1 + 2 = 7 by lib_nat] at h
                  try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                  try rw [show (4) + 2 = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (6))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (6)) (Zs K x (8)))))) := by
                    have h := A2.mk K O x hT 3 (4) (0)
                    try rw [show (4) + (0) + 1 + 3 = 8 by lib_nat] at h
                    try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                    try rw [show (4) + 3 = 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (6))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (10))) (K.neg (K.mul (Zs K x (6)) (Zs K x (9)))))) := by
                      have h := A2.mk K O x hT 4 (4) (0)
                      try rw [show (4) + (0) + 1 + 4 = 9 by lib_nat] at h
                      try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                      try rw [show (4) + 4 = 8 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (6))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT 1 (4) (w + 4)
                      try rw [show (4) + (w + 4) + 1 + 1 = w + 10 by lib_nat] at h
                      try rw [show (4) + (w + 4) + 1 = w + 9 by lib_nat] at h
                      try rw [show (4) + 1 = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ a =>
            cases w with
            | zero =>
              rw [show a + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 7))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 7)))))) := by
                have h := A2.mk K O x hT 1 (a + 5) (0)
                try rw [show (a + 5) + (0) + 1 + 1 = a + 7 by lib_nat] at h
                try rw [show (a + 5) + (0) + 1 = a + 6 by lib_nat] at h
                try rw [show (a + 5) + 1 = a + 6 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 7))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 8)))))) := by
                  have h := A2.mk K O x hT 2 (a + 5) (0)
                  try rw [show (a + 5) + (0) + 1 + 2 = a + 8 by lib_nat] at h
                  try rw [show (a + 5) + (0) + 1 = a + 6 by lib_nat] at h
                  try rw [show (a + 5) + 2 = a + 7 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 7))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 9)))))) := by
                    have h := A2.mk K O x hT 3 (a + 5) (0)
                    try rw [show (a + 5) + (0) + 1 + 3 = a + 9 by lib_nat] at h
                    try rw [show (a + 5) + (0) + 1 = a + 6 by lib_nat] at h
                    try rw [show (a + 5) + 3 = a + 8 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 7))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 10)))))) := by
                      have h := A2.mk K O x hT 4 (a + 5) (0)
                      try rw [show (a + 5) + (0) + 1 + 4 = a + 10 by lib_nat] at h
                      try rw [show (a + 5) + (0) + 1 = a + 6 by lib_nat] at h
                      try rw [show (a + 5) + 4 = a + 9 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = a + w + 10 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + w + 12))) (K.neg (K.mul (Zs K x (a + w + 11)) (Zs K x (a + 7))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + w + 12))) (K.neg (K.mul (Zs K x (a + w + 11)) (Zs K x (a + 7)))))) := by
                      have h := A2.mk K O x hT 1 (a + 5) (w + 4)
                      try rw [show (a + 5) + (w + 4) + 1 + 1 = a + w + 11 by lib_nat] at h
                      try rw [show (a + 5) + (w + 4) + 1 = a + w + 10 by lib_nat] at h
                      try rw [show (a + 5) + 1 = a + 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

include hx hT hD in
theorem sg2 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (Zs K (Zs K (Zs K x))) (Zs K (c1v K x)) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add K.zero (Zs K x (2)))) (K.neg (K.mul K.zero K.zero))))
      exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (1)) (Zs K x (3)))) (K.neg (K.mul K.zero K.zero))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (Zs K x (1)) K.zero))))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (2)) K.zero))))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
          | succ w =>
            rw [show 0 + (w + 1 + 1 + 1 + 1) + 1 = w + 5 by lib_nat]
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (w + 4)) (Zs K x (w + 6)))) (K.neg (K.mul (Zs K x (w + 3)) K.zero))))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (1)) (Zs K x (3)))) (K.neg (K.mul K.zero (K.add K.zero (Zs K x (2)))))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (Zs K x (1)) (K.add K.zero (Zs K x (2)))))))
          have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (0)) (hx (1))
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (2)) (K.add K.zero (Zs K x (2)))))))
            have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (1)) (hx (1))
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (3)) (K.add K.zero (Zs K x (2)))))))
              have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (1)) (hx (2))
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              rw [show 0 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (w + 5)) (Zs K x (w + 7)))) (K.neg (K.mul (Zs K x (w + 4)) (K.add K.zero (Zs K x (2)))))))
              have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (w + 4))) := O.mul_nonneg _ _ (hx (1)) (hx (w + 3))
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (Zs K x (1)) (K.add (Zs K x (1)) (Zs K x (3)))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (2))))) := A1.Dn K O x hD (0) (1) (0) (1) (2) (1) (2) (3) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t1 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (1)) (hx (1))
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (2)) (K.add (Zs K x (1)) (Zs K x (3)))))))
            have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (0)) (hx (1))
            have t1 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (1)) (hx (2))
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (3)) (K.add (Zs K x (1)) (Zs K x (3)))))))
              have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (0)) (hx (2))
              have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (2)) (hx (2))
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (Zs K x (4)) (K.add (Zs K x (1)) (Zs K x (3)))))))
                have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (0)) (hx (3))
                have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (2)) (hx (3))
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (w + 6)) (Zs K x (w + 8)))) (K.neg (K.mul (Zs K x (w + 5)) (K.add (Zs K x (1)) (Zs K x (3)))))))
                have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (w + 5))) := O.mul_nonneg _ _ (hx (0)) (hx (w + 4))
                have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (w + 5))) := O.mul_nonneg _ _ (hx (2)) (hx (w + 4))
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (2)) (K.add (Zs K x (2)) (Zs K x (4)))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3)))))) := by
              have h := A2.mk K O x hT 2 (0) (1)
              try rw [show (0) + (1) + 1 + 2 = 4 by lib_nat] at h
              try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
              try rw [show (0) + 2 = 2 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (3)) (K.add (Zs K x (2)) (Zs K x (4)))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3)))))) := by
                have h := A2.mk K O x hT 2 (0) (0)
                try rw [show (0) + (0) + 1 + 2 = 3 by lib_nat] at h
                try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                try rw [show (0) + 2 = 2 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
                have h := A2.mk K O x hT 3 (0) (1)
                try rw [show (0) + (1) + 1 + 3 = 5 by lib_nat] at h
                try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
                try rw [show (0) + 3 = 3 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (Zs K x (4)) (K.add (Zs K x (2)) (Zs K x (4)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (2)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT 3 (0) (0)
                  try rw [show (0) + (0) + 1 + 3 = 4 by lib_nat] at h
                  try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                  try rw [show (0) + 3 = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT 3 (0) (2)
                  try rw [show (0) + (2) + 1 + 3 = 6 by lib_nat] at h
                  try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
                  try rw [show (0) + 3 = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (6)) (Zs K x (8)))) (K.neg (K.mul (Zs K x (5)) (K.add (Zs K x (2)) (Zs K x (4)))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (2)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT 4 (0) (0)
                    try rw [show (0) + (0) + 1 + 4 = 5 by lib_nat] at h
                    try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                    try rw [show (0) + 4 = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT 4 (0) (2)
                    try rw [show (0) + (2) + 1 + 4 = 7 by lib_nat] at h
                    try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
                    try rw [show (0) + 4 = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (w + 7)) (Zs K x (w + 9)))) (K.neg (K.mul (Zs K x (w + 6)) (K.add (Zs K x (2)) (Zs K x (4)))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 7))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (2)))))) := by
                    have h := A2.mk K O x hT 1 (0) (w + 4)
                    try rw [show (0) + (w + 4) + 1 + 1 = w + 6 by lib_nat] at h
                    try rw [show (0) + (w + 4) + 1 = w + 5 by lib_nat] at h
                    try rw [show (0) + 1 = 1 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (4)))))) := by
                    have h := A2.mk K O x hT 3 (0) (w + 4)
                    try rw [show (0) + (w + 4) + 1 + 3 = w + 8 by lib_nat] at h
                    try rw [show (0) + (w + 4) + 1 = w + 5 by lib_nat] at h
                    try rw [show (0) + 3 = 3 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (3)) (K.add (Zs K x (3)) (Zs K x (5)))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
                have h := A2.mk K O x hT 2 (1) (1)
                try rw [show (1) + (1) + 1 + 2 = 5 by lib_nat] at h
                try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
                try rw [show (1) + 2 = 3 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (Zs K x (4)) (K.add (Zs K x (3)) (Zs K x (5)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT 2 (1) (0)
                  try rw [show (1) + (0) + 1 + 2 = 4 by lib_nat] at h
                  try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                  try rw [show (1) + 2 = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
                  have h := A2.mk K O x hT 3 (1) (1)
                  try rw [show (1) + (1) + 1 + 3 = 6 by lib_nat] at h
                  try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
                  try rw [show (1) + 3 = 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (6)) (Zs K x (8)))) (K.neg (K.mul (Zs K x (5)) (K.add (Zs K x (3)) (Zs K x (5)))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT 3 (1) (0)
                    try rw [show (1) + (0) + 1 + 3 = 5 by lib_nat] at h
                    try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                    try rw [show (1) + 3 = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT 3 (1) (2)
                    try rw [show (1) + (2) + 1 + 3 = 7 by lib_nat] at h
                    try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
                    try rw [show (1) + 3 = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (7)) (Zs K x (9)))) (K.neg (K.mul (Zs K x (6)) (K.add (Zs K x (3)) (Zs K x (5)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (3)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT 4 (1) (0)
                      try rw [show (1) + (0) + 1 + 4 = 6 by lib_nat] at h
                      try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                      try rw [show (1) + 4 = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (9))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT 4 (1) (2)
                      try rw [show (1) + (2) + 1 + 4 = 8 by lib_nat] at h
                      try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
                      try rw [show (1) + 4 = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (w + 8)) (Zs K x (w + 10)))) (K.neg (K.mul (Zs K x (w + 7)) (K.add (Zs K x (3)) (Zs K x (5)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (3)))))) := by
                      have h := A2.mk K O x hT 1 (1) (w + 4)
                      try rw [show (1) + (w + 4) + 1 + 1 = w + 7 by lib_nat] at h
                      try rw [show (1) + (w + 4) + 1 = w + 6 by lib_nat] at h
                      try rw [show (1) + 1 = 2 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (5)))))) := by
                      have h := A2.mk K O x hT 3 (1) (w + 4)
                      try rw [show (1) + (w + 4) + 1 + 3 = w + 9 by lib_nat] at h
                      try rw [show (1) + (w + 4) + 1 = w + 6 by lib_nat] at h
                      try rw [show (1) + 3 = 4 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
          | succ a =>
            cases w with
            | zero =>
              rw [show a + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (K.add (Zs K x (a + 5)) (Zs K x (a + 7)))) (K.neg (K.mul (Zs K x (a + 4)) (K.add (Zs K x (a + 4)) (Zs K x (a + 6)))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 7))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 5)))))) := by
                have h := A2.mk K O x hT 2 (a + 2) (1)
                try rw [show (a + 2) + (1) + 1 + 2 = a + 6 by lib_nat] at h
                try rw [show (a + 2) + (1) + 1 = a + 4 by lib_nat] at h
                try rw [show (a + 2) + 2 = a + 4 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 5))))) := A1.Dn K O x hD (a + 3) (1) (a + 3) (a + 4) (a + 5) (a + 4) (a + 5) (a + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (K.add (Zs K x (a + 6)) (Zs K x (a + 8)))) (K.neg (K.mul (Zs K x (a + 5)) (K.add (Zs K x (a + 4)) (Zs K x (a + 6)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 6))) (K.neg (K.mul (Zs K x (a + 4)) (Zs K x (a + 5)))))) := by
                  have h := A2.mk K O x hT 2 (a + 2) (0)
                  try rw [show (a + 2) + (0) + 1 + 2 = a + 5 by lib_nat] at h
                  try rw [show (a + 2) + (0) + 1 = a + 3 by lib_nat] at h
                  try rw [show (a + 2) + 2 = a + 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 6)))))) := by
                  have h := A2.mk K O x hT 3 (a + 2) (1)
                  try rw [show (a + 2) + (1) + 1 + 3 = a + 7 by lib_nat] at h
                  try rw [show (a + 2) + (1) + 1 = a + 4 by lib_nat] at h
                  try rw [show (a + 2) + 3 = a + 5 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (K.add (Zs K x (a + 7)) (Zs K x (a + 9)))) (K.neg (K.mul (Zs K x (a + 6)) (K.add (Zs K x (a + 4)) (Zs K x (a + 6)))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 7))) (K.neg (K.mul (Zs K x (a + 4)) (Zs K x (a + 6)))))) := by
                    have h := A2.mk K O x hT 3 (a + 2) (0)
                    try rw [show (a + 2) + (0) + 1 + 3 = a + 6 by lib_nat] at h
                    try rw [show (a + 2) + (0) + 1 = a + 3 by lib_nat] at h
                    try rw [show (a + 2) + 3 = a + 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 6)))))) := by
                    have h := A2.mk K O x hT 3 (a + 2) (2)
                    try rw [show (a + 2) + (2) + 1 + 3 = a + 8 by lib_nat] at h
                    try rw [show (a + 2) + (2) + 1 = a + 5 by lib_nat] at h
                    try rw [show (a + 2) + 3 = a + 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (K.add (Zs K x (a + 8)) (Zs K x (a + 10)))) (K.neg (K.mul (Zs K x (a + 7)) (K.add (Zs K x (a + 4)) (Zs K x (a + 6)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 4)) (Zs K x (a + 7)))))) := by
                      have h := A2.mk K O x hT 4 (a + 2) (0)
                      try rw [show (a + 2) + (0) + 1 + 4 = a + 7 by lib_nat] at h
                      try rw [show (a + 2) + (0) + 1 = a + 3 by lib_nat] at h
                      try rw [show (a + 2) + 4 = a + 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 7)))))) := by
                      have h := A2.mk K O x hT 4 (a + 2) (2)
                      try rw [show (a + 2) + (2) + 1 + 4 = a + 9 by lib_nat] at h
                      try rw [show (a + 2) + (2) + 1 = a + 5 by lib_nat] at h
                      try rw [show (a + 2) + 4 = a + 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                  | succ w =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = a + w + 10 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (K.add (Zs K x (a + w + 9)) (Zs K x (a + w + 11)))) (K.neg (K.mul (Zs K x (a + w + 8)) (K.add (Zs K x (a + 4)) (Zs K x (a + 6)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + w + 9))) (K.neg (K.mul (Zs K x (a + w + 8)) (Zs K x (a + 4)))))) := by
                      have h := A2.mk K O x hT 1 (a + 2) (w + 4)
                      try rw [show (a + 2) + (w + 4) + 1 + 1 = a + w + 8 by lib_nat] at h
                      try rw [show (a + 2) + (w + 4) + 1 = a + w + 7 by lib_nat] at h
                      try rw [show (a + 2) + 1 = a + 3 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + w + 11))) (K.neg (K.mul (Zs K x (a + w + 8)) (Zs K x (a + 6)))))) := by
                      have h := A2.mk K O x hT 3 (a + 2) (w + 4)
                      try rw [show (a + 2) + (w + 4) + 1 + 3 = a + w + 10 by lib_nat] at h
                      try rw [show (a + 2) + (w + 4) + 1 = a + w + 7 by lib_nat] at h
                      try rw [show (a + 2) + 3 = a + 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)

include hx hT hD in
theorem sg3 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (Zs K (Zs K (Zs K x))) (pv2 K x) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul K.zero (Zs K x (3))))))
      exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))) (K.neg (K.mul K.zero (Zs K x (3))))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (Zs K x (1)) (Zs K x (3))))))
          have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (0)) (hx (2))
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3))))))
            have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (1)) (hx (2))
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            rw [show 0 + (w + 1 + 1 + 1 + 1) + 1 = w + 5 by lib_nat]
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (w + 8)))) (K.neg (K.mul (Zs K x (w + 3)) (Zs K x (3))))))
            have t0 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (w + 3))) := O.mul_nonneg _ _ (hx (2)) (hx (w + 2))
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))) (K.neg (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (Zs K x (1)) (K.add (Zs K x (2)) (Zs K x (4)))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t1 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (1)) (hx (2))
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (Zs K x (2)) (K.add (Zs K x (2)) (Zs K x (4)))))))
            have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (1)) (hx (1))
            have t1 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (1)) (hx (3))
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (Zs K x (3)) (K.add (Zs K x (2)) (Zs K x (4)))))))
              have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (1)) (hx (2))
              have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (2)) (hx (3))
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
            | succ w =>
              rw [show 0 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (w + 9)))) (K.neg (K.mul (Zs K x (w + 4)) (K.add (Zs K x (2)) (Zs K x (4)))))))
              have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (w + 4))) := O.mul_nonneg _ _ (hx (1)) (hx (w + 3))
              have t1 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (w + 4))) := O.mul_nonneg _ _ (hx (3)) (hx (w + 3))
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (Zs K x (1)) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (2))))) := A1.Dn K O x hD (0) (1) (0) (1) (2) (1) (2) (3) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t3 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (2)) (hx (2))
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (Zs K x (2)) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (1)) (hx (2))
            have t3 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (2)) (hx (3))
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (Zs K x (3)) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
              have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (0)) (hx (2))
              have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (2)) (hx (2))
              have t2 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (2)) (hx (4))
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (Zs K x (4)) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
                have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (0)) (hx (3))
                have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (2)) (hx (3))
                have t2 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (3)) (hx (4))
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (w + 10)))) (K.neg (K.mul (Zs K x (w + 5)) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
                have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (w + 5))) := O.mul_nonneg _ _ (hx (0)) (hx (w + 4))
                have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (w + 5))) := O.mul_nonneg _ _ (hx (2)) (hx (w + 4))
                have t2 : O.le K.zero (K.mul (Zs K x (5)) (Zs K x (w + 5))) := O.mul_nonneg _ _ (hx (4)) (hx (w + 4))
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (Zs K x (2)) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2)))))) := by
              have h := A2.mk K O x hT 1 (0) (0)
              try rw [show (0) + (0) + 1 + 1 = 2 by lib_nat] at h
              try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
              try rw [show (0) + 1 = 1 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
              have h := A2.mk K O x hT 4 (0) (1)
              try rw [show (0) + (1) + 1 + 4 = 6 by lib_nat] at h
              try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
              try rw [show (0) + 4 = 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (Zs K x (3)) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3)))))) := by
                have h := A2.mk K O x hT 2 (0) (0)
                try rw [show (0) + (0) + 1 + 2 = 3 by lib_nat] at h
                try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                try rw [show (0) + 2 = 2 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
                have h := A2.mk K O x hT 3 (0) (1)
                try rw [show (0) + (1) + 1 + 3 = 5 by lib_nat] at h
                try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
                try rw [show (0) + 3 = 3 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (8))) (K.neg (K.mul (Zs K x (3)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT 5 (0) (1)
                try rw [show (0) + (1) + 1 + 5 = 7 by lib_nat] at h
                try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
                try rw [show (0) + 5 = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (Zs K x (4)) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (2)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT 3 (0) (0)
                  try rw [show (0) + (0) + 1 + 3 = 4 by lib_nat] at h
                  try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                  try rw [show (0) + 3 = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT 3 (0) (2)
                  try rw [show (0) + (2) + 1 + 3 = 6 by lib_nat] at h
                  try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
                  try rw [show (0) + 3 = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (9))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                  have h := A2.mk K O x hT 5 (0) (2)
                  try rw [show (0) + (2) + 1 + 5 = 8 by lib_nat] at h
                  try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
                  try rw [show (0) + 5 = 5 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10)))) (K.neg (K.mul (Zs K x (5)) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (2)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT 4 (0) (0)
                    try rw [show (0) + (0) + 1 + 4 = 5 by lib_nat] at h
                    try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                    try rw [show (0) + 4 = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT 4 (0) (2)
                    try rw [show (0) + (2) + 1 + 4 = 7 by lib_nat] at h
                    try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
                    try rw [show (0) + 4 = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (10))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
                    have h := A2.mk K O x hT 5 (0) (3)
                    try rw [show (0) + (3) + 1 + 5 = 9 by lib_nat] at h
                    try rw [show (0) + (3) + 1 = 4 by lib_nat] at h
                    try rw [show (0) + 5 = 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (w + 11)))) (K.neg (K.mul (Zs K x (w + 6)) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 7))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (2)))))) := by
                    have h := A2.mk K O x hT 1 (0) (w + 4)
                    try rw [show (0) + (w + 4) + 1 + 1 = w + 6 by lib_nat] at h
                    try rw [show (0) + (w + 4) + 1 = w + 5 by lib_nat] at h
                    try rw [show (0) + 1 = 1 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (4)))))) := by
                    have h := A2.mk K O x hT 3 (0) (w + 4)
                    try rw [show (0) + (w + 4) + 1 + 3 = w + 8 by lib_nat] at h
                    try rw [show (0) + (w + 4) + 1 = w + 5 by lib_nat] at h
                    try rw [show (0) + 3 = 3 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (6)))))) := by
                    have h := A2.mk K O x hT 5 (0) (w + 4)
                    try rw [show (0) + (w + 4) + 1 + 5 = w + 10 by lib_nat] at h
                    try rw [show (0) + (w + 4) + 1 = w + 5 by lib_nat] at h
                    try rw [show (0) + 5 = 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (Zs K x (3)) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3)))))) := by
                have h := A2.mk K O x hT 1 (1) (0)
                try rw [show (1) + (0) + 1 + 1 = 3 by lib_nat] at h
                try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                try rw [show (1) + 1 = 2 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT 4 (1) (1)
                try rw [show (1) + (1) + 1 + 4 = 7 by lib_nat] at h
                try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
                try rw [show (1) + 4 = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (Zs K x (4)) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT 2 (1) (0)
                  try rw [show (1) + (0) + 1 + 2 = 4 by lib_nat] at h
                  try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                  try rw [show (1) + 2 = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
                  have h := A2.mk K O x hT 3 (1) (1)
                  try rw [show (1) + (1) + 1 + 3 = 6 by lib_nat] at h
                  try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
                  try rw [show (1) + 3 = 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (9))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT 5 (1) (1)
                  try rw [show (1) + (1) + 1 + 5 = 8 by lib_nat] at h
                  try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
                  try rw [show (1) + 5 = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10)))) (K.neg (K.mul (Zs K x (5)) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT 3 (1) (0)
                    try rw [show (1) + (0) + 1 + 3 = 5 by lib_nat] at h
                    try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                    try rw [show (1) + 3 = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT 3 (1) (2)
                    try rw [show (1) + (2) + 1 + 3 = 7 by lib_nat] at h
                    try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
                    try rw [show (1) + 3 = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (10))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
                    have h := A2.mk K O x hT 5 (1) (2)
                    try rw [show (1) + (2) + 1 + 5 = 9 by lib_nat] at h
                    try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
                    try rw [show (1) + 5 = 6 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (11)))) (K.neg (K.mul (Zs K x (6)) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (3)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT 4 (1) (0)
                      try rw [show (1) + (0) + 1 + 4 = 6 by lib_nat] at h
                      try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                      try rw [show (1) + 4 = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (9))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT 4 (1) (2)
                      try rw [show (1) + (2) + 1 + 4 = 8 by lib_nat] at h
                      try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
                      try rw [show (1) + 4 = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (11))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
                      have h := A2.mk K O x hT 5 (1) (3)
                      try rw [show (1) + (3) + 1 + 5 = 10 by lib_nat] at h
                      try rw [show (1) + (3) + 1 = 5 by lib_nat] at h
                      try rw [show (1) + 5 = 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (w + 12)))) (K.neg (K.mul (Zs K x (w + 7)) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (3)))))) := by
                      have h := A2.mk K O x hT 1 (1) (w + 4)
                      try rw [show (1) + (w + 4) + 1 + 1 = w + 7 by lib_nat] at h
                      try rw [show (1) + (w + 4) + 1 = w + 6 by lib_nat] at h
                      try rw [show (1) + 1 = 2 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (5)))))) := by
                      have h := A2.mk K O x hT 3 (1) (w + 4)
                      try rw [show (1) + (w + 4) + 1 + 3 = w + 9 by lib_nat] at h
                      try rw [show (1) + (w + 4) + 1 = w + 6 by lib_nat] at h
                      try rw [show (1) + 3 = 4 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (7)))))) := by
                      have h := A2.mk K O x hT 5 (1) (w + 4)
                      try rw [show (1) + (w + 4) + 1 + 5 = w + 11 by lib_nat] at h
                      try rw [show (1) + (w + 4) + 1 = w + 6 by lib_nat] at h
                      try rw [show (1) + 5 = 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
          | succ a =>
            cases w with
            | zero =>
              rw [show a + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (K.add (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9)))) (K.neg (K.mul (Zs K x (a + 4)) (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8)))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 5))) (K.neg (K.mul (Zs K x (a + 4)) (Zs K x (a + 4)))))) := by
                have h := A2.mk K O x hT 1 (a + 2) (0)
                try rw [show (a + 2) + (0) + 1 + 1 = a + 4 by lib_nat] at h
                try rw [show (a + 2) + (0) + 1 = a + 3 by lib_nat] at h
                try rw [show (a + 2) + 1 = a + 3 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 7)))))) := by
                have h := A2.mk K O x hT 4 (a + 2) (1)
                try rw [show (a + 2) + (1) + 1 + 4 = a + 8 by lib_nat] at h
                try rw [show (a + 2) + (1) + 1 = a + 4 by lib_nat] at h
                try rw [show (a + 2) + 4 = a + 6 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 3) (3) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (K.add (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10)))) (K.neg (K.mul (Zs K x (a + 5)) (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 6))) (K.neg (K.mul (Zs K x (a + 4)) (Zs K x (a + 5)))))) := by
                  have h := A2.mk K O x hT 2 (a + 2) (0)
                  try rw [show (a + 2) + (0) + 1 + 2 = a + 5 by lib_nat] at h
                  try rw [show (a + 2) + (0) + 1 = a + 3 by lib_nat] at h
                  try rw [show (a + 2) + 2 = a + 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 6)))))) := by
                  have h := A2.mk K O x hT 3 (a + 2) (1)
                  try rw [show (a + 2) + (1) + 1 + 3 = a + 7 by lib_nat] at h
                  try rw [show (a + 2) + (1) + 1 = a + 4 by lib_nat] at h
                  try rw [show (a + 2) + 3 = a + 5 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 8)))))) := by
                  have h := A2.mk K O x hT 5 (a + 2) (1)
                  try rw [show (a + 2) + (1) + 1 + 5 = a + 9 by lib_nat] at h
                  try rw [show (a + 2) + (1) + 1 = a + 4 by lib_nat] at h
                  try rw [show (a + 2) + 5 = a + 7 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (K.add (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 11)))) (K.neg (K.mul (Zs K x (a + 6)) (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8)))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 7))) (K.neg (K.mul (Zs K x (a + 4)) (Zs K x (a + 6)))))) := by
                    have h := A2.mk K O x hT 3 (a + 2) (0)
                    try rw [show (a + 2) + (0) + 1 + 3 = a + 6 by lib_nat] at h
                    try rw [show (a + 2) + (0) + 1 = a + 3 by lib_nat] at h
                    try rw [show (a + 2) + 3 = a + 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 6)))))) := by
                    have h := A2.mk K O x hT 3 (a + 2) (2)
                    try rw [show (a + 2) + (2) + 1 + 3 = a + 8 by lib_nat] at h
                    try rw [show (a + 2) + (2) + 1 = a + 5 by lib_nat] at h
                    try rw [show (a + 2) + 3 = a + 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 8)))))) := by
                    have h := A2.mk K O x hT 5 (a + 2) (2)
                    try rw [show (a + 2) + (2) + 1 + 5 = a + 10 by lib_nat] at h
                    try rw [show (a + 2) + (2) + 1 = a + 5 by lib_nat] at h
                    try rw [show (a + 2) + 5 = a + 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (K.add (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 12)))) (K.neg (K.mul (Zs K x (a + 7)) (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 4)) (Zs K x (a + 7)))))) := by
                      have h := A2.mk K O x hT 4 (a + 2) (0)
                      try rw [show (a + 2) + (0) + 1 + 4 = a + 7 by lib_nat] at h
                      try rw [show (a + 2) + (0) + 1 = a + 3 by lib_nat] at h
                      try rw [show (a + 2) + 4 = a + 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 7)))))) := by
                      have h := A2.mk K O x hT 4 (a + 2) (2)
                      try rw [show (a + 2) + (2) + 1 + 4 = a + 9 by lib_nat] at h
                      try rw [show (a + 2) + (2) + 1 = a + 5 by lib_nat] at h
                      try rw [show (a + 2) + 4 = a + 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 8)))))) := by
                      have h := A2.mk K O x hT 5 (a + 2) (3)
                      try rw [show (a + 2) + (3) + 1 + 5 = a + 11 by lib_nat] at h
                      try rw [show (a + 2) + (3) + 1 = a + 6 by lib_nat] at h
                      try rw [show (a + 2) + 5 = a + 7 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
                  | succ w =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = a + w + 10 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (K.add (K.add (Zs K x (a + w + 9)) (Zs K x (a + w + 11))) (Zs K x (a + w + 13)))) (K.neg (K.mul (Zs K x (a + w + 8)) (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + w + 9))) (K.neg (K.mul (Zs K x (a + w + 8)) (Zs K x (a + 4)))))) := by
                      have h := A2.mk K O x hT 1 (a + 2) (w + 4)
                      try rw [show (a + 2) + (w + 4) + 1 + 1 = a + w + 8 by lib_nat] at h
                      try rw [show (a + 2) + (w + 4) + 1 = a + w + 7 by lib_nat] at h
                      try rw [show (a + 2) + 1 = a + 3 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + w + 11))) (K.neg (K.mul (Zs K x (a + w + 8)) (Zs K x (a + 6)))))) := by
                      have h := A2.mk K O x hT 3 (a + 2) (w + 4)
                      try rw [show (a + 2) + (w + 4) + 1 + 3 = a + w + 10 by lib_nat] at h
                      try rw [show (a + 2) + (w + 4) + 1 = a + w + 7 by lib_nat] at h
                      try rw [show (a + 2) + 3 = a + 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + w + 13))) (K.neg (K.mul (Zs K x (a + w + 8)) (Zs K x (a + 8)))))) := by
                      have h := A2.mk K O x hT 5 (a + 2) (w + 4)
                      try rw [show (a + 2) + (w + 4) + 1 + 5 = a + w + 12 by lib_nat] at h
                      try rw [show (a + 2) + (w + 4) + 1 = a + w + 7 by lib_nat] at h
                      try rw [show (a + 2) + 5 = a + 7 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)

include hx hT hD in
theorem sg4 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (Zs K (Zs K x)) (Zs K x) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (1))) (K.neg (K.mul K.zero K.zero))))
      exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (2))) (K.neg (K.mul (Zs K x (1)) K.zero))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) K.zero))))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) K.zero))))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
          | succ w =>
            rw [show 0 + (w + 1 + 1 + 1 + 1) + 1 = w + 5 by lib_nat]
            show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (w + 5))) (K.neg (K.mul (Zs K x (w + 4)) K.zero))))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (2))) (K.neg (K.mul (Zs K x (1)) (Zs K x (1))))))
        have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (1))) := O.mul_nonneg _ _ (hx (0)) (hx (0))
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (1))))))
          have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (0)) (hx (1))
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (1))))))
            have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (0)) (hx (2))
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (1))))))
              have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (0)) (hx (3))
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              rw [show 0 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (w + 6))) (K.neg (K.mul (Zs K x (w + 5)) (Zs K x (1))))))
              have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (w + 5))) := O.mul_nonneg _ _ (hx (0)) (hx (w + 4))
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2)))))) := by
            have h := A2.mk K O x hT 1 (0) (0)
            try rw [show (0) + (0) + 1 + 1 = 2 by lib_nat] at h
            try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
            try rw [show (0) + 1 = 1 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (2))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3)))))) := by
              have h := A2.mk K O x hT 2 (0) (0)
              try rw [show (0) + (0) + 1 + 2 = 3 by lib_nat] at h
              try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
              try rw [show (0) + 2 = 2 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (2))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (2)) (Zs K x (4)))))) := by
                have h := A2.mk K O x hT 3 (0) (0)
                try rw [show (0) + (0) + 1 + 3 = 4 by lib_nat] at h
                try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                try rw [show (0) + 3 = 3 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (2))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (2)) (Zs K x (5)))))) := by
                  have h := A2.mk K O x hT 4 (0) (0)
                  try rw [show (0) + (0) + 1 + 4 = 5 by lib_nat] at h
                  try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                  try rw [show (0) + 4 = 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 7))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (2))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 7))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (2)))))) := by
                  have h := A2.mk K O x hT 1 (0) (w + 4)
                  try rw [show (0) + (w + 4) + 1 + 1 = w + 6 by lib_nat] at h
                  try rw [show (0) + (w + 4) + 1 = w + 5 by lib_nat] at h
                  try rw [show (0) + 1 = 1 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3)))))) := by
              have h := A2.mk K O x hT 1 (1) (0)
              try rw [show (1) + (0) + 1 + 1 = 3 by lib_nat] at h
              try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
              try rw [show (1) + 1 = 2 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (3))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
                have h := A2.mk K O x hT 2 (1) (0)
                try rw [show (1) + (0) + 1 + 2 = 4 by lib_nat] at h
                try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                try rw [show (1) + 2 = 3 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (3))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
                  have h := A2.mk K O x hT 3 (1) (0)
                  try rw [show (1) + (0) + 1 + 3 = 5 by lib_nat] at h
                  try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                  try rw [show (1) + 3 = 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (3))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (3)) (Zs K x (6)))))) := by
                    have h := A2.mk K O x hT 4 (1) (0)
                    try rw [show (1) + (0) + 1 + 4 = 6 by lib_nat] at h
                    try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                    try rw [show (1) + 4 = 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (3))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (3)))))) := by
                    have h := A2.mk K O x hT 1 (1) (w + 4)
                    try rw [show (1) + (w + 4) + 1 + 1 = w + 7 by lib_nat] at h
                    try rw [show (1) + (w + 4) + 1 = w + 6 by lib_nat] at h
                    try rw [show (1) + 1 = 2 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
                have h := A2.mk K O x hT 1 (2) (0)
                try rw [show (2) + (0) + 1 + 1 = 4 by lib_nat] at h
                try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                try rw [show (2) + 1 = 3 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (4))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
                  have h := A2.mk K O x hT 2 (2) (0)
                  try rw [show (2) + (0) + 1 + 2 = 5 by lib_nat] at h
                  try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                  try rw [show (2) + 2 = 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (4))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                    have h := A2.mk K O x hT 3 (2) (0)
                    try rw [show (2) + (0) + 1 + 3 = 6 by lib_nat] at h
                    try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                    try rw [show (2) + 3 = 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (4))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7)))))) := by
                      have h := A2.mk K O x hT 4 (2) (0)
                      try rw [show (2) + (0) + 1 + 4 = 7 by lib_nat] at h
                      try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                      try rw [show (2) + 4 = 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (4))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (4)))))) := by
                      have h := A2.mk K O x hT 1 (2) (w + 4)
                      try rw [show (2) + (w + 4) + 1 + 1 = w + 8 by lib_nat] at h
                      try rw [show (2) + (w + 4) + 1 = w + 7 by lib_nat] at h
                      try rw [show (2) + 1 = 3 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ a =>
            cases w with
            | zero =>
              rw [show a + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 6))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 5))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 6))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 5)))))) := by
                have h := A2.mk K O x hT 1 (a + 3) (0)
                try rw [show (a + 3) + (0) + 1 + 1 = a + 5 by lib_nat] at h
                try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                try rw [show (a + 3) + 1 = a + 4 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 7))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 5))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 7))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 6)))))) := by
                  have h := A2.mk K O x hT 2 (a + 3) (0)
                  try rw [show (a + 3) + (0) + 1 + 2 = a + 6 by lib_nat] at h
                  try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                  try rw [show (a + 3) + 2 = a + 5 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 5))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 7)))))) := by
                    have h := A2.mk K O x hT 3 (a + 3) (0)
                    try rw [show (a + 3) + (0) + 1 + 3 = a + 7 by lib_nat] at h
                    try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                    try rw [show (a + 3) + 3 = a + 6 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 5))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 8)))))) := by
                      have h := A2.mk K O x hT 4 (a + 3) (0)
                      try rw [show (a + 3) + (0) + 1 + 4 = a + 8 by lib_nat] at h
                      try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                      try rw [show (a + 3) + 4 = a + 7 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = a + w + 10 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + w + 10))) (K.neg (K.mul (Zs K x (a + w + 9)) (Zs K x (a + 5))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + w + 10))) (K.neg (K.mul (Zs K x (a + w + 9)) (Zs K x (a + 5)))))) := by
                      have h := A2.mk K O x hT 1 (a + 3) (w + 4)
                      try rw [show (a + 3) + (w + 4) + 1 + 1 = a + w + 9 by lib_nat] at h
                      try rw [show (a + 3) + (w + 4) + 1 = a + w + 8 by lib_nat] at h
                      try rw [show (a + 3) + 1 = a + 4 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

include hx hT hD in
theorem sg5 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (Zs K (Zs K (pv3 K x))) (Zs K (Zs K (pv2 K x))) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul K.zero K.zero) (K.neg (K.mul K.zero K.zero))))
      exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (3))) (K.neg (K.mul (Zs K x (4)) K.zero))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) K.zero))))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))) (K.neg (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) K.zero))))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
          | succ w =>
            rw [show 0 + (w + 1 + 1 + 1 + 1) + 1 = w + 5 by lib_nat]
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (w + 2)) (Zs K x (w + 4))) (Zs K x (w + 6)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (w + 1)) (Zs K x (w + 3))) (Zs K x (w + 5))) (Zs K x (w + 7))) K.zero))))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (3))) (K.neg (K.mul (Zs K x (4)) K.zero))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) K.zero))))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))) (K.neg (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) K.zero))))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) K.zero))))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
            | succ w =>
              rw [show 0 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (w + 3)) (Zs K x (w + 5))) (Zs K x (w + 7)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (w + 2)) (Zs K x (w + 4))) (Zs K x (w + 6))) (Zs K x (w + 8))) K.zero))))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))) (K.neg (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (3))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (Zs K x (3))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (Zs K x (3))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (K.add (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (w + 8)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (w + 3)) (Zs K x (w + 5))) (Zs K x (w + 7))) (Zs K x (w + 9))) (Zs K x (3))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 6))))) := A1.Dn K O x hD (0) (w + 5) (0) (1) (2) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 5))))) := A1.Dn K O x hD (1) (w + 3) (1) (2) (3) (w + 4) (w + 5) (w + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 7))))) := A1.Dn K O x hD (1) (w + 5) (1) (2) (3) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 3)) (Zs K x (w + 5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 4))))) := A1.Dn K O x hD (2) (w + 1) (2) (3) (4) (w + 3) (w + 4) (w + 5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 6))))) := A1.Dn K O x hD (2) (w + 3) (2) (3) (4) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 8))))) := A1.Dn K O x hD (2) (w + 5) (2) (3) (4) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))) (K.neg (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (Zs K x (2)) (Zs K x (4)))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (K.add (Zs K x (2)) (Zs K x (4)))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (Zs K x (2)) (Zs K x (4)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (Zs K x (2)) (Zs K x (4)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (7))))) := A1.Dn K O x hD (0) (6) (0) (1) (2) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (8))))) := A1.Dn K O x hD (1) (6) (1) (2) (3) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (w + 9)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (w + 8))) (Zs K x (w + 10))) (K.add (Zs K x (2)) (Zs K x (4)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 6))))) := A1.Dn K O x hD (0) (w + 5) (0) (1) (2) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 8))))) := A1.Dn K O x hD (0) (w + 7) (0) (1) (2) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 5))))) := A1.Dn K O x hD (1) (w + 3) (1) (2) (3) (w + 4) (w + 5) (w + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 7))))) := A1.Dn K O x hD (1) (w + 5) (1) (2) (3) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 7))))) := A1.Dn K O x hD (1) (w + 5) (1) (2) (3) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 9))))) := A1.Dn K O x hD (1) (w + 7) (1) (2) (3) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 6))))) := A1.Dn K O x hD (2) (w + 3) (2) (3) (4) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 8))))) := A1.Dn K O x hD (2) (w + 5) (2) (3) (4) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 5))))) := A1.Dn K O x hD (3) (w + 1) (3) (4) (5) (w + 4) (w + 5) (w + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 7))))) := A1.Dn K O x hD (3) (w + 3) (3) (4) (5) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 9))))) := A1.Dn K O x hD (3) (w + 5) (3) (4) (5) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (2))))) := A1.Dn K O x hD (0) (1) (0) (1) (2) (1) (2) (3) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (7))))) := A1.Dn K O x hD (0) (6) (0) (1) (2) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (8))))) := A1.Dn K O x hD (0) (7) (0) (1) (2) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (7))))) := A1.Dn K O x hD (0) (6) (0) (1) (2) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (9))))) := A1.Dn K O x hD (0) (8) (0) (1) (2) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (8))))) := A1.Dn K O x hD (1) (6) (1) (2) (3) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (9))))) := A1.Dn K O x hD (2) (6) (2) (3) (4) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (w + 10)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (w + 9))) (Zs K x (w + 11))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 6))))) := A1.Dn K O x hD (0) (w + 5) (0) (1) (2) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 8))))) := A1.Dn K O x hD (0) (w + 7) (0) (1) (2) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 10))))) := A1.Dn K O x hD (0) (w + 9) (0) (1) (2) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 7))))) := A1.Dn K O x hD (1) (w + 5) (1) (2) (3) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 9))))) := A1.Dn K O x hD (1) (w + 7) (1) (2) (3) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 6))))) := A1.Dn K O x hD (2) (w + 3) (2) (3) (4) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 8))))) := A1.Dn K O x hD (2) (w + 5) (2) (3) (4) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 8))))) := A1.Dn K O x hD (2) (w + 5) (2) (3) (4) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 10))))) := A1.Dn K O x hD (2) (w + 7) (2) (3) (4) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 7))))) := A1.Dn K O x hD (3) (w + 3) (3) (4) (5) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 9))))) := A1.Dn K O x hD (3) (w + 5) (3) (4) (5) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 6))))) := A1.Dn K O x hD (4) (w + 1) (4) (5) (6) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 8))))) := A1.Dn K O x hD (4) (w + 3) (4) (5) (6) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 10))))) := A1.Dn K O x hD (4) (w + 5) (4) (5) (6) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) t13) (by lib_ring)
          | succ a =>
            cases w with
            | zero =>
              rw [show a + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + 5))) (Zs K x (a + 7))) (K.add (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))) (Zs K x (a + 8))) (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6)))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 2))) (K.neg (K.mul (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + 3))))) := A1.Dn K O x hD (a + 1) (1) (a + 1) (a + 2) (a + 3) (a + 2) (a + 3) (a + 4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 2))) (K.neg (K.mul (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + 5))))) := A1.Dn K O x hD (a + 1) (3) (a + 1) (a + 2) (a + 3) (a + 4) (a + 5) (a + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 2))) (K.neg (K.mul (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 1) (5) (a + 1) (a + 2) (a + 3) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 5))))) := A1.Dn K O x hD (a + 3) (1) (a + 3) (a + 4) (a + 5) (a + 4) (a + 5) (a + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 3) (3) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 5) (1) (a + 5) (a + 6) (a + 7) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + 5))) (Zs K x (a + 7))) (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))) (Zs K x (a + 9))) (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 2))) (K.neg (K.mul (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + 4))))) := A1.Dn K O x hD (a + 1) (2) (a + 1) (a + 2) (a + 3) (a + 3) (a + 4) (a + 5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 2))) (K.neg (K.mul (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 1) (4) (a + 1) (a + 2) (a + 3) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 2))) (K.neg (K.mul (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 1) (6) (a + 1) (a + 2) (a + 3) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 5))))) := A1.Dn K O x hD (a + 2) (2) (a + 2) (a + 3) (a + 4) (a + 4) (a + 5) (a + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 2) (4) (a + 2) (a + 3) (a + 4) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 3) (2) (a + 3) (a + 4) (a + 5) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 3) (4) (a + 3) (a + 4) (a + 5) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 4) (2) (a + 4) (a + 5) (a + 6) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 5) (2) (a + 5) (a + 6) (a + 7) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + 5))) (Zs K x (a + 7))) (K.add (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))) (Zs K x (a + 10))) (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 2))) (K.neg (K.mul (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + 5))))) := A1.Dn K O x hD (a + 1) (3) (a + 1) (a + 2) (a + 3) (a + 4) (a + 5) (a + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 2))) (K.neg (K.mul (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 1) (5) (a + 1) (a + 2) (a + 3) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 2))) (K.neg (K.mul (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 1) (7) (a + 1) (a + 2) (a + 3) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 2) (3) (a + 2) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 2) (5) (a + 2) (a + 3) (a + 4) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 5))))) := A1.Dn K O x hD (a + 3) (1) (a + 3) (a + 4) (a + 5) (a + 4) (a + 5) (a + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 3) (3) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 3) (3) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 3) (5) (a + 3) (a + 4) (a + 5) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 4) (3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 5) (1) (a + 5) (a + 6) (a + 7) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 5) (3) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + 5))) (Zs K x (a + 7))) (K.add (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9))) (Zs K x (a + 11))) (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6)))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 2))) (K.neg (K.mul (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 1) (4) (a + 1) (a + 2) (a + 3) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 2))) (K.neg (K.mul (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 1) (6) (a + 1) (a + 2) (a + 3) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 2))) (K.neg (K.mul (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 1) (8) (a + 1) (a + 2) (a + 3) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 2) (4) (a + 2) (a + 3) (a + 4) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 2) (6) (a + 2) (a + 3) (a + 4) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 3) (2) (a + 3) (a + 4) (a + 5) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 3) (4) (a + 3) (a + 4) (a + 5) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 3) (4) (a + 3) (a + 4) (a + 5) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 3) (6) (a + 3) (a + 4) (a + 5) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 4) (2) (a + 4) (a + 5) (a + 6) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 4) (4) (a + 4) (a + 5) (a + 6) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 5) (2) (a + 5) (a + 6) (a + 7) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 5) (4) (a + 5) (a + 6) (a + 7) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) (by lib_ring)
                  | succ w =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = a + w + 10 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + 5))) (Zs K x (a + 7))) (K.add (K.add (Zs K x (a + w + 7)) (Zs K x (a + w + 9))) (Zs K x (a + w + 11)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (a + w + 6)) (Zs K x (a + w + 8))) (Zs K x (a + w + 10))) (Zs K x (a + w + 12))) (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4  -- (+25 chars; full line in the Zenodo source)
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 6)) (Zs K x (a + w + 8))) (Zs K x (a + 2))) (K.neg (K.mul (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + w + 7))))) := A1.Dn K O x hD (a + 1) (w + 5) (a + 1) (a + 2) (a + 3) (a + w + 6) (a + w + 7) (a + w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 8)) (Zs K x (a + w + 10))) (Zs K x (a + 2))) (K.neg (K.mul (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + w + 9))))) := A1.Dn K O x hD (a + 1) (w + 7) (a + 1) (a + 2) (a + 3) (a + w + 8) (a + w + 9) (a + w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 10)) (Zs K x (a + w + 12))) (Zs K x (a + 2))) (K.neg (K.mul (K.add (Zs K x (a + 1)) (Zs K x (a + 3))) (Zs K x (a + w + 11))))) := A1.Dn K O x hD (a + 1) (w + 9) (a + 1) (a + 2) (a + 3) (a + w + 10) (a + w + 11) (a + w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 7)) (Zs K x (a + w + 9))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + w + 8))))) := A1.Dn K O x hD (a + 2) (w + 5) (a + 2) (a + 3) (a + 4) (a + w + 7) (a + w + 8) (a + w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 9)) (Zs K x (a + w + 11))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + w + 10))))) := A1.Dn K O x hD (a + 2) (w + 7) (a + 2) (a + 3) (a + 4) (a + w + 9) (a + w + 10) (a + w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 6)) (Zs K x (a + w + 8))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + w + 7))))) := A1.Dn K O x hD (a + 3) (w + 3) (a + 3) (a + 4) (a + 5) (a + w + 6) (a + w + 7) (a + w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 8)) (Zs K x (a + w + 10))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + w + 9))))) := A1.Dn K O x hD (a + 3) (w + 5) (a + 3) (a + 4) (a + 5) (a + w + 8) (a + w + 9) (a + w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 8)) (Zs K x (a + w + 10))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + w + 9))))) := A1.Dn K O x hD (a + 3) (w + 5) (a + 3) (a + 4) (a + 5) (a + w + 8) (a + w + 9) (a + w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 10)) (Zs K x (a + w + 12))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + w + 11))))) := A1.Dn K O x hD (a + 3) (w + 7) (a + 3) (a + 4) (a + 5) (a + w + 10) (a + w + 11) (a + w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 7)) (Zs K x (a + w + 9))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + w + 8))))) := A1.Dn K O x hD (a + 4) (w + 3) (a + 4) (a + 5) (a + 6) (a + w + 7) (a + w + 8) (a + w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 9)) (Zs K x (a + w + 11))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + w + 10))))) := A1.Dn K O x hD (a + 4) (w + 5) (a + 4) (a + 5) (a + 6) (a + w + 9) (a + w + 10) (a + w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 6)) (Zs K x (a + w + 8))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + w + 7))))) := A1.Dn K O x hD (a + 5) (w + 1) (a + 5) (a + 6) (a + 7) (a + w + 6) (a + w + 7) (a + w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 8)) (Zs K x (a + w + 10))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + w + 9))))) := A1.Dn K O x hD (a + 5) (w + 3) (a + 5) (a + 6) (a + 7) (a + w + 8) (a + w + 9) (a + w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 10)) (Zs K x (a + w + 12))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + w + 11))))) := A1.Dn K O x hD (a + 5) (w + 5) (a + 5) (a + 6) (a + 7) (a + w + 10) (a + w + 11) (a + w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) t13) (by lib_ring)

include hx hT hD in
theorem sg6 (i w : Nat) : O.le K.zero (Lagrange.minor K (Zs K (Zs K x)) (Zs K (Zs K (c1v K x))) i (i + w + 1)) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.add (K.mul K.zero K.zero) (K.neg (K.mul K.zero K.zero)))
      exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.add (K.mul K.zero (K.add K.zero (Zs K x (2)))) (K.neg (K.mul (Zs K x (1)) K.zero)))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (1)) (Zs K x (3)))) (K.neg (K.mul (Zs K x (2)) K.zero)))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (Zs K x (3)) K.zero)))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
          | succ w =>
            rw [show 0 + (w + 1 + 1 + 1 + 1) + 1 = w + 5 by lib_nat]
            show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (w + 3)) (Zs K x (w + 5)))) (K.neg (K.mul (Zs K x (w + 4)) K.zero)))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.add (K.mul K.zero (K.add K.zero (Zs K x (2)))) (K.neg (K.mul (Zs K x (1)) K.zero)))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (1)) (Zs K x (3)))) (K.neg (K.mul (Zs K x (2)) K.zero)))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (Zs K x (3)) K.zero)))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (4)) K.zero)))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
            | succ w =>
              rw [show 0 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (w + 4)) (Zs K x (w + 6)))) (K.neg (K.mul (Zs K x (w + 5)) K.zero)))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (1)) (Zs K x (3)))) (K.neg (K.mul (Zs K x (2)) (K.add K.zero (Zs K x (2))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (2))))) := A1.Dn K O x hD (0) (1) (0) (1) (2) (1) (2) (3) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (Zs K x (3)) (K.add K.zero (Zs K x (2))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (4)) (K.add K.zero (Zs K x (2))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (5)) (K.add K.zero (Zs K x (2))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (w + 5)) (Zs K x (w + 7)))) (K.neg (K.mul (Zs K x (w + 6)) (K.add K.zero (Zs K x (2))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 6))))) := A1.Dn K O x hD (0) (w + 5) (0) (1) (2) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (Zs K x (3)) (K.add (Zs K x (1)) (Zs K x (3))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (4)) (K.add (Zs K x (1)) (Zs K x (3))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (5)) (K.add (Zs K x (1)) (Zs K x (3))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (Zs K x (6)) (K.add (Zs K x (1)) (Zs K x (3))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (w + 6)) (Zs K x (w + 8)))) (K.neg (K.mul (Zs K x (w + 7)) (K.add (Zs K x (1)) (Zs K x (3))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 7))))) := A1.Dn K O x hD (1) (w + 5) (1) (2) (3) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (4)) (K.add (Zs K x (2)) (Zs K x (4))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (5)) (K.add (Zs K x (2)) (Zs K x (4))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (Zs K x (6)) (K.add (Zs K x (2)) (Zs K x (4))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (6)) (Zs K x (8)))) (K.neg (K.mul (Zs K x (7)) (K.add (Zs K x (2)) (Zs K x (4))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (w + 7)) (Zs K x (w + 9)))) (K.neg (K.mul (Zs K x (w + 8)) (K.add (Zs K x (2)) (Zs K x (4))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 8))))) := A1.Dn K O x hD (2) (w + 5) (2) (3) (4) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ a =>
            cases w with
            | zero =>
              rw [show a + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 6 by lib_nat]
              show O.le K.zero (K.add (K.mul (Zs K x (a + 4)) (K.add (Zs K x (a + 4)) (Zs K x (a + 6)))) (K.neg (K.mul (Zs K x (a + 5)) (K.add (Zs K x (a + 3)) (Zs K x (a + 5))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 5))))) := A1.Dn K O x hD (a + 3) (1) (a + 3) (a + 4) (a + 5) (a + 4) (a + 5) (a + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.add (K.mul (Zs K x (a + 4)) (K.add (Zs K x (a + 5)) (Zs K x (a + 7)))) (K.neg (K.mul (Zs K x (a + 6)) (K.add (Zs K x (a + 3)) (Zs K x (a + 5))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 3) (2) (a + 3) (a + 4) (a + 5) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.add (K.mul (Zs K x (a + 4)) (K.add (Zs K x (a + 6)) (Zs K x (a + 8)))) (K.neg (K.mul (Zs K x (a + 7)) (K.add (Zs K x (a + 3)) (Zs K x (a + 5))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 3) (3) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.add (K.mul (Zs K x (a + 4)) (K.add (Zs K x (a + 7)) (Zs K x (a + 9)))) (K.neg (K.mul (Zs K x (a + 8)) (K.add (Zs K x (a + 3)) (Zs K x (a + 5))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 3) (4) (a + 3) (a + 4) (a + 5) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = a + w + 10 by lib_nat]
                    show O.le K.zero (K.add (K.mul (Zs K x (a + 4)) (K.add (Zs K x (a + w + 8)) (Zs K x (a + w + 10)))) (K.neg (K.mul (Zs K x (a + w + 9)) (K.add (Zs K x (a + 3)) (Zs K x (a + 5))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 8)) (Zs K x (a + w + 10))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + w + 9))))) := A1.Dn K O x hD (a + 3) (w + 5) (a + 3) (a + 4) (a + 5) (a + w + 8) (a + w + 9) (a + w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

include hx hT hD in
theorem sg7 (i w : Nat) : O.le K.zero (Lagrange.minor K (fun i => x (i + 1)) x i (i + w + 1)) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.add (K.mul (Zs K x (2)) (Zs K x (2))) (K.neg (K.mul (Zs K x (3)) (Zs K x (1)))))
      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2)))))) := by
        have h := A2.mk K O x hT 1 (0) (0)
        try rw [show (0) + (0) + 1 + 1 = 2 by lib_nat] at h
        try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
        try rw [show (0) + 1 = 1 by lib_nat] at h
        exact A2.nn_of_nonpos_neg K O _ h
      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.add (K.mul (Zs K x (2)) (Zs K x (3))) (K.neg (K.mul (Zs K x (4)) (Zs K x (1)))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3)))))) := by
          have h := A2.mk K O x hT 2 (0) (0)
          try rw [show (0) + (0) + 1 + 2 = 3 by lib_nat] at h
          try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
          try rw [show (0) + 2 = 2 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (5)) (Zs K x (1)))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (2)) (Zs K x (4)))))) := by
            have h := A2.mk K O x hT 3 (0) (0)
            try rw [show (0) + (0) + 1 + 3 = 4 by lib_nat] at h
            try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
            try rw [show (0) + 3 = 3 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (6)) (Zs K x (1)))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (2)) (Zs K x (5)))))) := by
              have h := A2.mk K O x hT 4 (0) (0)
              try rw [show (0) + (0) + 1 + 4 = 5 by lib_nat] at h
              try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
              try rw [show (0) + 4 = 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            rw [show 0 + (w + 1 + 1 + 1 + 1) + 1 = w + 5 by lib_nat]
            show O.le K.zero (K.add (K.mul (Zs K x (2)) (Zs K x (w + 6))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (1)))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 7))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (2)))))) := by
              have h := A2.mk K O x hT 1 (0) (w + 4)
              try rw [show (0) + (w + 4) + 1 + 1 = w + 6 by lib_nat] at h
              try rw [show (0) + (w + 4) + 1 = w + 5 by lib_nat] at h
              try rw [show (0) + 1 = 1 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.add (K.mul (Zs K x (3)) (Zs K x (3))) (K.neg (K.mul (Zs K x (4)) (Zs K x (2)))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3)))))) := by
          have h := A2.mk K O x hT 1 (1) (0)
          try rw [show (1) + (0) + 1 + 1 = 3 by lib_nat] at h
          try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
          try rw [show (1) + 1 = 2 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul (Zs K x (3)) (Zs K x (4))) (K.neg (K.mul (Zs K x (5)) (Zs K x (2)))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
            have h := A2.mk K O x hT 2 (1) (0)
            try rw [show (1) + (0) + 1 + 2 = 4 by lib_nat] at h
            try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
            try rw [show (1) + 2 = 3 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (6)) (Zs K x (2)))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
              have h := A2.mk K O x hT 3 (1) (0)
              try rw [show (1) + (0) + 1 + 3 = 5 by lib_nat] at h
              try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
              try rw [show (1) + 3 = 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (7)) (Zs K x (2)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (3)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT 4 (1) (0)
                try rw [show (1) + (0) + 1 + 4 = 6 by lib_nat] at h
                try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                try rw [show (1) + 4 = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              rw [show 0 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.add (K.mul (Zs K x (3)) (Zs K x (w + 7))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (2)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (3)))))) := by
                have h := A2.mk K O x hT 1 (1) (w + 4)
                try rw [show (1) + (w + 4) + 1 + 1 = w + 7 by lib_nat] at h
                try rw [show (1) + (w + 4) + 1 = w + 6 by lib_nat] at h
                try rw [show (1) + 1 = 2 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (4))) (K.neg (K.mul (Zs K x (5)) (Zs K x (3)))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
            have h := A2.mk K O x hT 1 (2) (0)
            try rw [show (2) + (0) + 1 + 1 = 4 by lib_nat] at h
            try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
            try rw [show (2) + 1 = 3 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (5))) (K.neg (K.mul (Zs K x (6)) (Zs K x (3)))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
              have h := A2.mk K O x hT 2 (2) (0)
              try rw [show (2) + (0) + 1 + 2 = 5 by lib_nat] at h
              try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
              try rw [show (2) + 2 = 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (7)) (Zs K x (3)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT 3 (2) (0)
                try rw [show (2) + (0) + 1 + 3 = 6 by lib_nat] at h
                try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                try rw [show (2) + 3 = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (8)) (Zs K x (3)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT 4 (2) (0)
                  try rw [show (2) + (0) + 1 + 4 = 7 by lib_nat] at h
                  try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                  try rw [show (2) + 4 = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (3)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT 1 (2) (w + 4)
                  try rw [show (2) + (w + 4) + 1 + 1 = w + 8 by lib_nat] at h
                  try rw [show (2) + (w + 4) + 1 = w + 7 by lib_nat] at h
                  try rw [show (2) + 1 = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (5)) (Zs K x (5))) (K.neg (K.mul (Zs K x (6)) (Zs K x (4)))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5)))))) := by
              have h := A2.mk K O x hT 1 (3) (0)
              try rw [show (3) + (0) + 1 + 1 = 5 by lib_nat] at h
              try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
              try rw [show (3) + 1 = 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (5)) (Zs K x (6))) (K.neg (K.mul (Zs K x (7)) (Zs K x (4)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT 2 (3) (0)
                try rw [show (3) + (0) + 1 + 2 = 6 by lib_nat] at h
                try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                try rw [show (3) + 2 = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (5)) (Zs K x (7))) (K.neg (K.mul (Zs K x (8)) (Zs K x (4)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT 3 (3) (0)
                  try rw [show (3) + (0) + 1 + 3 = 7 by lib_nat] at h
                  try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                  try rw [show (3) + 3 = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (9)) (Zs K x (4)))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (5)) (Zs K x (8)))))) := by
                    have h := A2.mk K O x hT 4 (3) (0)
                    try rw [show (3) + (0) + 1 + 4 = 8 by lib_nat] at h
                    try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                    try rw [show (3) + 4 = 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.add (K.mul (Zs K x (5)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (4)))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT 1 (3) (w + 4)
                    try rw [show (3) + (w + 4) + 1 + 1 = w + 9 by lib_nat] at h
                    try rw [show (3) + (w + 4) + 1 = w + 8 by lib_nat] at h
                    try rw [show (3) + 1 = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (6)) (Zs K x (6))) (K.neg (K.mul (Zs K x (7)) (Zs K x (5)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT 1 (4) (0)
                try rw [show (4) + (0) + 1 + 1 = 6 by lib_nat] at h
                try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                try rw [show (4) + 1 = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (6)) (Zs K x (7))) (K.neg (K.mul (Zs K x (8)) (Zs K x (5)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT 2 (4) (0)
                  try rw [show (4) + (0) + 1 + 2 = 7 by lib_nat] at h
                  try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                  try rw [show (4) + 2 = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.add (K.mul (Zs K x (6)) (Zs K x (8))) (K.neg (K.mul (Zs K x (9)) (Zs K x (5)))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (6)) (Zs K x (8)))))) := by
                    have h := A2.mk K O x hT 3 (4) (0)
                    try rw [show (4) + (0) + 1 + 3 = 8 by lib_nat] at h
                    try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                    try rw [show (4) + 3 = 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.add (K.mul (Zs K x (6)) (Zs K x (9))) (K.neg (K.mul (Zs K x (10)) (Zs K x (5)))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (10))) (K.neg (K.mul (Zs K x (6)) (Zs K x (9)))))) := by
                      have h := A2.mk K O x hT 4 (4) (0)
                      try rw [show (4) + (0) + 1 + 4 = 9 by lib_nat] at h
                      try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                      try rw [show (4) + 4 = 8 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.add (K.mul (Zs K x (6)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (5)))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT 1 (4) (w + 4)
                      try rw [show (4) + (w + 4) + 1 + 1 = w + 10 by lib_nat] at h
                      try rw [show (4) + (w + 4) + 1 = w + 9 by lib_nat] at h
                      try rw [show (4) + 1 = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ a =>
            cases w with
            | zero =>
              rw [show a + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 6 by lib_nat]
              show O.le K.zero (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 7))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 6)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 7)))))) := by
                have h := A2.mk K O x hT 1 (a + 5) (0)
                try rw [show (a + 5) + (0) + 1 + 1 = a + 7 by lib_nat] at h
                try rw [show (a + 5) + (0) + 1 = a + 6 by lib_nat] at h
                try rw [show (a + 5) + 1 = a + 6 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 6)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 8)))))) := by
                  have h := A2.mk K O x hT 2 (a + 5) (0)
                  try rw [show (a + 5) + (0) + 1 + 2 = a + 8 by lib_nat] at h
                  try rw [show (a + 5) + (0) + 1 = a + 6 by lib_nat] at h
                  try rw [show (a + 5) + 2 = a + 7 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 6)))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 9)))))) := by
                    have h := A2.mk K O x hT 3 (a + 5) (0)
                    try rw [show (a + 5) + (0) + 1 + 3 = a + 9 by lib_nat] at h
                    try rw [show (a + 5) + (0) + 1 = a + 6 by lib_nat] at h
                    try rw [show (a + 5) + 3 = a + 8 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 11)) (Zs K x (a + 6)))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 10)))))) := by
                      have h := A2.mk K O x hT 4 (a + 5) (0)
                      try rw [show (a + 5) + (0) + 1 + 4 = a + 10 by lib_nat] at h
                      try rw [show (a + 5) + (0) + 1 = a + 6 by lib_nat] at h
                      try rw [show (a + 5) + 4 = a + 9 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = a + w + 10 by lib_nat]
                    show O.le K.zero (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + w + 11))) (K.neg (K.mul (Zs K x (a + w + 12)) (Zs K x (a + 6)))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + w + 12))) (K.neg (K.mul (Zs K x (a + w + 11)) (Zs K x (a + 7)))))) := by
                      have h := A2.mk K O x hT 1 (a + 5) (w + 4)
                      try rw [show (a + 5) + (w + 4) + 1 + 1 = a + w + 11 by lib_nat] at h
                      try rw [show (a + 5) + (w + 4) + 1 = a + w + 10 by lib_nat] at h
                      try rw [show (a + 5) + 1 = a + 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

include hx hT hD in
theorem sg8 (i w : Nat) : O.le K.zero (Lagrange.minor K x (Zs K x) i (i + w + 1)) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.add (K.mul (Zs K x (1)) (Zs K x (1))) (K.neg (K.mul (Zs K x (2)) K.zero)))
      have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (1))) := O.mul_nonneg _ _ (hx (0)) (hx (0))
      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.add (K.mul (Zs K x (1)) (Zs K x (2))) (K.neg (K.mul (Zs K x (3)) K.zero)))
        have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (0)) (hx (1))
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (4)) K.zero)))
          have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (0)) (hx (2))
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (5)) K.zero)))
            have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (0)) (hx (3))
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            rw [show 0 + (w + 1 + 1 + 1 + 1) + 1 = w + 5 by lib_nat]
            show O.le K.zero (K.add (K.mul (Zs K x (1)) (Zs K x (w + 5))) (K.neg (K.mul (Zs K x (w + 6)) K.zero)))
            have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (w + 5))) := O.mul_nonneg _ _ (hx (0)) (hx (w + 4))
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.add (K.mul (Zs K x (2)) (Zs K x (2))) (K.neg (K.mul (Zs K x (3)) (Zs K x (1)))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2)))))) := by
          have h := A2.mk K O x hT 1 (0) (0)
          try rw [show (0) + (0) + 1 + 1 = 2 by lib_nat] at h
          try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
          try rw [show (0) + 1 = 1 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul (Zs K x (2)) (Zs K x (3))) (K.neg (K.mul (Zs K x (4)) (Zs K x (1)))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3)))))) := by
            have h := A2.mk K O x hT 2 (0) (0)
            try rw [show (0) + (0) + 1 + 2 = 3 by lib_nat] at h
            try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
            try rw [show (0) + 2 = 2 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (5)) (Zs K x (1)))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (2)) (Zs K x (4)))))) := by
              have h := A2.mk K O x hT 3 (0) (0)
              try rw [show (0) + (0) + 1 + 3 = 4 by lib_nat] at h
              try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
              try rw [show (0) + 3 = 3 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (6)) (Zs K x (1)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (2)) (Zs K x (5)))))) := by
                have h := A2.mk K O x hT 4 (0) (0)
                try rw [show (0) + (0) + 1 + 4 = 5 by lib_nat] at h
                try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                try rw [show (0) + 4 = 4 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              rw [show 0 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.add (K.mul (Zs K x (2)) (Zs K x (w + 6))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (1)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 7))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (2)))))) := by
                have h := A2.mk K O x hT 1 (0) (w + 4)
                try rw [show (0) + (w + 4) + 1 + 1 = w + 6 by lib_nat] at h
                try rw [show (0) + (w + 4) + 1 = w + 5 by lib_nat] at h
                try rw [show (0) + 1 = 1 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul (Zs K x (3)) (Zs K x (3))) (K.neg (K.mul (Zs K x (4)) (Zs K x (2)))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3)))))) := by
            have h := A2.mk K O x hT 1 (1) (0)
            try rw [show (1) + (0) + 1 + 1 = 3 by lib_nat] at h
            try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
            try rw [show (1) + 1 = 2 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (3)) (Zs K x (4))) (K.neg (K.mul (Zs K x (5)) (Zs K x (2)))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
              have h := A2.mk K O x hT 2 (1) (0)
              try rw [show (1) + (0) + 1 + 2 = 4 by lib_nat] at h
              try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
              try rw [show (1) + 2 = 3 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (6)) (Zs K x (2)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
                have h := A2.mk K O x hT 3 (1) (0)
                try rw [show (1) + (0) + 1 + 3 = 5 by lib_nat] at h
                try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                try rw [show (1) + 3 = 4 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (7)) (Zs K x (2)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (3)) (Zs K x (6)))))) := by
                  have h := A2.mk K O x hT 4 (1) (0)
                  try rw [show (1) + (0) + 1 + 4 = 6 by lib_nat] at h
                  try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                  try rw [show (1) + 4 = 5 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.add (K.mul (Zs K x (3)) (Zs K x (w + 7))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (2)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (3)))))) := by
                  have h := A2.mk K O x hT 1 (1) (w + 4)
                  try rw [show (1) + (w + 4) + 1 + 1 = w + 7 by lib_nat] at h
                  try rw [show (1) + (w + 4) + 1 = w + 6 by lib_nat] at h
                  try rw [show (1) + 1 = 2 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (4))) (K.neg (K.mul (Zs K x (5)) (Zs K x (3)))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
              have h := A2.mk K O x hT 1 (2) (0)
              try rw [show (2) + (0) + 1 + 1 = 4 by lib_nat] at h
              try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
              try rw [show (2) + 1 = 3 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (5))) (K.neg (K.mul (Zs K x (6)) (Zs K x (3)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
                have h := A2.mk K O x hT 2 (2) (0)
                try rw [show (2) + (0) + 1 + 2 = 5 by lib_nat] at h
                try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                try rw [show (2) + 2 = 4 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (7)) (Zs K x (3)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                  have h := A2.mk K O x hT 3 (2) (0)
                  try rw [show (2) + (0) + 1 + 3 = 6 by lib_nat] at h
                  try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                  try rw [show (2) + 3 = 5 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (8)) (Zs K x (3)))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7)))))) := by
                    have h := A2.mk K O x hT 4 (2) (0)
                    try rw [show (2) + (0) + 1 + 4 = 7 by lib_nat] at h
                    try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                    try rw [show (2) + 4 = 6 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (3)))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (4)))))) := by
                    have h := A2.mk K O x hT 1 (2) (w + 4)
                    try rw [show (2) + (w + 4) + 1 + 1 = w + 8 by lib_nat] at h
                    try rw [show (2) + (w + 4) + 1 = w + 7 by lib_nat] at h
                    try rw [show (2) + 1 = 3 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (5)) (Zs K x (5))) (K.neg (K.mul (Zs K x (6)) (Zs K x (4)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5)))))) := by
                have h := A2.mk K O x hT 1 (3) (0)
                try rw [show (3) + (0) + 1 + 1 = 5 by lib_nat] at h
                try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                try rw [show (3) + 1 = 4 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (5)) (Zs K x (6))) (K.neg (K.mul (Zs K x (7)) (Zs K x (4)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
                  have h := A2.mk K O x hT 2 (3) (0)
                  try rw [show (3) + (0) + 1 + 2 = 6 by lib_nat] at h
                  try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                  try rw [show (3) + 2 = 5 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.add (K.mul (Zs K x (5)) (Zs K x (7))) (K.neg (K.mul (Zs K x (8)) (Zs K x (4)))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
                    have h := A2.mk K O x hT 3 (3) (0)
                    try rw [show (3) + (0) + 1 + 3 = 7 by lib_nat] at h
                    try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                    try rw [show (3) + 3 = 6 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (9)) (Zs K x (4)))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (5)) (Zs K x (8)))))) := by
                      have h := A2.mk K O x hT 4 (3) (0)
                      try rw [show (3) + (0) + 1 + 4 = 8 by lib_nat] at h
                      try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                      try rw [show (3) + 4 = 7 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.add (K.mul (Zs K x (5)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (4)))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (5)))))) := by
                      have h := A2.mk K O x hT 1 (3) (w + 4)
                      try rw [show (3) + (w + 4) + 1 + 1 = w + 9 by lib_nat] at h
                      try rw [show (3) + (w + 4) + 1 = w + 8 by lib_nat] at h
                      try rw [show (3) + 1 = 4 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ a =>
            cases w with
            | zero =>
              rw [show a + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 6 by lib_nat]
              show O.le K.zero (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 6))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 5)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 5)) (Zs K x (a + 7))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 6)))))) := by
                have h := A2.mk K O x hT 1 (a + 4) (0)
                try rw [show (a + 4) + (0) + 1 + 1 = a + 6 by lib_nat] at h
                try rw [show (a + 4) + (0) + 1 = a + 5 by lib_nat] at h
                try rw [show (a + 4) + 1 = a + 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 7))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 5)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 5)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 7)))))) := by
                  have h := A2.mk K O x hT 2 (a + 4) (0)
                  try rw [show (a + 4) + (0) + 1 + 2 = a + 7 by lib_nat] at h
                  try rw [show (a + 4) + (0) + 1 = a + 5 by lib_nat] at h
                  try rw [show (a + 4) + 2 = a + 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 5)))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 5)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 8)))))) := by
                    have h := A2.mk K O x hT 3 (a + 4) (0)
                    try rw [show (a + 4) + (0) + 1 + 3 = a + 8 by lib_nat] at h
                    try rw [show (a + 4) + (0) + 1 = a + 5 by lib_nat] at h
                    try rw [show (a + 4) + 3 = a + 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 5)))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 5)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 9)))))) := by
                      have h := A2.mk K O x hT 4 (a + 4) (0)
                      try rw [show (a + 4) + (0) + 1 + 4 = a + 9 by lib_nat] at h
                      try rw [show (a + 4) + (0) + 1 = a + 5 by lib_nat] at h
                      try rw [show (a + 4) + 4 = a + 8 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = a + w + 10 by lib_nat]
                    show O.le K.zero (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + w + 10))) (K.neg (K.mul (Zs K x (a + w + 11)) (Zs K x (a + 5)))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 5)) (Zs K x (a + w + 11))) (K.neg (K.mul (Zs K x (a + w + 10)) (Zs K x (a + 6)))))) := by
                      have h := A2.mk K O x hT 1 (a + 4) (w + 4)
                      try rw [show (a + 4) + (w + 4) + 1 + 1 = a + w + 10 by lib_nat] at h
                      try rw [show (a + 4) + (w + 4) + 1 = a + w + 9 by lib_nat] at h
                      try rw [show (a + 4) + 1 = a + 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

include hx hT hD in
theorem sg9 (i w : Nat) : O.le K.zero (Lagrange.minor K (Zs K (Zs K (c1v K x))) (Zs K (Zs K (pv2 K x))) i (i + w + 1)) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.add (K.mul K.zero K.zero) (K.neg (K.mul K.zero K.zero)))
      exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.add (K.mul K.zero (Zs K x (3))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) K.zero)))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) K.zero)))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul K.zero (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) K.zero)))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
          | succ w =>
            rw [show 0 + (w + 1 + 1 + 1 + 1) + 1 = w + 5 by lib_nat]
            show O.le K.zero (K.add (K.mul K.zero (K.add (K.add (Zs K x (w + 2)) (Zs K x (w + 4))) (Zs K x (w + 6)))) (K.neg (K.mul (K.add (Zs K x (w + 3)) (Zs K x (w + 5))) K.zero)))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.add (K.mul K.zero (Zs K x (3))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) K.zero)))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) K.zero)))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul K.zero (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) K.zero)))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul K.zero (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) K.zero)))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
            | succ w =>
              rw [show 0 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.add (K.mul K.zero (K.add (K.add (Zs K x (w + 3)) (Zs K x (w + 5))) (Zs K x (w + 7)))) (K.neg (K.mul (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) K.zero)))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul (K.add K.zero (Zs K x (2))) (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3)))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (K.add K.zero (Zs K x (2))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (3)))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (K.add K.zero (Zs K x (2))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3)))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (K.add K.zero (Zs K x (2))) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3)))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.add (K.mul (K.add K.zero (Zs K x (2))) (K.add (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (w + 8)))) (K.neg (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (3)))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 6))))) := A1.Dn K O x hD (0) (w + 5) (0) (1) (2) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 5))))) := A1.Dn K O x hD (1) (w + 3) (1) (2) (3) (w + 4) (w + 5) (w + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 7))))) := A1.Dn K O x hD (1) (w + 5) (1) (2) (3) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (K.add (Zs K x (2)) (Zs K x (4))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (2))))) := A1.Dn K O x hD (0) (1) (0) (1) (2) (1) (2) (3) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (Zs K x (2)) (Zs K x (4))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (K.add (Zs K x (2)) (Zs K x (4))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (K.add (Zs K x (2)) (Zs K x (4))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (7))))) := A1.Dn K O x hD (0) (6) (0) (1) (2) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (K.add (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (w + 9)))) (K.neg (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (K.add (Zs K x (2)) (Zs K x (4))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 6))))) := A1.Dn K O x hD (0) (w + 5) (0) (1) (2) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 8))))) := A1.Dn K O x hD (0) (w + 7) (0) (1) (2) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 7))))) := A1.Dn K O x hD (1) (w + 5) (1) (2) (3) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 6))))) := A1.Dn K O x hD (2) (w + 3) (2) (3) (4) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 8))))) := A1.Dn K O x hD (2) (w + 5) (2) (3) (4) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (8))))) := A1.Dn K O x hD (1) (6) (1) (2) (3) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (K.add (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (w + 10)))) (K.neg (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 7))))) := A1.Dn K O x hD (1) (w + 5) (1) (2) (3) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 9))))) := A1.Dn K O x hD (1) (w + 7) (1) (2) (3) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 8))))) := A1.Dn K O x hD (2) (w + 5) (2) (3) (4) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 7))))) := A1.Dn K O x hD (3) (w + 3) (3) (4) (5) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 9))))) := A1.Dn K O x hD (3) (w + 5) (3) (4) (5) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
          | succ a =>
            cases w with
            | zero =>
              rw [show a + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 6 by lib_nat]
              show O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (K.add (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7)))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 4))))) := A1.Dn K O x hD (a + 2) (1) (a + 2) (a + 3) (a + 4) (a + 3) (a + 4) (a + 5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 2) (3) (a + 2) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 4) (1) (a + 4) (a + 5) (a + 6) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8)))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 5))))) := A1.Dn K O x hD (a + 2) (2) (a + 2) (a + 3) (a + 4) (a + 4) (a + 5) (a + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 2) (4) (a + 2) (a + 3) (a + 4) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 3) (2) (a + 3) (a + 4) (a + 5) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 4) (2) (a + 4) (a + 5) (a + 6) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (K.add (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9)))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 2) (3) (a + 2) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 2) (5) (a + 2) (a + 3) (a + 4) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 3) (3) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 4) (1) (a + 4) (a + 5) (a + 6) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 4) (3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (K.add (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10)))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 2) (4) (a + 2) (a + 3) (a + 4) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 2) (6) (a + 2) (a + 3) (a + 4) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 3) (4) (a + 3) (a + 4) (a + 5) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 4) (2) (a + 4) (a + 5) (a + 6) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 4) (4) (a + 4) (a + 5) (a + 6) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
                  | succ w =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = a + w + 10 by lib_nat]
                    show O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (K.add (K.add (Zs K x (a + w + 7)) (Zs K x (a + w + 9))) (Zs K x (a + w + 11)))) (K.neg (K.mul (K.add (Zs K x (a + w + 8)) (Zs K x (a + w + 10))) (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 7)) (Zs K x (a + w + 9))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + w + 8))))) := A1.Dn K O x hD (a + 2) (w + 5) (a + 2) (a + 3) (a + 4) (a + w + 7) (a + w + 8) (a + w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 9)) (Zs K x (a + w + 11))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + w + 10))))) := A1.Dn K O x hD (a + 2) (w + 7) (a + 2) (a + 3) (a + 4) (a + w + 9) (a + w + 10) (a + w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 8)) (Zs K x (a + w + 10))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + w + 9))))) := A1.Dn K O x hD (a + 3) (w + 5) (a + 3) (a + 4) (a + 5) (a + w + 8) (a + w + 9) (a + w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 7)) (Zs K x (a + w + 9))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + w + 8))))) := A1.Dn K O x hD (a + 4) (w + 3) (a + 4) (a + 5) (a + 6) (a + w + 7) (a + w + 8) (a + w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 9)) (Zs K x (a + w + 11))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + w + 10))))) := A1.Dn K O x hD (a + 4) (w + 5) (a + 4) (a + 5) (a + 6) (a + w + 9) (a + w + 10) (a + w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)

include hx hT hD in
theorem sg10 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (fun i => x (i + 1)) (fun i => x (i + 2)) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3))))))
      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3)))))) := by
        have h := A2.mk K O x hT 1 (1) (0)
        try rw [show (1) + (0) + 1 + 1 = 3 by lib_nat] at h
        try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
        try rw [show (1) + 1 = 2 by lib_nat] at h
        exact A2.nn_of_nonpos_neg K O _ h
      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (3))))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
          have h := A2.mk K O x hT 2 (1) (0)
          try rw [show (1) + (0) + 1 + 2 = 4 by lib_nat] at h
          try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
          try rw [show (1) + 2 = 3 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (3))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
            have h := A2.mk K O x hT 3 (1) (0)
            try rw [show (1) + (0) + 1 + 3 = 5 by lib_nat] at h
            try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
            try rw [show (1) + 3 = 4 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (3))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (3)) (Zs K x (6)))))) := by
              have h := A2.mk K O x hT 4 (1) (0)
              try rw [show (1) + (0) + 1 + 4 = 6 by lib_nat] at h
              try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
              try rw [show (1) + 4 = 5 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            rw [show 0 + (w + 1 + 1 + 1 + 1) + 1 = w + 5 by lib_nat]
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (3))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (3)))))) := by
              have h := A2.mk K O x hT 1 (1) (w + 4)
              try rw [show (1) + (w + 4) + 1 + 1 = w + 7 by lib_nat] at h
              try rw [show (1) + (w + 4) + 1 = w + 6 by lib_nat] at h
              try rw [show (1) + 1 = 2 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4))))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
          have h := A2.mk K O x hT 1 (2) (0)
          try rw [show (2) + (0) + 1 + 1 = 4 by lib_nat] at h
          try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
          try rw [show (2) + 1 = 3 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (4))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
            have h := A2.mk K O x hT 2 (2) (0)
            try rw [show (2) + (0) + 1 + 2 = 5 by lib_nat] at h
            try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
            try rw [show (2) + 2 = 4 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (4))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
              have h := A2.mk K O x hT 3 (2) (0)
              try rw [show (2) + (0) + 1 + 3 = 6 by lib_nat] at h
              try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
              try rw [show (2) + 3 = 5 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (4))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7)))))) := by
                have h := A2.mk K O x hT 4 (2) (0)
                try rw [show (2) + (0) + 1 + 4 = 7 by lib_nat] at h
                try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                try rw [show (2) + 4 = 6 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              rw [show 0 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (4))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (4)))))) := by
                have h := A2.mk K O x hT 1 (2) (w + 4)
                try rw [show (2) + (w + 4) + 1 + 1 = w + 8 by lib_nat] at h
                try rw [show (2) + (w + 4) + 1 = w + 7 by lib_nat] at h
                try rw [show (2) + 1 = 3 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5)))))) := by
            have h := A2.mk K O x hT 1 (3) (0)
            try rw [show (3) + (0) + 1 + 1 = 5 by lib_nat] at h
            try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
            try rw [show (3) + 1 = 4 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (5))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
              have h := A2.mk K O x hT 2 (3) (0)
              try rw [show (3) + (0) + 1 + 2 = 6 by lib_nat] at h
              try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
              try rw [show (3) + 2 = 5 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (5))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
                have h := A2.mk K O x hT 3 (3) (0)
                try rw [show (3) + (0) + 1 + 3 = 7 by lib_nat] at h
                try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                try rw [show (3) + 3 = 6 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (5))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (5)) (Zs K x (8)))))) := by
                  have h := A2.mk K O x hT 4 (3) (0)
                  try rw [show (3) + (0) + 1 + 4 = 8 by lib_nat] at h
                  try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                  try rw [show (3) + 4 = 7 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (5))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (5)))))) := by
                  have h := A2.mk K O x hT 1 (3) (w + 4)
                  try rw [show (3) + (w + 4) + 1 + 1 = w + 9 by lib_nat] at h
                  try rw [show (3) + (w + 4) + 1 = w + 8 by lib_nat] at h
                  try rw [show (3) + 1 = 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6)))))) := by
              have h := A2.mk K O x hT 1 (4) (0)
              try rw [show (4) + (0) + 1 + 1 = 6 by lib_nat] at h
              try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
              try rw [show (4) + 1 = 5 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (6))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
                have h := A2.mk K O x hT 2 (4) (0)
                try rw [show (4) + (0) + 1 + 2 = 7 by lib_nat] at h
                try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                try rw [show (4) + 2 = 6 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (6))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (6)) (Zs K x (8)))))) := by
                  have h := A2.mk K O x hT 3 (4) (0)
                  try rw [show (4) + (0) + 1 + 3 = 8 by lib_nat] at h
                  try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                  try rw [show (4) + 3 = 7 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (6))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (10))) (K.neg (K.mul (Zs K x (6)) (Zs K x (9)))))) := by
                    have h := A2.mk K O x hT 4 (4) (0)
                    try rw [show (4) + (0) + 1 + 4 = 9 by lib_nat] at h
                    try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                    try rw [show (4) + 4 = 8 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (6))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (6)))))) := by
                    have h := A2.mk K O x hT 1 (4) (w + 4)
                    try rw [show (4) + (w + 4) + 1 + 1 = w + 10 by lib_nat] at h
                    try rw [show (4) + (w + 4) + 1 = w + 9 by lib_nat] at h
                    try rw [show (4) + 1 = 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (7))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (7)))))) := by
                have h := A2.mk K O x hT 1 (5) (0)
                try rw [show (5) + (0) + 1 + 1 = 7 by lib_nat] at h
                try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                try rw [show (5) + 1 = 6 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (7))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (9))) (K.neg (K.mul (Zs K x (7)) (Zs K x (8)))))) := by
                  have h := A2.mk K O x hT 2 (5) (0)
                  try rw [show (5) + (0) + 1 + 2 = 8 by lib_nat] at h
                  try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                  try rw [show (5) + 2 = 7 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (7))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (10))) (K.neg (K.mul (Zs K x (7)) (Zs K x (9)))))) := by
                    have h := A2.mk K O x hT 3 (5) (0)
                    try rw [show (5) + (0) + 1 + 3 = 9 by lib_nat] at h
                    try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                    try rw [show (5) + 3 = 8 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (11))) (K.neg (K.mul (Zs K x (10)) (Zs K x (7))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (11))) (K.neg (K.mul (Zs K x (7)) (Zs K x (10)))))) := by
                      have h := A2.mk K O x hT 4 (5) (0)
                      try rw [show (5) + (0) + 1 + 4 = 10 by lib_nat] at h
                      try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                      try rw [show (5) + 4 = 9 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (7))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (7)))))) := by
                      have h := A2.mk K O x hT 1 (5) (w + 4)
                      try rw [show (5) + (w + 4) + 1 + 1 = w + 11 by lib_nat] at h
                      try rw [show (5) + (w + 4) + 1 = w + 10 by lib_nat] at h
                      try rw [show (5) + 1 = 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ a =>
            cases w with
            | zero =>
              rw [show a + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 8))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 8)))))) := by
                have h := A2.mk K O x hT 1 (a + 6) (0)
                try rw [show (a + 6) + (0) + 1 + 1 = a + 8 by lib_nat] at h
                try rw [show (a + 6) + (0) + 1 = a + 7 by lib_nat] at h
                try rw [show (a + 6) + 1 = a + 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 8))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 9)))))) := by
                  have h := A2.mk K O x hT 2 (a + 6) (0)
                  try rw [show (a + 6) + (0) + 1 + 2 = a + 9 by lib_nat] at h
                  try rw [show (a + 6) + (0) + 1 = a + 7 by lib_nat] at h
                  try rw [show (a + 6) + 2 = a + 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 8))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 10)))))) := by
                    have h := A2.mk K O x hT 3 (a + 6) (0)
                    try rw [show (a + 6) + (0) + 1 + 3 = a + 10 by lib_nat] at h
                    try rw [show (a + 6) + (0) + 1 = a + 7 by lib_nat] at h
                    try rw [show (a + 6) + 3 = a + 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 11)) (Zs K x (a + 8))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 11)))))) := by
                      have h := A2.mk K O x hT 4 (a + 6) (0)
                      try rw [show (a + 6) + (0) + 1 + 4 = a + 11 by lib_nat] at h
                      try rw [show (a + 6) + (0) + 1 = a + 7 by lib_nat] at h
                      try rw [show (a + 6) + 4 = a + 10 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1) + 1 = a + w + 10 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + w + 13))) (K.neg (K.mul (Zs K x (a + w + 12)) (Zs K x (a + 8))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + w + 13))) (K.neg (K.mul (Zs K x (a + w + 12)) (Zs K x (a + 8)))))) := by
                      have h := A2.mk K O x hT 1 (a + 6) (w + 4)
                      try rw [show (a + 6) + (w + 4) + 1 + 1 = a + w + 12 by lib_nat] at h
                      try rw [show (a + 6) + (w + 4) + 1 = a + w + 11 by lib_nat] at h
                      try rw [show (a + 6) + 1 = a + 7 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

end signs

section final

variable (O : ORing K)

/-- **(A) at n = 2 for every length** (generated): a v-good X gives 16 c_2 c_4 ≤ 15 c_3² -/
theorem prod_lc (F : OField.OF K O) (h1 : O.le K.zero K.one) (X : List R) (hXg : L1Full.Good K O X) (M : Nat) (hX : X.length = M + 2) :
    O.le (K.mul (LibRing.castN K 16) (K.mul (cgc K X X 2) (cgc K X X 4)))
      (K.mul (LibRing.castN K 15) (K.mul (cgc K X X 3) (cgc K X X 3))) := by
  have ⟨hb, hpos, hv, h0⟩ := hXg
  let x := co K X
  have hzY : ∀ t, M + 3 ≤ t → Zs K x t = K.zero := fun t ht => by
    cases t with
    | zero => exact absurd ht (Nat.not_succ_le_zero _)
    | succ t => exact HeatLR.co_out K X t (by rw [hX]; exact Nat.le_of_succ_le_succ ht)
  have hY : ∀ j, O.le K.zero (Zs K x j) := fun j => by cases j with
    | zero => exact O.le_refl _
    | succ j => exact hb j
  have hD : ∀ a k, O.le K.zero (Window.Dl K (Zs K x) a (a + k)) := fun a k =>
    Window.dl_nn_t K O F (Zs K x) hY (M + 3)
      (fun j hj => hpos j (by rw [hX]; exact Nat.lt_of_succ_lt_succ hj))
      hzY (CgWindow.VV_Zs K O x hv h0) a k
  have hT : ∀ a w, O.le K.zero (K.add (K.mul (Zs K x (a + 1)) (Zs K x (a + w))) (K.neg (K.mul (Zs K x a) (Zs K x (a + w + 1))))) := by
    intro a w
    rw [← Lagrange.tail_minor K (Zs K x) (M + 3) hzY a w (M + 3) (by lib_nat_le)]
    exact CauchyBinet2.sum_nn K O _ (fun i => by rw [show a + w + i = a + i + w by lib_nat]; exact hD (a + i) w) _
  have hxz : ∀ t, M + 1 + 1 ≤ t → x t = K.zero := A1C.hzX K X (M + 1) hX
  have cb0 := CauchyBinet2.cb_nonneg K O (Zs K (Zs K (Zs K x))) (Zs K (Zs K x)) x (fun i => x (i + 1)) (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => A1.prod_np K O _ _ (A1.nn_neg K O _ (sg0 K O x hb hT hD i w)) (A1.nn_neg K O _ (sg1 K O x hb hT hD i w))))
  have cn0 := SU2CharExp.cN_nn K O h1 8
  have cb1 := CauchyBinet2.cb_nonneg K O (Zs K (Zs K (Zs K x))) (Zs K (c1v K x)) x (fun i => x (i + 1)) (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => A1.prod_np K O _ _ (A1.nn_neg K O _ (sg2 K O x hb hT hD i w)) (A1.nn_neg K O _ (sg1 K O x hb hT hD i w))))
  have cn1 := SU2CharExp.cN_nn K O h1 8
  have cb2 := CauchyBinet2.cb_nonneg K O (Zs K (Zs K (Zs K x))) (pv2 K x) x (fun i => x (i + 1)) (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => A1.prod_np K O _ _ (A1.nn_neg K O _ (sg3 K O x hb hT hD i w)) (A1.nn_neg K O _ (sg1 K O x hb hT hD i w))))
  have cn2 := SU2CharExp.cN_nn K O h1 4
  have cb3 := CauchyBinet2.cb_nonneg K O (Zs K (Zs K x)) (Zs K x) (Zs K (Zs K (pv3 K x))) (Zs K (Zs K (pv2 K x))) (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => A1.prod_np K O _ _ (A1.nn_neg K O _ (sg4 K O x hb hT hD i w)) (A1.nn_neg K O _ (sg5 K O x hb hT hD i w))))
  have cn3 := SU2CharExp.cN_nn K O h1 12
  have cb4 := CauchyBinet2.cb_nonneg K O (Zs K (Zs K x)) (Zs K (Zs K (c1v K x))) (fun i => x (i + 1)) x (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => O.mul_nonneg _ _ (sg6 K O x hb hT hD i w) (sg7 K O x hb hT hD i w)))
  have cn4 := SU2CharExp.cN_nn K O h1 8
  have cb5 := CauchyBinet2.cb_nonneg K O x (Zs K x) (Zs K (Zs K (c1v K x))) (Zs K (Zs K (pv2 K x))) (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => O.mul_nonneg _ _ (sg8 K O x hb hT hD i w) (sg9 K O x hb hT hD i w)))
  have cn5 := SU2CharExp.cN_nn K O h1 8
  have cb6 := CauchyBinet2.cb_nonneg K O (fun i => x (i + 1)) (fun i => x (i + 2)) (fun i => x (i + 1)) (fun i => x (i + 2)) (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => A1.prod_np K O _ _ (A1.nn_neg K O _ (sg10 K O x hb hT hD i w)) (A1.nn_neg K O _ (sg10 K O x hb hT hD i w))))
  have cn6 := SU2CharExp.cN_nn K O h1 4
  have tot := (A1.nn_add K O _ _ (A1.pos_mul K O _ _ cn0 cb0) (A1.nn_add K O _ _ (A1.pos_mul K O _ _ cn1 cb1) (A1.nn_add K O _ _ (A1.pos_mul K O _ _ cn2 cb2) (A1.nn_add K O _ _ (A1.pos_mul K O _ _ cn3 cb3) (A1.nn_add K O _ _ (A1.pos_mul K O _ _ cn4 cb4) (A1.nn_add K O _ _ (A1.pos_mul K O _ _ cn5 cb5) (A1.nn_add K O _ _ (A1.pos_mul K O _ _ cn6 cb6) (O.le_refl K.zero))))))))
  have id := ident K x (M + 1 + 1) hxz
  apply A1.le_of_sub_nn K O
  rw [A1C.cgc_ip K X (M + 1) 2 hX (pv2 K (co K X)) (psi2 K X) 8]
  rw [A1C.cgc_ip K X (M + 1) 3 hX (pv3 K (co K X)) (psi3 K X) 8]
  rw [A1C.cgc_ip K X (M + 1) 4 hX (pv4 K (co K X)) (psi4 K X) 8]
  show O.le K.zero _
  rw [id]; exact tot

end final

end GenA2

#print axioms GenA2.ident
#print axioms GenA2.prod_lc

ym/GenA3.lean

lean_all/ym/GenA3.lean

/-
  ym/GenA3 — T45, G54: generated c-level identity for (A) at n = 3 (cert/A/gen/gen_ident.py).
  Lean 4 core only, no axioms.
-/
import ym.AVs
import ym.RingZ
import ym.A2

set_option linter.unusedSectionVars false

namespace GenA3

open YMChain QBinom CgWindow A1Ip A2Ip MigdalCone HeatPair

variable {R : Type} (K : DetChain.CRing R)

def pv1 (x : Nat → R) : Nat → R
  | 0 => (x 1)
  | d + 1 => (K.add (x d) (x (d + 2)))

def pv2 (x : Nat → R) : Nat → R
  | 0 => (x 2)
  | 1 => (K.add (x 1) (x 3))
  | d + 2 => (K.add (K.add (x d) (x (d + 2))) (x (d + 4)))

def pv3 (x : Nat → R) : Nat → R
  | 0 => (x 3)
  | 1 => (K.add (x 2) (x 4))
  | 2 => (K.add (K.add (x 1) (x 3)) (x 5))
  | d + 3 => (K.add (K.add (K.add (x d) (x (d + 2))) (x (d + 4))) (x (d + 6)))

def pv4 (x : Nat → R) : Nat → R
  | 0 => (x 4)
  | 1 => (K.add (x 3) (x 5))
  | 2 => (K.add (K.add (x 2) (x 4)) (x 6))
  | 3 => (K.add (K.add (K.add (x 1) (x 3)) (x 5)) (x 7))
  | d + 4 => (K.add (K.add (K.add (K.add (x d) (x (d + 2))) (x (d + 4))) (x (d + 6))) (x (d + 8)))

def pv5 (x : Nat → R) : Nat → R
  | 0 => (x 5)
  | 1 => (K.add (x 4) (x 6))
  | 2 => (K.add (K.add (x 3) (x 5)) (x 7))
  | 3 => (K.add (K.add (K.add (x 2) (x 4)) (x 6)) (x 8))
  | 4 => (K.add (K.add (K.add (K.add (x 1) (x 3)) (x 5)) (x 7)) (x 9))
  | d + 5 => (K.add (K.add (K.add (K.add (K.add (x d) (x (d + 2))) (x (d + 4))) (x (d + 6))) (x (d + 8))) (x (d + 10)))

theorem psi1 (X : List R) : ∀ j, CgWindow.Psi K X j 1 = pv1 K (HeatPair.co K X) j
  | 0 => by
    have := CgWindow.Psi_lo K X 0 1; rw [show 0 + 1 = 1 from rfl] at this; rw [this]
    show (K.add K.zero (HeatPair.co K X 1)) = (HeatPair.co K X 1)
    lib_ring
  | d + 1 => by
    have := CgWindow.Psi_hi K X 1 d; rw [show 1 + d = d + 1 by lib_nat] at this; rw [this]
    show (K.add (K.add K.zero (HeatPair.co K X (d + 2 * 0))) (HeatPair.co K X (d + 2 * 1))) = (K.add (HeatPair.co K X d) (HeatPair.co K X (d + 2)))
    rw [show d + 2 * 0 = d by lib_nat, show d + 2 * 1 = d + 2 by lib_nat]; lib_ring

theorem psi2 (X : List R) : ∀ j, CgWindow.Psi K X j 2 = pv2 K (HeatPair.co K X) j
  | 0 => by
    have := CgWindow.Psi_lo K X 0 2; rw [show 0 + 2 = 2 from rfl] at this; rw [this]
    show (K.add K.zero (HeatPair.co K X 2)) = (HeatPair.co K X 2)
    lib_ring
  | 1 => by
    have := CgWindow.Psi_lo K X 1 1; rw [show 1 + 1 = 2 from rfl] at this; rw [this]
    show (K.add (K.add K.zero (HeatPair.co K X 1)) (HeatPair.co K X 3)) = (K.add (HeatPair.co K X 1) (HeatPair.co K X 3))
    lib_ring
  | d + 2 => by
    have := CgWindow.Psi_hi K X 2 d; rw [show 2 + d = d + 2 by lib_nat] at this; rw [this]
    show (K.add (K.add (K.add K.zero (HeatPair.co K X (d + 2 * 0))) (HeatPair.co K X (d + 2 * 1))) (HeatPair.co K X (d + 2 * 2))) = (K.add (K.add (HeatPair.co K X d) (HeatPair.co K X (d + 2))) (HeatPair.co K X (d + 4)))
    rw [show d + 2 * 0 = d by lib_nat, show d + 2 * 1 = d + 2 by lib_nat, show d + 2 * 2 = d + 4 by lib_nat]; lib_ring

theorem psi3 (X : List R) : ∀ j, CgWindow.Psi K X j 3 = pv3 K (HeatPair.co K X) j
  | 0 => by
    have := CgWindow.Psi_lo K X 0 3; rw [show 0 + 3 = 3 from rfl] at this; rw [this]
    show (K.add K.zero (HeatPair.co K X 3)) = (HeatPair.co K X 3)
    lib_ring
  | 1 => by
    have := CgWindow.Psi_lo K X 1 2; rw [show 1 + 2 = 3 from rfl] at this; rw [this]
    show (K.add (K.add K.zero (HeatPair.co K X 2)) (HeatPair.co K X 4)) = (K.add (HeatPair.co K X 2) (HeatPair.co K X 4))
    lib_ring
  | 2 => by
    have := CgWindow.Psi_lo K X 2 1; rw [show 2 + 1 = 3 from rfl] at this; rw [this]
    show (K.add (K.add (K.add K.zero (HeatPair.co K X 1)) (HeatPair.co K X 3)) (HeatPair.co K X 5)) = (K.add (K.add (HeatPair.co K X 1) (HeatPair.co K X 3)) (HeatPair.co K X 5))
    lib_ring
  | d + 3 => by
    have := CgWindow.Psi_hi K X 3 d; rw [show 3 + d = d + 3 by lib_nat] at this; rw [this]
    show (K.add (K.add (K.add (K.add K.zero (HeatPair.co K X (d + 2 * 0))) (HeatPair.co K X (d + 2 * 1))) (HeatPair.co K X (d + 2 * 2))) (HeatPair.co K X (d + 2 * 3))) = (K.add (K.add (K.add (HeatPair.co K X d) (HeatPair.co K X (d + 2))) (HeatPair.co K X (d + 4))) (HeatPair.co K X (d + 6)))
    rw [show d + 2 * 0 = d by lib_nat, show d + 2 * 1 = d + 2 by lib_nat, show d + 2 * 2 = d + 4 by lib_nat, show d + 2 * 3 = d + 6 by lib_nat]; lib_ring

theorem psi4 (X : List R) : ∀ j, CgWindow.Psi K X j 4 = pv4 K (HeatPair.co K X) j
  | 0 => by
    have := CgWindow.Psi_lo K X 0 4; rw [show 0 + 4 = 4 from rfl] at this; rw [this]
    show (K.add K.zero (HeatPair.co K X 4)) = (HeatPair.co K X 4)
    lib_ring
  | 1 => by
    have := CgWindow.Psi_lo K X 1 3; rw [show 1 + 3 = 4 from rfl] at this; rw [this]
    show (K.add (K.add K.zero (HeatPair.co K X 3)) (HeatPair.co K X 5)) = (K.add (HeatPair.co K X 3) (HeatPair.co K X 5))
    lib_ring
  | 2 => by
    have := CgWindow.Psi_lo K X 2 2; rw [show 2 + 2 = 4 from rfl] at this; rw [this]
    show (K.add (K.add (K.add K.zero (HeatPair.co K X 2)) (HeatPair.co K X 4)) (HeatPair.co K X 6)) = (K.add (K.add (HeatPair.co K X 2) (HeatPair.co K X 4)) (HeatPair.co K X 6))
    lib_ring
  | 3 => by
    have := CgWindow.Psi_lo K X 3 1; rw [show 3 + 1 = 4 from rfl] at this; rw [this]
    show (K.add (K.add (K.add (K.add K.zero (HeatPair.co K X 1)) (HeatPair.co K X 3)) (HeatPair.co K X 5)) (HeatPair.co K X 7)) = (K.add (K.add (K.add (HeatPair.co K X 1) (HeatPair.co K X 3)) (HeatPair.co K X 5)) (HeatPair.co K X 7))
    lib_ring
  | d + 4 => by
    have := CgWindow.Psi_hi K X 4 d; rw [show 4 + d = d + 4 by lib_nat] at this; rw [this]
    show (K.add (K.add (K.add (K.add (K.add K.zero (HeatPair.co K X (d + 2 * 0))) (HeatPair.co K X (d + 2 * 1))) (HeatPair.co K X (d + 2 * 2))) (HeatPair.co K X (d + 2 * 3))) (HeatPair.co K X (d + 2 * 4))) = (K.add (K.add (K.add (K.add (HeatPair.co K X d) (HeatPair.co K X (d + 2))) (HeatPair.co K X (d + 4))) (HeatPair.co K X (d + 6))) (HeatPair.co K X (d + 8)))
    rw [show d + 2 * 0 = d by lib_nat, show d + 2 * 1 = d + 2 by lib_nat, show d + 2 * 2 = d + 4 by lib_nat, show d + 2 * 3 = d + 6 by lib_nat, show d + 2 * 4 = d + 8 by lib_nat]; lib_ring

theorem psi5 (X : List R) : ∀ j, CgWindow.Psi K X j 5 = pv5 K (HeatPair.co K X) j
  | 0 => by
    have := CgWindow.Psi_lo K X 0 5; rw [show 0 + 5 = 5 from rfl] at this; rw [this]
    show (K.add K.zero (HeatPair.co K X 5)) = (HeatPair.co K X 5)
    lib_ring
  | 1 => by
    have := CgWindow.Psi_lo K X 1 4; rw [show 1 + 4 = 5 from rfl] at this; rw [this]
    show (K.add (K.add K.zero (HeatPair.co K X 4)) (HeatPair.co K X 6)) = (K.add (HeatPair.co K X 4) (HeatPair.co K X 6))
    lib_ring
  | 2 => by
    have := CgWindow.Psi_lo K X 2 3; rw [show 2 + 3 = 5 from rfl] at this; rw [this]
    show (K.add (K.add (K.add K.zero (HeatPair.co K X 3)) (HeatPair.co K X 5)) (HeatPair.co K X 7)) = (K.add (K.add (HeatPair.co K X 3) (HeatPair.co K X 5)) (HeatPair.co K X 7))
    lib_ring
  | 3 => by
    have := CgWindow.Psi_lo K X 3 2; rw [show 3 + 2 = 5 from rfl] at this; rw [this]
    show (K.add (K.add (K.add (K.add K.zero (HeatPair.co K X 2)) (HeatPair.co K X 4)) (HeatPair.co K X 6)) (HeatPair.co K X 8)) = (K.add (K.add (K.add (HeatPair.co K X 2) (HeatPair.co K X 4)) (HeatPair.co K X 6)) (HeatPair.co K X 8))
    lib_ring
  | 4 => by
    have := CgWindow.Psi_lo K X 4 1; rw [show 4 + 1 = 5 from rfl] at this; rw [this]
    show (K.add (K.add (K.add (K.add (K.add K.zero (HeatPair.co K X 1)) (HeatPair.co K X 3)) (HeatPair.co K X 5)) (HeatPair.co K X 7)) (HeatPair.co K X 9)) = (K.add (K.add (K.add (K.add (HeatPair.co K X 1) (HeatPair.co K X 3)) (HeatPair.co K X 5)) (HeatPair.co K X 7)) (HeatPair.co K X 9))
    lib_ring
  | d + 5 => by
    have := CgWindow.Psi_hi K X 5 d; rw [show 5 + d = d + 5 by lib_nat] at this; rw [this]
    show (K.add (K.add (K.add (K.add (K.add (K.add K.zero (HeatPair.co K X (d + 2 * 0))) (HeatPair.co K X (d + 2 * 1))) (HeatPair.co K X (d + 2 * 2))) (HeatPair.co K X (d + 2 * 3))) (HeatPair.co K X (d + 2 * 4))) (HeatPair.co K X (d + 2 * 5))) = (K.add (K.add (K.add (K.add (K.add (HeatPair.co K X d) (HeatPair.co K X (d + 2))) (HeatPair.co K X (d + 4))) (HeatPair.co K X (d + 6))) (HeatPair.co K X (  -- (+36 chars; full line in the Zenodo source)
    rw [show d + 2 * 0 = d by lib_nat, show d + 2 * 1 = d + 2 by lib_nat, show d + 2 * 2 = d + 4 by lib_nat, show d + 2 * 3 = d + 6 by lib_nat, show d + 2 * 4 = d + 8 by lib_nat, show d + 2 * 5 = d + 10 by lib_nat]; lib_ring

section ident

variable (x : Nat → R) (L : Nat) (hz : ∀ t, L ≤ t → x t = K.zero)

include hz in
theorem ip0 : ip K (Zs K (Zs K (Zs K x))) (fun i => x (i + 1)) (L + 8) = (K.add (K.add (K.add (Rk K x L 4) (K.neg K.zero)) K.zero) K.zero) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 5 + 1) = _; rw [ip_z1]
  show ip K x (fun i => x (i + 4)) (L + 5) = _
  rw [ip_ext K _ (AVs.vsum K x [0]) _ (AVs.vsum K x [4]) (fun i => by show (x (i + 0)) = (K.add (x (i + 0)) K.zero); lib_ring) (fun i => by show (x (i + 4)) = (K.add (x (i + 4)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [0] [4]) = _; rfl

include hz in
theorem ip1 : ip K (Zs K (Zs K x)) (fun i => x (i + 2)) (L + 8) = (K.add (K.add (K.add (Rk K x L 4) (K.neg K.zero)) K.zero) K.zero) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_z1]
  show ip K x (fun i => x (i + 4)) (L + 6) = _
  rw [ip_ext K _ (AVs.vsum K x [0]) _ (AVs.vsum K x [4]) (fun i => by show (x (i + 0)) = (K.add (x (i + 0)) K.zero); lib_ring) (fun i => by show (x (i + 4)) = (K.add (x (i + 4)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [0] [4]) = _; rfl

include hz in
theorem ip2 : ip K (Zs K (Zs K (Zs K x))) (fun i => x (i + 2)) (L + 8) = (K.add (K.add (K.add (Rk K x L 5) (K.neg K.zero)) K.zero) K.zero) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 5 + 1) = _; rw [ip_z1]
  show ip K x (fun i => x (i + 5)) (L + 5) = _
  rw [ip_ext K _ (AVs.vsum K x [0]) _ (AVs.vsum K x [5]) (fun i => by show (x (i + 0)) = (K.add (x (i + 0)) K.zero); lib_ring) (fun i => by show (x (i + 5)) = (K.add (x (i + 5)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [0] [5]) = _; rfl

include hz in
theorem ip3 : ip K (Zs K (Zs K x)) (fun i => x (i + 1)) (L + 8) = (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) K.zero) K.zero) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_z1]
  show ip K x (fun i => x (i + 3)) (L + 6) = _
  rw [ip_ext K _ (AVs.vsum K x [0]) _ (AVs.vsum K x [3]) (fun i => by show (x (i + 0)) = (K.add (x (i + 0)) K.zero); lib_ring) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [0] [3]) = _; rfl

include hz in
theorem ip4 : ip K (Zs K (Zs K (Zs K x))) x (L + 8) = (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) K.zero) K.zero) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 6 + 1) = _; rw [ip_z1]
  show ip K _ _ (L + 5 + 1) = _; rw [ip_z1]
  show ip K x (fun i => x (i + 3)) (L + 5) = _
  rw [ip_ext K _ (AVs.vsum K x [0]) _ (AVs.vsum K x [3]) (fun i => by show (x (i + 0)) = (K.add (x (i + 0)) K.zero); lib_ring) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [0] [3]) = _; rfl

include hz in
theorem ip5 : ip K (fun i => x (i + 3)) (fun i => x (i + 2)) (L + 8) = (K.add (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))))) K.zero) K.zero) := by
  show ip K (fun i => x (i + 3)) (fun i => x (i + 2)) (L + 8) = _
  rw [ip_ext K _ (AVs.vsum K x [3]) _ (AVs.vsum K x [2]) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [3] [2]) = _; rfl

include hz in
theorem ip6 : ip K (fun i => x (i + 3)) x (L + 8) = (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) K.zero) K.zero) := by
  show ip K (fun i => x (i + 3)) x (L + 8) = _
  rw [ip_ext K _ (AVs.vsum K x [3]) _ (AVs.vsum K x [0]) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring) (fun i => by show (x (i + 0)) = (K.add (x (i + 0)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [3] [0]) = _; rfl

include hz in
theorem ip7 : ip K (Zs K (c1v K x)) (fun i => x (i + 2)) (L + 8) = (K.add (K.mul (K.add K.zero (x 1)) (x 3)) (K.add (K.add (K.add (Rk K x L 4) (K.neg K.zero)) K.zero) (K.add (K.add (K.add (Rk K x L 2) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 2))) (K.mul (x 1) (x 3))))) K.zero) K.zero))) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K (c1v K x) (fun i => x (i + 3)) (L + 7) = _
  rw [show L + 7 = L + 6 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [0, 2]) _ (AVs.vsum K x [4]) (fun i => by show (K.add (x (i + 0)) (x (i + 2))) = (K.add (x (i + 0)) (K.add (x (i + 2)) K.zero)); lib_ring) (fun i => by show (x (i + 4)) = (K.add (x (i + 4)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (K.add K.zero (x 1)) (x 3)) (AVs.psum K x L [0, 2] [4])) = _; rfl

include hz in
theorem ip8 : ip K (Zs K (c1v K x)) (fun i => x (i + 1)) (L + 8) = (K.add (K.mul (K.add K.zero (x 1)) (x 2)) (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) K.zero) (K.add (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))))) K.zero) K.zero))) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K (c1v K x) (fun i => x (i + 2)) (L + 7) = _
  rw [show L + 7 = L + 6 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [0, 2]) _ (AVs.vsum K x [3]) (fun i => by show (K.add (x (i + 0)) (x (i + 2))) = (K.add (x (i + 0)) (K.add (x (i + 2)) K.zero)); lib_ring) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (K.add K.zero (x 1)) (x 2)) (AVs.psum K x L [0, 2] [3])) = _; rfl

include hz in
theorem ip9 : ip K (pv2 K x) (fun i => x (i + 2)) (L + 8) = (K.add (K.mul (x 2) (x 2)) (K.add (K.mul (K.add (x 1) (x 3)) (x 3)) (K.add (K.add (K.add (Rk K x L 4) (K.neg K.zero)) K.zero) (K.add (K.add (K.add (Rk K x L 2) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 2))) (K.mul (x 1) (x 3))))) K.zero) (K.add (K.add (K.add (Rk K x L 0) (K.neg (K.add (K.add (K.add (K.add K.zero (K.mul (x 0) (x 0))) (K.  -- (+87 chars; full line in the Zenodo source)
  show ip K (pv2 K x) (fun i => x (i + 2)) (L + 8) = _
  rw [show L + 8 = L + 6 + 1 + 1 from rfl, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [0, 2, 4]) _ (AVs.vsum K x [4]) (fun i => by show (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) K.zero))); lib_ring) (fun i => by show (x (i + 4)) = (K.add (x (i + 4)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 2) (x 2)) (K.add (K.mul (K.add (x 1) (x 3)) (x 3)) (AVs.psum K x L [0, 2, 4] [4]))) = _; rfl

include hz in
theorem ip10 : ip K (pv2 K x) (fun i => x (i + 1)) (L + 8) = (K.add (K.mul (x 2) (x 1)) (K.add (K.mul (K.add (x 1) (x 3)) (x 2)) (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) K.zero) (K.add (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))))) K.zero) (K.add (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x  -- (+60 chars; full line in the Zenodo source)
  show ip K (pv2 K x) (fun i => x (i + 1)) (L + 8) = _
  rw [show L + 8 = L + 6 + 1 + 1 from rfl, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [0, 2, 4]) _ (AVs.vsum K x [3]) (fun i => by show (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) K.zero))); lib_ring) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 2) (x 1)) (K.add (K.mul (K.add (x 1) (x 3)) (x 2)) (AVs.psum K x L [0, 2, 4] [3]))) = _; rfl

include hz in
theorem ip11 : ip K (Zs K x) (Zs K (pv4 K x)) (L + 8) = (K.add (K.mul (x 0) (x 4)) (K.add (K.mul (x 1) (K.add (x 3) (x 5))) (K.add (K.mul (x 2) (K.add (K.add (x 2) (x 4)) (x 6))) (K.add (K.mul (x 3) (K.add (K.add (K.add (x 1) (x 3)) (x 5)) (x 7))) (K.add (K.add (K.add (Rk K x L 4) (K.neg K.zero)) (K.add (K.add (Rk K x L 2) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 2))) (K.mul (x 1) (x 3))))) (K.  -- (+491 chars; full line in the Zenodo source)
  show ip K _ _ (L + 7 + 1) = _; rw [ip_zz]
  show ip K x (pv4 K x) (L + 7) = _
  rw [show L + 7 = L + 3 + 1 + 1 + 1 + 1 from rfl, ip_head, ip_head, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [4]) _ (AVs.vsum K x [0, 2, 4, 6, 8]) (fun i => by show (x (i + 4)) = (K.add (x (i + 4)) K.zero); lib_ring) (fun i => by show (K.add (K.add (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) (x (i + 6))) (x (i + 8))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) (K.add (x (i + 6)) (K.add (x (i + 8)) K.zero))))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 0) (x 4)) (K.add (K.mul (x 1) (K.add (x 3) (x 5))) (K.add (K.mul (x 2) (K.add (K.add (x 2) (x 4)) (x 6))) (K.add (K.mul (x 3) (K.add (K.add (K.add (x 1) (x 3)) (x 5)) (x 7))) (AVs.psum K x L [4] [0, 2, 4, 6, 8]))))) = _; rfl

include hz in
theorem ip12 : ip K x (Zs K (pv3 K x)) (L + 8) = (K.add (K.mul (x 1) (x 3)) (K.add (K.mul (x 2) (K.add (x 2) (x 4))) (K.add (K.mul (x 3) (K.add (K.add (x 1) (x 3)) (x 5))) (K.add (K.add (K.add (Rk K x L 4) (K.neg K.zero)) (K.add (K.add (Rk K x L 2) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 2))) (K.mul (x 1) (x 3))))) (K.add (K.add (Rk K x L 0) (K.neg (K.add (K.add (K.add (K.add K.zero (K.mul (x   -- (+258 chars; full line in the Zenodo source)
  show ip K _ _ (L + 7 + 1) = _; rw [ip_1z]
  show ip K (fun i => x (i + 1)) (pv3 K x) (L + 7) = _
  rw [show L + 7 = L + 4 + 1 + 1 + 1 from rfl, ip_head, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [4]) _ (AVs.vsum K x [0, 2, 4, 6]) (fun i => by show (x (i + 4)) = (K.add (x (i + 4)) K.zero); lib_ring) (fun i => by show (K.add (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) (x (i + 6))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) (K.add (x (i + 6)) K.zero)))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 1) (x 3)) (K.add (K.mul (x 2) (K.add (x 2) (x 4))) (K.add (K.mul (x 3) (K.add (K.add (x 1) (x 3)) (x 5))) (AVs.psum K x L [4] [0, 2, 4, 6])))) = _; rfl

include hz in
theorem ip13 : ip K (Zs K x) (Zs K (pv3 K x)) (L + 8) = (K.add (K.mul (x 0) (x 3)) (K.add (K.mul (x 1) (K.add (x 2) (x 4))) (K.add (K.mul (x 2) (K.add (K.add (x 1) (x 3)) (x 5))) (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))))) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add (K.add K.zero (K.mul (x   -- (+209 chars; full line in the Zenodo source)
  show ip K _ _ (L + 7 + 1) = _; rw [ip_zz]
  show ip K x (pv3 K x) (L + 7) = _
  rw [show L + 7 = L + 4 + 1 + 1 + 1 from rfl, ip_head, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [3]) _ (AVs.vsum K x [0, 2, 4, 6]) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring) (fun i => by show (K.add (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) (x (i + 6))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) (K.add (x (i + 6)) K.zero)))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 0) (x 3)) (K.add (K.mul (x 1) (K.add (x 2) (x 4))) (K.add (K.mul (x 2) (K.add (K.add (x 1) (x 3)) (x 5))) (AVs.psum K x L [3] [0, 2, 4, 6])))) = _; rfl

include hz in
theorem ip14 : ip K x (Zs K (pv4 K x)) (L + 8) = (K.add (K.mul (x 1) (x 4)) (K.add (K.mul (x 2) (K.add (x 3) (x 5))) (K.add (K.mul (x 3) (K.add (K.add (x 2) (x 4)) (x 6))) (K.add (K.mul (x 4) (K.add (K.add (K.add (x 1) (x 3)) (x 5)) (x 7))) (K.add (K.add (K.add (Rk K x L 5) (K.neg K.zero)) (K.add (K.add (Rk K x L 3) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 3))) (K.mul (x 1) (x 4))))) (K.add (K.  -- (+540 chars; full line in the Zenodo source)
  show ip K _ _ (L + 7 + 1) = _; rw [ip_1z]
  show ip K (fun i => x (i + 1)) (pv4 K x) (L + 7) = _
  rw [show L + 7 = L + 3 + 1 + 1 + 1 + 1 from rfl, ip_head, ip_head, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [5]) _ (AVs.vsum K x [0, 2, 4, 6, 8]) (fun i => by show (x (i + 5)) = (K.add (x (i + 5)) K.zero); lib_ring) (fun i => by show (K.add (K.add (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) (x (i + 6))) (x (i + 8))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) (K.add (x (i + 6)) (K.add (x (i + 8)) K.zero))))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 1) (x 4)) (K.add (K.mul (x 2) (K.add (x 3) (x 5))) (K.add (K.mul (x 3) (K.add (K.add (x 2) (x 4)) (x 6))) (K.add (K.mul (x 4) (K.add (K.add (K.add (x 1) (x 3)) (x 5)) (x 7))) (AVs.psum K x L [5] [0, 2, 4, 6, 8]))))) = _; rfl

include hz in
theorem ip15 : ip K (Zs K x) (fun i => x (i + 3)) (L + 8) = (K.add (K.add (K.add (Rk K x L 4) (K.neg K.zero)) K.zero) K.zero) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K x (fun i => x (i + 4)) (L + 7) = _
  rw [ip_ext K _ (AVs.vsum K x [0]) _ (AVs.vsum K x [4]) (fun i => by show (x (i + 0)) = (K.add (x (i + 0)) K.zero); lib_ring) (fun i => by show (x (i + 4)) = (K.add (x (i + 4)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [0] [4]) = _; rfl

include hz in
theorem ip16 : ip K (Zs K x) (fun i => x (i + 2)) (L + 8) = (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) K.zero) K.zero) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K x (fun i => x (i + 3)) (L + 7) = _
  rw [ip_ext K _ (AVs.vsum K x [0]) _ (AVs.vsum K x [3]) (fun i => by show (x (i + 0)) = (K.add (x (i + 0)) K.zero); lib_ring) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [0] [3]) = _; rfl

include hz in
theorem ip17 : ip K (Zs K (c1v K x)) (fun i => x (i + 3)) (L + 8) = (K.add (K.mul (K.add K.zero (x 1)) (x 4)) (K.add (K.add (K.add (Rk K x L 5) (K.neg K.zero)) K.zero) (K.add (K.add (K.add (Rk K x L 3) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 3))) (K.mul (x 1) (x 4))))) K.zero) K.zero))) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_z1]
  show ip K (c1v K x) (fun i => x (i + 4)) (L + 7) = _
  rw [show L + 7 = L + 6 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [0, 2]) _ (AVs.vsum K x [5]) (fun i => by show (K.add (x (i + 0)) (x (i + 2))) = (K.add (x (i + 0)) (K.add (x (i + 2)) K.zero)); lib_ring) (fun i => by show (x (i + 5)) = (K.add (x (i + 5)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (K.add K.zero (x 1)) (x 4)) (AVs.psum K x L [0, 2] [5])) = _; rfl

include hz in
theorem ip18 : ip K (fun i => x (i + 1)) (Zs K (pv2 K x)) (L + 8) = (K.add (K.mul (x 2) (x 2)) (K.add (K.mul (x 3) (K.add (x 1) (x 3))) (K.add (K.add (K.add (Rk K x L 4) (K.neg K.zero)) (K.add (K.add (Rk K x L 2) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 2))) (K.mul (x 1) (x 3))))) (K.add (K.add (Rk K x L 0) (K.neg (K.add (K.add (K.add (K.add K.zero (K.mul (x 0) (x 0))) (K.mul (x 1) (x 1))) (K.m  -- (+65 chars; full line in the Zenodo source)
  show ip K _ _ (L + 7 + 1) = _; rw [ip_1z]
  show ip K (fun i => x (i + 2)) (pv2 K x) (L + 7) = _
  rw [show L + 7 = L + 5 + 1 + 1 from rfl, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [4]) _ (AVs.vsum K x [0, 2, 4]) (fun i => by show (x (i + 4)) = (K.add (x (i + 4)) K.zero); lib_ring) (fun i => by show (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) K.zero))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 2) (x 2)) (K.add (K.mul (x 3) (K.add (x 1) (x 3))) (AVs.psum K x L [4] [0, 2, 4]))) = _; rfl

include hz in
theorem ip19 : ip K x (Zs K (pv2 K x)) (L + 8) = (K.add (K.mul (x 1) (x 2)) (K.add (K.mul (x 2) (K.add (x 1) (x 3))) (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))))) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))) (K.mul (x 2) (x 3))))) K.zero)  -- (+18 chars; full line in the Zenodo source)
  show ip K _ _ (L + 7 + 1) = _; rw [ip_1z]
  show ip K (fun i => x (i + 1)) (pv2 K x) (L + 7) = _
  rw [show L + 7 = L + 5 + 1 + 1 from rfl, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [3]) _ (AVs.vsum K x [0, 2, 4]) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring) (fun i => by show (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) K.zero))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 1) (x 2)) (K.add (K.mul (x 2) (K.add (x 1) (x 3))) (AVs.psum K x L [3] [0, 2, 4]))) = _; rfl

include hz in
theorem ip20 : ip K (fun i => x (i + 1)) (Zs K (pv3 K x)) (L + 8) = (K.add (K.mul (x 2) (x 3)) (K.add (K.mul (x 3) (K.add (x 2) (x 4))) (K.add (K.mul (x 4) (K.add (K.add (x 1) (x 3)) (x 5))) (K.add (K.add (K.add (Rk K x L 5) (K.neg K.zero)) (K.add (K.add (Rk K x L 3) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 3))) (K.mul (x 1) (x 4))))) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add (K.add (K.ad  -- (+305 chars; full line in the Zenodo source)
  show ip K _ _ (L + 7 + 1) = _; rw [ip_1z]
  show ip K (fun i => x (i + 2)) (pv3 K x) (L + 7) = _
  rw [show L + 7 = L + 4 + 1 + 1 + 1 from rfl, ip_head, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [5]) _ (AVs.vsum K x [0, 2, 4, 6]) (fun i => by show (x (i + 5)) = (K.add (x (i + 5)) K.zero); lib_ring) (fun i => by show (K.add (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) (x (i + 6))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) (K.add (x (i + 6)) K.zero)))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 2) (x 3)) (K.add (K.mul (x 3) (K.add (x 2) (x 4))) (K.add (K.mul (x 4) (K.add (K.add (x 1) (x 3)) (x 5))) (AVs.psum K x L [5] [0, 2, 4, 6])))) = _; rfl

include hz in
theorem ip21 : ip K (fun i => x (i + 1)) (pv3 K x) (L + 8) = (K.add (K.mul (x 1) (x 3)) (K.add (K.mul (x 2) (K.add (x 2) (x 4))) (K.add (K.mul (x 3) (K.add (K.add (x 1) (x 3)) (x 5))) (K.add (K.add (K.add (Rk K x L 4) (K.neg K.zero)) (K.add (K.add (Rk K x L 2) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 2))) (K.mul (x 1) (x 3))))) (K.add (K.add (Rk K x L 0) (K.neg (K.add (K.add (K.add (K.add K.zer  -- (+270 chars; full line in the Zenodo source)
  show ip K (fun i => x (i + 1)) (pv3 K x) (L + 8) = _
  rw [show L + 8 = L + 5 + 1 + 1 + 1 from rfl, ip_head, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [4]) _ (AVs.vsum K x [0, 2, 4, 6]) (fun i => by show (x (i + 4)) = (K.add (x (i + 4)) K.zero); lib_ring) (fun i => by show (K.add (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) (x (i + 6))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) (K.add (x (i + 6)) K.zero)))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 1) (x 3)) (K.add (K.mul (x 2) (K.add (x 2) (x 4))) (K.add (K.mul (x 3) (K.add (K.add (x 1) (x 3)) (x 5))) (AVs.psum K x L [4] [0, 2, 4, 6])))) = _; rfl

include hz in
theorem ip22 : ip K x (pv3 K x) (L + 8) = (K.add (K.mul (x 0) (x 3)) (K.add (K.mul (x 1) (K.add (x 2) (x 4))) (K.add (K.mul (x 2) (K.add (K.add (x 1) (x 3)) (x 5))) (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))))) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.  -- (+195 chars; full line in the Zenodo source)
  show ip K x (pv3 K x) (L + 8) = _
  rw [show L + 8 = L + 5 + 1 + 1 + 1 from rfl, ip_head, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [3]) _ (AVs.vsum K x [0, 2, 4, 6]) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring) (fun i => by show (K.add (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) (x (i + 6))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) (K.add (x (i + 6)) K.zero)))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 0) (x 3)) (K.add (K.mul (x 1) (K.add (x 2) (x 4))) (K.add (K.mul (x 2) (K.add (K.add (x 1) (x 3)) (x 5))) (AVs.psum K x L [3] [0, 2, 4, 6])))) = _; rfl

include hz in
theorem ip23 : ip K (fun i => x (i + 1)) (fun i => x (i + 2)) (L + 8) = (K.add (K.add (K.add (Rk K x L 1) (K.neg (K.add K.zero (K.mul (x 0) (x 1))))) K.zero) K.zero) := by
  show ip K (fun i => x (i + 1)) (fun i => x (i + 2)) (L + 8) = _
  rw [ip_ext K _ (AVs.vsum K x [1]) _ (AVs.vsum K x [2]) (fun i => by show (x (i + 1)) = (K.add (x (i + 1)) K.zero); lib_ring) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [1] [2]) = _; rfl

include hz in
theorem ip24 : ip K (fun i => x (i + 2)) (fun i => x (i + 3)) (L + 8) = (K.add (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))))) K.zero) K.zero) := by
  show ip K (fun i => x (i + 2)) (fun i => x (i + 3)) (L + 8) = _
  rw [ip_ext K _ (AVs.vsum K x [2]) _ (AVs.vsum K x [3]) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [2] [3]) = _; rfl

include hz in
theorem ip25 : ip K (fun i => x (i + 1)) (fun i => x (i + 3)) (L + 8) = (K.add (K.add (K.add (Rk K x L 2) (K.neg (K.add K.zero (K.mul (x 0) (x 2))))) K.zero) K.zero) := by
  show ip K (fun i => x (i + 1)) (fun i => x (i + 3)) (L + 8) = _
  rw [ip_ext K _ (AVs.vsum K x [1]) _ (AVs.vsum K x [3]) (fun i => by show (x (i + 1)) = (K.add (x (i + 1)) K.zero); lib_ring) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [1] [3]) = _; rfl

include hz in
theorem ip26 : ip K (fun i => x (i + 2)) (fun i => x (i + 2)) (L + 8) = (K.add (K.add (K.add (Rk K x L 0) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 0))) (K.mul (x 1) (x 1))))) K.zero) K.zero) := by
  show ip K (fun i => x (i + 2)) (fun i => x (i + 2)) (L + 8) = _
  rw [ip_ext K _ (AVs.vsum K x [2]) _ (AVs.vsum K x [2]) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring), AVs.ip_vsum K x L hz]
  show (AVs.psum K x L [2] [2]) = _; rfl

include hz in
theorem ip27 : ip K (fun i => x (i + 1)) (pv1 K (fun i => x (i + 1))) (L + 8) = (K.add (K.mul (x 1) (x 2)) (K.add (K.add (K.add (Rk K x L 1) (K.neg (K.add K.zero (K.mul (x 0) (x 1))))) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))))) K.zero)) K.zero)) := by
  show ip K (fun i => x (i + 1)) (pv1 K (fun i => x (i + 1))) (L + 8) = _
  rw [show L + 8 = L + 7 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [2]) _ (AVs.vsum K x [1, 3]) (fun i => by show (x (i + 2)) = (K.add (x (i + 2)) K.zero); lib_ring) (fun i => by show (K.add (x (i + 1)) (x (i + 3))) = (K.add (x (i + 1)) (K.add (x (i + 3)) K.zero)); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 1) (x 2)) (AVs.psum K x L [2] [1, 3])) = _; rfl

include hz in
theorem ip28 : ip K (fun i => x (i + 2)) (pv1 K (fun i => x (i + 1))) (L + 8) = (K.add (K.mul (x 2) (x 2)) (K.add (K.add (K.add (Rk K x L 2) (K.neg (K.add K.zero (K.mul (x 0) (x 2))))) (K.add (K.add (Rk K x L 0) (K.neg (K.add (K.add (K.add K.zero (K.mul (x 0) (x 0))) (K.mul (x 1) (x 1))) (K.mul (x 2) (x 2))))) K.zero)) K.zero)) := by
  show ip K (fun i => x (i + 2)) (pv1 K (fun i => x (i + 1))) (L + 8) = _
  rw [show L + 8 = L + 7 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [3]) _ (AVs.vsum K x [1, 3]) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring) (fun i => by show (K.add (x (i + 1)) (x (i + 3))) = (K.add (x (i + 1)) (K.add (x (i + 3)) K.zero)); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 2) (x 2)) (AVs.psum K x L [3] [1, 3])) = _; rfl

include hz in
theorem ip29 : ip K (fun i => x (i + 2)) (Zs K (c1v K x)) (L + 8) = (K.add (K.mul (x 3) (K.add K.zero (x 1))) (K.add (K.add (K.add (Rk K x L 4) (K.neg K.zero)) (K.add (K.add (Rk K x L 2) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 2))) (K.mul (x 1) (x 3))))) K.zero)) K.zero)) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_1z]
  show ip K (fun i => x (i + 3)) (c1v K x) (L + 7) = _
  rw [show L + 7 = L + 6 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [4]) _ (AVs.vsum K x [0, 2]) (fun i => by show (x (i + 4)) = (K.add (x (i + 4)) K.zero); lib_ring) (fun i => by show (K.add (x (i + 0)) (x (i + 2))) = (K.add (x (i + 0)) (K.add (x (i + 2)) K.zero)); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 3) (K.add K.zero (x 1))) (AVs.psum K x L [4] [0, 2])) = _; rfl

include hz in
theorem ip30 : ip K (fun i => x (i + 1)) (Zs K (c1v K x)) (L + 8) = (K.add (K.mul (x 2) (K.add K.zero (x 1))) (K.add (K.add (K.add (Rk K x L 3) (K.neg K.zero)) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))))) K.zero)) K.zero)) := by
  show ip K _ _ (L + 7 + 1) = _; rw [ip_1z]
  show ip K (fun i => x (i + 2)) (c1v K x) (L + 7) = _
  rw [show L + 7 = L + 6 + 1 from rfl, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [3]) _ (AVs.vsum K x [0, 2]) (fun i => by show (x (i + 3)) = (K.add (x (i + 3)) K.zero); lib_ring) (fun i => by show (K.add (x (i + 0)) (x (i + 2))) = (K.add (x (i + 0)) (K.add (x (i + 2)) K.zero)); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 2) (K.add K.zero (x 1))) (AVs.psum K x L [3] [0, 2])) = _; rfl

include hz in
theorem ip31 : ip K (fun i => x (i + 2)) (Zs K (pv2 K x)) (L + 8) = (K.add (K.mul (x 3) (x 2)) (K.add (K.mul (x 4) (K.add (x 1) (x 3))) (K.add (K.add (K.add (Rk K x L 5) (K.neg K.zero)) (K.add (K.add (Rk K x L 3) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 3))) (K.mul (x 1) (x 4))))) (K.add (K.add (Rk K x L 1) (K.neg (K.add (K.add (K.add (K.add K.zero (K.mul (x 0) (x 1))) (K.mul (x 1) (x 2))) (K.m  -- (+65 chars; full line in the Zenodo source)
  show ip K _ _ (L + 7 + 1) = _; rw [ip_1z]
  show ip K (fun i => x (i + 3)) (pv2 K x) (L + 7) = _
  rw [show L + 7 = L + 5 + 1 + 1 from rfl, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [5]) _ (AVs.vsum K x [0, 2, 4]) (fun i => by show (x (i + 5)) = (K.add (x (i + 5)) K.zero); lib_ring) (fun i => by show (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) K.zero))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 3) (x 2)) (K.add (K.mul (x 4) (K.add (x 1) (x 3))) (AVs.psum K x L [5] [0, 2, 4]))) = _; rfl

include hz in
theorem ip32 : ip K x (pv4 K x) (L + 8) = (K.add (K.mul (x 0) (x 4)) (K.add (K.mul (x 1) (K.add (x 3) (x 5))) (K.add (K.mul (x 2) (K.add (K.add (x 2) (x 4)) (x 6))) (K.add (K.mul (x 3) (K.add (K.add (K.add (x 1) (x 3)) (x 5)) (x 7))) (K.add (K.add (K.add (Rk K x L 4) (K.neg K.zero)) (K.add (K.add (Rk K x L 2) (K.neg (K.add (K.add K.zero (K.mul (x 0) (x 2))) (K.mul (x 1) (x 3))))) (K.add (K.add (Rk  -- (+477 chars; full line in the Zenodo source)
  show ip K x (pv4 K x) (L + 8) = _
  rw [show L + 8 = L + 4 + 1 + 1 + 1 + 1 from rfl, ip_head, ip_head, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [4]) _ (AVs.vsum K x [0, 2, 4, 6, 8]) (fun i => by show (x (i + 4)) = (K.add (x (i + 4)) K.zero); lib_ring) (fun i => by show (K.add (K.add (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) (x (i + 6))) (x (i + 8))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) (K.add (x (i + 6)) (K.add (x (i + 8)) K.zero))))); lib_ring), AVs.ip_vsum K x L hz]
  show (K.add (K.mul (x 0) (x 4)) (K.add (K.mul (x 1) (K.add (x 3) (x 5))) (K.add (K.mul (x 2) (K.add (K.add (x 2) (x 4)) (x 6))) (K.add (K.mul (x 3) (K.add (K.add (K.add (x 1) (x 3)) (x 5)) (x 7))) (AVs.psum K x L [4] [0, 2, 4, 6, 8]))))) = _; rfl

include hz in
theorem ip33 : ip K x (pv5 K x) (L + 8) = (K.add (K.mul (x 0) (x 5)) (K.add (K.mul (x 1) (K.add (x 4) (x 6))) (K.add (K.mul (x 2) (K.add (K.add (x 3) (x 5)) (x 7))) (K.add (K.mul (x 3) (K.add (K.add (K.add (x 2) (x 4)) (x 6)) (x 8))) (K.add (K.mul (x 4) (K.add (K.add (K.add (K.add (x 1) (x 3)) (x 5)) (x 7)) (x 9))) (K.add (K.add (K.add (Rk K x L 5) (K.neg K.zero)) (K.add (K.add (Rk K x L 3) (K.neg  -- (+801 chars; full line in the Zenodo source)
  show ip K x (pv5 K x) (L + 8) = _
  rw [show L + 8 = L + 3 + 1 + 1 + 1 + 1 + 1 from rfl, ip_head, ip_head, ip_head, ip_head, ip_head]
  rw [ip_ext K _ (AVs.vsum K x [5]) _ (AVs.vsum K x [0, 2, 4, 6, 8, 10]) (fun i => by show (x (i + 5)) = (K.add (x (i + 5)) K.zero); lib_ring) (fun i => by show (K.add (K.add (K.add (K.add (K.add (x (i + 0)) (x (i + 2))) (x (i + 4))) (x (i + 6))) (x (i + 8))) (x (i + 10))) = (K.add (x (i + 0)) (K.add (x (i + 2)) (K.add (x (i + 4)) (K.add (x (i + 6)) (K.add (x (i + 8)) (K.add (x (i + 10)) K.zero)))  -- (+37 chars; full line in the Zenodo source)
  show (K.add (K.mul (x 0) (x 5)) (K.add (K.mul (x 1) (K.add (x 4) (x 6))) (K.add (K.mul (x 2) (K.add (K.add (x 3) (x 5)) (x 7))) (K.add (K.mul (x 3) (K.add (K.add (K.add (x 2) (x 4)) (x 6)) (x 8))) (K.add (K.mul (x 4) (K.add (K.add (K.add (K.add (x 1) (x 3)) (x 5)) (x 7)) (x 9))) (AVs.psum K x L [5] [0, 2, 4, 6, 8, 10])))))) = _; rfl

set_option maxRecDepth 2000000 in
include hz in
theorem ident : K.add (K.mul (LibRing.castN K 72) (K.mul (ip K x (pv4 K x) (L + 8)) (ip K x (pv4 K x) (L + 8)))) (K.neg (K.mul (LibRing.castN K 75) (K.mul (ip K x (pv3 K x) (L + 8)) (ip K x (pv5 K x) (L + 8))))) = (K.add (K.mul (LibRing.castN K 16) (K.add (K.mul (ip K (Zs K (Zs K (Zs K x))) (fun i => x (i + 1)) (L + 8)) (ip K (Zs K (Zs K x)) (fun i => x (i + 2)) (L + 8))) (K.neg (K.mul (ip K (Zs K  -- (+2797 chars; full line in the Zenodo source)
  rw [ip0 K x L hz, ip1 K x L hz, ip2 K x L hz, ip3 K x L hz, ip4 K x L hz, ip5 K x L hz, ip6 K x L hz, ip7 K x L hz, ip8 K x L hz, ip9 K x L hz, ip10 K x L hz, ip11 K x L hz, ip12 K x L hz, ip13 K x L hz, ip14 K x L hz, ip15 K x L hz, ip16 K x L hz, ip17 K x L hz, ip18 K x L hz, ip19 K x L hz, ip20 K x L hz, ip21 K x L hz, ip22 K x L hz, ip23 K x L hz, ip24 K x L hz, ip25 K x L hz, ip26 K x L hz,  -- (+105 chars; full line in the Zenodo source)
  ring_z

end ident

section signs

variable (O : ORing K) (x : Nat → R) (hx : ∀ j, O.le K.zero (x j))
  (hT : ∀ a w, O.le K.zero (K.add (K.mul (Zs K x (a + 1)) (Zs K x (a + w))) (K.neg (K.mul (Zs K x a) (Zs K x (a + w + 1))))))
  (hD : ∀ a k, O.le K.zero (Window.Dl K (Zs K x) a (a + k))) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero)

omit hx hT hD h1 h10 in
theorem nn_scale (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero) (n : Nat) (hn : 1 ≤ n) (t s : R) (hs : O.le K.zero s)
    (h : s = K.mul (LibRing.castN K n) t) : O.le K.zero t := by
  have p := SU2CharExp.pos_of_ge_one K O h1 h10 n hn
  apply O.pos_cancel _ _ _ p.1 p.2
  show O.le (K.mul K.zero (LibRing.castN K n)) (K.mul t (LibRing.castN K n))
  rw [show K.mul K.zero (LibRing.castN K n) = K.zero by lib_ring, show K.mul t (LibRing.castN K n) = s by rw [h]; lib_ring]
  exact hs

include hx hT hD h1 h10 in
theorem sg0 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (Zs K (Zs K (Zs K x))) (Zs K (Zs K x)) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul K.zero K.zero) (K.neg (K.mul K.zero K.zero))))
      exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (1))) (K.neg (K.mul K.zero K.zero))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (2))) (K.neg (K.mul (Zs K x (1)) K.zero))))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) K.zero))))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) K.zero))))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
            | succ w =>
              rw [show 0 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (w + 5))) (K.neg (K.mul (Zs K x (w + 4)) K.zero))))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (1))) (K.neg (K.mul K.zero K.zero))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (2))) (K.neg (K.mul (Zs K x (1)) K.zero))))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) K.zero))))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) K.zero))))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) K.zero))))
                exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (w + 6))) (K.neg (K.mul (Zs K x (w + 5)) K.zero))))
                exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (2))) (K.neg (K.mul (Zs K x (1)) (Zs K x (1))))))
          have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (1))) := O.mul_nonneg _ _ (hx (0)) (hx (0))
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (1))))))
            have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (0)) (hx (1))
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (1))))))
              have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (0)) (hx (2))
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (1))))))
                have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (0)) (hx (3))
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (1))))))
                  have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (0)) (hx (4))
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (w + 7))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (1))))))
                  have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (w + 6))) := O.mul_nonneg _ _ (hx (0)) (hx (w + 5))
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2)))))) := by
              have h := A2.mk K O x hT (1) (0) (0)
              try rw [show (0) + (0) + 1 + (1) = 2 by lib_nat] at h
              try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
              try rw [show (0) + (1) = 1 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (2))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3)))))) := by
                have h := A2.mk K O x hT (2) (0) (0)
                try rw [show (0) + (0) + 1 + (2) = 3 by lib_nat] at h
                try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                try rw [show (0) + (2) = 2 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (2))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (2)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT (3) (0) (0)
                  try rw [show (0) + (0) + 1 + (3) = 4 by lib_nat] at h
                  try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                  try rw [show (0) + (3) = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (2))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (2)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT (4) (0) (0)
                    try rw [show (0) + (0) + 1 + (4) = 5 by lib_nat] at h
                    try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                    try rw [show (0) + (4) = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (2))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (2)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (5) (0) (0)
                      try rw [show (0) + (0) + 1 + (5) = 6 by lib_nat] at h
                      try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                      try rw [show (0) + (5) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (2))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (2)))))) := by
                      have h := A2.mk K O x hT (1) (0) (w + 5)
                      try rw [show (0) + (w + 5) + 1 + (1) = w + 7 by lib_nat] at h
                      try rw [show (0) + (w + 5) + 1 = w + 6 by lib_nat] at h
                      try rw [show (0) + (1) = 1 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3)))))) := by
                have h := A2.mk K O x hT (1) (1) (0)
                try rw [show (1) + (0) + 1 + (1) = 3 by lib_nat] at h
                try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                try rw [show (1) + (1) = 2 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (3))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT (2) (1) (0)
                  try rw [show (1) + (0) + 1 + (2) = 4 by lib_nat] at h
                  try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                  try rw [show (1) + (2) = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (3))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT (3) (1) (0)
                    try rw [show (1) + (0) + 1 + (3) = 5 by lib_nat] at h
                    try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                    try rw [show (1) + (3) = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (3))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (3)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (4) (1) (0)
                      try rw [show (1) + (0) + 1 + (4) = 6 by lib_nat] at h
                      try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                      try rw [show (1) + (4) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (3))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (3)) (Zs K x (7)))))) := by
                        have h := A2.mk K O x hT (5) (1) (0)
                        try rw [show (1) + (0) + 1 + (5) = 7 by lib_nat] at h
                        try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                        try rw [show (1) + (5) = 6 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (3))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (3)))))) := by
                        have h := A2.mk K O x hT (1) (1) (w + 5)
                        try rw [show (1) + (w + 5) + 1 + (1) = w + 8 by lib_nat] at h
                        try rw [show (1) + (w + 5) + 1 = w + 7 by lib_nat] at h
                        try rw [show (1) + (1) = 2 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ i =>
            cases i with
            | zero =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT (1) (2) (0)
                  try rw [show (2) + (0) + 1 + (1) = 4 by lib_nat] at h
                  try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                  try rw [show (2) + (1) = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (4))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT (2) (2) (0)
                    try rw [show (2) + (0) + 1 + (2) = 5 by lib_nat] at h
                    try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                    try rw [show (2) + (2) = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (4))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (3) (2) (0)
                      try rw [show (2) + (0) + 1 + (3) = 6 by lib_nat] at h
                      try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                      try rw [show (2) + (3) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (4))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7)))))) := by
                        have h := A2.mk K O x hT (4) (2) (0)
                        try rw [show (2) + (0) + 1 + (4) = 7 by lib_nat] at h
                        try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                        try rw [show (2) + (4) = 6 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (4))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (4)) (Zs K x (8)))))) := by
                          have h := A2.mk K O x hT (5) (2) (0)
                          try rw [show (2) + (0) + 1 + (5) = 8 by lib_nat] at h
                          try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                          try rw [show (2) + (5) = 7 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                      | succ w =>
                        rw [show 0 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (4))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (4)))))) := by
                          have h := A2.mk K O x hT (1) (2) (w + 5)
                          try rw [show (2) + (w + 5) + 1 + (1) = w + 9 by lib_nat] at h
                          try rw [show (2) + (w + 5) + 1 = w + 8 by lib_nat] at h
                          try rw [show (2) + (1) = 3 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ a =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 6))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 5))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 6))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 5)))))) := by
                  have h := A2.mk K O x hT (1) (a + 3) (0)
                  try rw [show (a + 3) + (0) + 1 + (1) = a + 5 by lib_nat] at h
                  try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                  try rw [show (a + 3) + (1) = a + 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 7))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 5))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 7))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 6)))))) := by
                    have h := A2.mk K O x hT (2) (a + 3) (0)
                    try rw [show (a + 3) + (0) + 1 + (2) = a + 6 by lib_nat] at h
                    try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                    try rw [show (a + 3) + (2) = a + 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 5))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 7)))))) := by
                      have h := A2.mk K O x hT (3) (a + 3) (0)
                      try rw [show (a + 3) + (0) + 1 + (3) = a + 7 by lib_nat] at h
                      try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                      try rw [show (a + 3) + (3) = a + 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 5))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 8)))))) := by
                        have h := A2.mk K O x hT (4) (a + 3) (0)
                        try rw [show (a + 3) + (0) + 1 + (4) = a + 8 by lib_nat] at h
                        try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                        try rw [show (a + 3) + (4) = a + 7 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1 + 1) + 1 = a + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 5))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 9)))))) := by
                          have h := A2.mk K O x hT (5) (a + 3) (0)
                          try rw [show (a + 3) + (0) + 1 + (5) = a + 9 by lib_nat] at h
                          try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                          try rw [show (a + 3) + (5) = a + 8 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                      | succ w =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = a + w + 12 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + w + 11))) (K.neg (K.mul (Zs K x (a + w + 10)) (Zs K x (a + 5))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + w + 11))) (K.neg (K.mul (Zs K x (a + w + 10)) (Zs K x (a + 5)))))) := by
                          have h := A2.mk K O x hT (1) (a + 3) (w + 5)
                          try rw [show (a + 3) + (w + 5) + 1 + (1) = a + w + 10 by lib_nat] at h
                          try rw [show (a + 3) + (w + 5) + 1 = a + w + 9 by lib_nat] at h
                          try rw [show (a + 3) + (1) = a + 4 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

include hx hT hD h1 h10 in
theorem sg1 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (fun i => x (i + 1)) (fun i => x (i + 2)) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3))))))
      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3)))))) := by
        have h := A2.mk K O x hT (1) (1) (0)
        try rw [show (1) + (0) + 1 + (1) = 3 by lib_nat] at h
        try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
        try rw [show (1) + (1) = 2 by lib_nat] at h
        exact A2.nn_of_nonpos_neg K O _ h
      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (3))))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
          have h := A2.mk K O x hT (2) (1) (0)
          try rw [show (1) + (0) + 1 + (2) = 4 by lib_nat] at h
          try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
          try rw [show (1) + (2) = 3 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (3))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
            have h := A2.mk K O x hT (3) (1) (0)
            try rw [show (1) + (0) + 1 + (3) = 5 by lib_nat] at h
            try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
            try rw [show (1) + (3) = 4 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (3))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (3)) (Zs K x (6)))))) := by
              have h := A2.mk K O x hT (4) (1) (0)
              try rw [show (1) + (0) + 1 + (4) = 6 by lib_nat] at h
              try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
              try rw [show (1) + (4) = 5 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (3))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (3)) (Zs K x (7)))))) := by
                have h := A2.mk K O x hT (5) (1) (0)
                try rw [show (1) + (0) + 1 + (5) = 7 by lib_nat] at h
                try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                try rw [show (1) + (5) = 6 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              rw [show 0 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (3))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (3)))))) := by
                have h := A2.mk K O x hT (1) (1) (w + 5)
                try rw [show (1) + (w + 5) + 1 + (1) = w + 8 by lib_nat] at h
                try rw [show (1) + (w + 5) + 1 = w + 7 by lib_nat] at h
                try rw [show (1) + (1) = 2 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4))))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
          have h := A2.mk K O x hT (1) (2) (0)
          try rw [show (2) + (0) + 1 + (1) = 4 by lib_nat] at h
          try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
          try rw [show (2) + (1) = 3 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (4))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
            have h := A2.mk K O x hT (2) (2) (0)
            try rw [show (2) + (0) + 1 + (2) = 5 by lib_nat] at h
            try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
            try rw [show (2) + (2) = 4 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (4))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
              have h := A2.mk K O x hT (3) (2) (0)
              try rw [show (2) + (0) + 1 + (3) = 6 by lib_nat] at h
              try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
              try rw [show (2) + (3) = 5 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (4))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7)))))) := by
                have h := A2.mk K O x hT (4) (2) (0)
                try rw [show (2) + (0) + 1 + (4) = 7 by lib_nat] at h
                try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                try rw [show (2) + (4) = 6 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (4))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (4)) (Zs K x (8)))))) := by
                  have h := A2.mk K O x hT (5) (2) (0)
                  try rw [show (2) + (0) + 1 + (5) = 8 by lib_nat] at h
                  try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                  try rw [show (2) + (5) = 7 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (4))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT (1) (2) (w + 5)
                  try rw [show (2) + (w + 5) + 1 + (1) = w + 9 by lib_nat] at h
                  try rw [show (2) + (w + 5) + 1 = w + 8 by lib_nat] at h
                  try rw [show (2) + (1) = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5)))))) := by
            have h := A2.mk K O x hT (1) (3) (0)
            try rw [show (3) + (0) + 1 + (1) = 5 by lib_nat] at h
            try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
            try rw [show (3) + (1) = 4 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (5))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
              have h := A2.mk K O x hT (2) (3) (0)
              try rw [show (3) + (0) + 1 + (2) = 6 by lib_nat] at h
              try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
              try rw [show (3) + (2) = 5 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (5))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
                have h := A2.mk K O x hT (3) (3) (0)
                try rw [show (3) + (0) + 1 + (3) = 7 by lib_nat] at h
                try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                try rw [show (3) + (3) = 6 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (5))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (5)) (Zs K x (8)))))) := by
                  have h := A2.mk K O x hT (4) (3) (0)
                  try rw [show (3) + (0) + 1 + (4) = 8 by lib_nat] at h
                  try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                  try rw [show (3) + (4) = 7 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (5))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (10))) (K.neg (K.mul (Zs K x (5)) (Zs K x (9)))))) := by
                    have h := A2.mk K O x hT (5) (3) (0)
                    try rw [show (3) + (0) + 1 + (5) = 9 by lib_nat] at h
                    try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                    try rw [show (3) + (5) = 8 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (5))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT (1) (3) (w + 5)
                    try rw [show (3) + (w + 5) + 1 + (1) = w + 10 by lib_nat] at h
                    try rw [show (3) + (w + 5) + 1 = w + 9 by lib_nat] at h
                    try rw [show (3) + (1) = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6)))))) := by
              have h := A2.mk K O x hT (1) (4) (0)
              try rw [show (4) + (0) + 1 + (1) = 6 by lib_nat] at h
              try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
              try rw [show (4) + (1) = 5 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (6))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
                have h := A2.mk K O x hT (2) (4) (0)
                try rw [show (4) + (0) + 1 + (2) = 7 by lib_nat] at h
                try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                try rw [show (4) + (2) = 6 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (6))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (6)) (Zs K x (8)))))) := by
                  have h := A2.mk K O x hT (3) (4) (0)
                  try rw [show (4) + (0) + 1 + (3) = 8 by lib_nat] at h
                  try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                  try rw [show (4) + (3) = 7 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (6))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (10))) (K.neg (K.mul (Zs K x (6)) (Zs K x (9)))))) := by
                    have h := A2.mk K O x hT (4) (4) (0)
                    try rw [show (4) + (0) + 1 + (4) = 9 by lib_nat] at h
                    try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                    try rw [show (4) + (4) = 8 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (11))) (K.neg (K.mul (Zs K x (10)) (Zs K x (6))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (11))) (K.neg (K.mul (Zs K x (6)) (Zs K x (10)))))) := by
                      have h := A2.mk K O x hT (5) (4) (0)
                      try rw [show (4) + (0) + 1 + (5) = 10 by lib_nat] at h
                      try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                      try rw [show (4) + (5) = 9 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (6))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (1) (4) (w + 5)
                      try rw [show (4) + (w + 5) + 1 + (1) = w + 11 by lib_nat] at h
                      try rw [show (4) + (w + 5) + 1 = w + 10 by lib_nat] at h
                      try rw [show (4) + (1) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (7))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (7)))))) := by
                have h := A2.mk K O x hT (1) (5) (0)
                try rw [show (5) + (0) + 1 + (1) = 7 by lib_nat] at h
                try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                try rw [show (5) + (1) = 6 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (7))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (9))) (K.neg (K.mul (Zs K x (7)) (Zs K x (8)))))) := by
                  have h := A2.mk K O x hT (2) (5) (0)
                  try rw [show (5) + (0) + 1 + (2) = 8 by lib_nat] at h
                  try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                  try rw [show (5) + (2) = 7 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (7))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (10))) (K.neg (K.mul (Zs K x (7)) (Zs K x (9)))))) := by
                    have h := A2.mk K O x hT (3) (5) (0)
                    try rw [show (5) + (0) + 1 + (3) = 9 by lib_nat] at h
                    try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                    try rw [show (5) + (3) = 8 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (11))) (K.neg (K.mul (Zs K x (10)) (Zs K x (7))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (11))) (K.neg (K.mul (Zs K x (7)) (Zs K x (10)))))) := by
                      have h := A2.mk K O x hT (4) (5) (0)
                      try rw [show (5) + (0) + 1 + (4) = 10 by lib_nat] at h
                      try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                      try rw [show (5) + (4) = 9 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (12))) (K.neg (K.mul (Zs K x (11)) (Zs K x (7))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (12))) (K.neg (K.mul (Zs K x (7)) (Zs K x (11)))))) := by
                        have h := A2.mk K O x hT (5) (5) (0)
                        try rw [show (5) + (0) + 1 + (5) = 11 by lib_nat] at h
                        try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                        try rw [show (5) + (5) = 10 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (w + 13))) (K.neg (K.mul (Zs K x (w + 12)) (Zs K x (7))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (w + 13))) (K.neg (K.mul (Zs K x (w + 12)) (Zs K x (7)))))) := by
                        have h := A2.mk K O x hT (1) (5) (w + 5)
                        try rw [show (5) + (w + 5) + 1 + (1) = w + 12 by lib_nat] at h
                        try rw [show (5) + (w + 5) + 1 = w + 11 by lib_nat] at h
                        try rw [show (5) + (1) = 6 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ i =>
            cases i with
            | zero =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (8))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (8)))))) := by
                  have h := A2.mk K O x hT (1) (6) (0)
                  try rw [show (6) + (0) + 1 + (1) = 8 by lib_nat] at h
                  try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                  try rw [show (6) + (1) = 7 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (8))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (10))) (K.neg (K.mul (Zs K x (8)) (Zs K x (9)))))) := by
                    have h := A2.mk K O x hT (2) (6) (0)
                    try rw [show (6) + (0) + 1 + (2) = 9 by lib_nat] at h
                    try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                    try rw [show (6) + (2) = 8 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (11))) (K.neg (K.mul (Zs K x (10)) (Zs K x (8))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (11))) (K.neg (K.mul (Zs K x (8)) (Zs K x (10)))))) := by
                      have h := A2.mk K O x hT (3) (6) (0)
                      try rw [show (6) + (0) + 1 + (3) = 10 by lib_nat] at h
                      try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                      try rw [show (6) + (3) = 9 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (12))) (K.neg (K.mul (Zs K x (11)) (Zs K x (8))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (12))) (K.neg (K.mul (Zs K x (8)) (Zs K x (11)))))) := by
                        have h := A2.mk K O x hT (4) (6) (0)
                        try rw [show (6) + (0) + 1 + (4) = 11 by lib_nat] at h
                        try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                        try rw [show (6) + (4) = 10 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (13))) (K.neg (K.mul (Zs K x (12)) (Zs K x (8))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (13))) (K.neg (K.mul (Zs K x (8)) (Zs K x (12)))))) := by
                          have h := A2.mk K O x hT (5) (6) (0)
                          try rw [show (6) + (0) + 1 + (5) = 12 by lib_nat] at h
                          try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                          try rw [show (6) + (5) = 11 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                      | succ w =>
                        rw [show 0 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (w + 14))) (K.neg (K.mul (Zs K x (w + 13)) (Zs K x (8))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (w + 14))) (K.neg (K.mul (Zs K x (w + 13)) (Zs K x (8)))))) := by
                          have h := A2.mk K O x hT (1) (6) (w + 5)
                          try rw [show (6) + (w + 5) + 1 + (1) = w + 13 by lib_nat] at h
                          try rw [show (6) + (w + 5) + 1 = w + 12 by lib_nat] at h
                          try rw [show (6) + (1) = 7 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ a =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 8)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 9))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 8)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 9)))))) := by
                  have h := A2.mk K O x hT (1) (a + 7) (0)
                  try rw [show (a + 7) + (0) + 1 + (1) = a + 9 by lib_nat] at h
                  try rw [show (a + 7) + (0) + 1 = a + 8 by lib_nat] at h
                  try rw [show (a + 7) + (1) = a + 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 8)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 9))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 8)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 10)))))) := by
                    have h := A2.mk K O x hT (2) (a + 7) (0)
                    try rw [show (a + 7) + (0) + 1 + (2) = a + 10 by lib_nat] at h
                    try rw [show (a + 7) + (0) + 1 = a + 8 by lib_nat] at h
                    try rw [show (a + 7) + (2) = a + 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 8)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 11)) (Zs K x (a + 9))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 8)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 11)))))) := by
                      have h := A2.mk K O x hT (3) (a + 7) (0)
                      try rw [show (a + 7) + (0) + 1 + (3) = a + 11 by lib_nat] at h
                      try rw [show (a + 7) + (0) + 1 = a + 8 by lib_nat] at h
                      try rw [show (a + 7) + (3) = a + 10 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 8)) (Zs K x (a + 13))) (K.neg (K.mul (Zs K x (a + 12)) (Zs K x (a + 9))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 8)) (Zs K x (a + 13))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 12)))))) := by
                        have h := A2.mk K O x hT (4) (a + 7) (0)
                        try rw [show (a + 7) + (0) + 1 + (4) = a + 12 by lib_nat] at h
                        try rw [show (a + 7) + (0) + 1 = a + 8 by lib_nat] at h
                        try rw [show (a + 7) + (4) = a + 11 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1 + 1) + 1 = a + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 8)) (Zs K x (a + 14))) (K.neg (K.mul (Zs K x (a + 13)) (Zs K x (a + 9))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 8)) (Zs K x (a + 14))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 13)))))) := by
                          have h := A2.mk K O x hT (5) (a + 7) (0)
                          try rw [show (a + 7) + (0) + 1 + (5) = a + 13 by lib_nat] at h
                          try rw [show (a + 7) + (0) + 1 = a + 8 by lib_nat] at h
                          try rw [show (a + 7) + (5) = a + 12 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                      | succ w =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = a + w + 12 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 8)) (Zs K x (a + w + 15))) (K.neg (K.mul (Zs K x (a + w + 14)) (Zs K x (a + 9))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 8)) (Zs K x (a + w + 15))) (K.neg (K.mul (Zs K x (a + w + 14)) (Zs K x (a + 9)))))) := by
                          have h := A2.mk K O x hT (1) (a + 7) (w + 5)
                          try rw [show (a + 7) + (w + 5) + 1 + (1) = a + w + 14 by lib_nat] at h
                          try rw [show (a + 7) + (w + 5) + 1 = a + w + 13 by lib_nat] at h
                          try rw [show (a + 7) + (1) = a + 8 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

include hx hT hD h1 h10 in
theorem sg2 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (Zs K (Zs K (Zs K x))) (fun i => x (i + 3)) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (5))) (K.neg (K.mul K.zero (Zs K x (4))))))
      exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (6))) (K.neg (K.mul K.zero (Zs K x (4))))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (7))) (K.neg (K.mul (Zs K x (1)) (Zs K x (4))))))
          have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (0)) (hx (3))
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (8))) (K.neg (K.mul (Zs K x (2)) (Zs K x (4))))))
            have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (1)) (hx (3))
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (9))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4))))))
              have t0 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (2)) (hx (3))
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              rw [show 0 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 4)) (Zs K x (4))))))
              have t0 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (w + 4))) := O.mul_nonneg _ _ (hx (3)) (hx (w + 3))
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (6))) (K.neg (K.mul K.zero (Zs K x (5))))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (7))) (K.neg (K.mul (Zs K x (1)) (Zs K x (5))))))
          have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (0)) (hx (4))
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (8))) (K.neg (K.mul (Zs K x (2)) (Zs K x (5))))))
            have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (1)) (hx (4))
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (9))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5))))))
              have t0 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (2)) (hx (4))
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (10))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5))))))
                have t0 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (3)) (hx (4))
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 5)) (Zs K x (5))))))
                have t0 : O.le K.zero (K.mul (Zs K x (5)) (Zs K x (w + 5))) := O.mul_nonneg _ _ (hx (4)) (hx (w + 4))
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (7))) (K.neg (K.mul (Zs K x (1)) (Zs K x (6))))))
          have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (6))) := O.mul_nonneg _ _ (hx (0)) (hx (5))
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (8))) (K.neg (K.mul (Zs K x (2)) (Zs K x (6))))))
            have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (6))) := O.mul_nonneg _ _ (hx (1)) (hx (5))
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (9))) (K.neg (K.mul (Zs K x (3)) (Zs K x (6))))))
              have t0 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (6))) := O.mul_nonneg _ _ (hx (2)) (hx (5))
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (10))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6))))))
                have t0 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (6))) := O.mul_nonneg _ _ (hx (3)) (hx (5))
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (11))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6))))))
                  have t0 : O.le K.zero (K.mul (Zs K x (5)) (Zs K x (6))) := O.mul_nonneg _ _ (hx (4)) (hx (5))
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (6))))))
                  have t0 : O.le K.zero (K.mul (Zs K x (6)) (Zs K x (w + 6))) := O.mul_nonneg _ _ (hx (5)) (hx (w + 5))
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (8))) (K.neg (K.mul (Zs K x (2)) (Zs K x (7))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (8))) (K.neg (K.mul (Zs K x (2)) (Zs K x (7)))))) := by
              have h := A2.mk K O x hT (6) (0) (0)
              try rw [show (0) + (0) + 1 + (6) = 7 by lib_nat] at h
              try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
              try rw [show (0) + (6) = 6 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (9))) (K.neg (K.mul (Zs K x (3)) (Zs K x (7))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (9))) (K.neg (K.mul (Zs K x (3)) (Zs K x (7)))))) := by
                have h := A2.mk K O x hT (6) (0) (1)
                try rw [show (0) + (1) + 1 + (6) = 8 by lib_nat] at h
                try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
                try rw [show (0) + (6) = 6 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (10))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (10))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT (6) (0) (2)
                  try rw [show (0) + (2) + 1 + (6) = 9 by lib_nat] at h
                  try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
                  try rw [show (0) + (6) = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (11))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (11))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
                    have h := A2.mk K O x hT (6) (0) (3)
                    try rw [show (0) + (3) + 1 + (6) = 10 by lib_nat] at h
                    try rw [show (0) + (3) + 1 = 4 by lib_nat] at h
                    try rw [show (0) + (6) = 6 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (12))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (12))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
                      have h := A2.mk K O x hT (6) (0) (4)
                      try rw [show (0) + (4) + 1 + (6) = 11 by lib_nat] at h
                      try rw [show (0) + (4) + 1 = 5 by lib_nat] at h
                      try rw [show (0) + (6) = 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 13))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (7))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 13))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (7)))))) := by
                      have h := A2.mk K O x hT (6) (0) (w + 5)
                      try rw [show (0) + (w + 5) + 1 + (6) = w + 12 by lib_nat] at h
                      try rw [show (0) + (w + 5) + 1 = w + 6 by lib_nat] at h
                      try rw [show (0) + (6) = 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (9))) (K.neg (K.mul (Zs K x (3)) (Zs K x (8))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (9))) (K.neg (K.mul (Zs K x (3)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (6) (1) (0)
                try rw [show (1) + (0) + 1 + (6) = 8 by lib_nat] at h
                try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                try rw [show (1) + (6) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (10))) (K.neg (K.mul (Zs K x (4)) (Zs K x (8))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (10))) (K.neg (K.mul (Zs K x (4)) (Zs K x (8)))))) := by
                  have h := A2.mk K O x hT (6) (1) (1)
                  try rw [show (1) + (1) + 1 + (6) = 9 by lib_nat] at h
                  try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
                  try rw [show (1) + (6) = 7 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (11))) (K.neg (K.mul (Zs K x (5)) (Zs K x (8))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (11))) (K.neg (K.mul (Zs K x (5)) (Zs K x (8)))))) := by
                    have h := A2.mk K O x hT (6) (1) (2)
                    try rw [show (1) + (2) + 1 + (6) = 10 by lib_nat] at h
                    try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
                    try rw [show (1) + (6) = 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (12))) (K.neg (K.mul (Zs K x (6)) (Zs K x (8))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (12))) (K.neg (K.mul (Zs K x (6)) (Zs K x (8)))))) := by
                      have h := A2.mk K O x hT (6) (1) (3)
                      try rw [show (1) + (3) + 1 + (6) = 11 by lib_nat] at h
                      try rw [show (1) + (3) + 1 = 5 by lib_nat] at h
                      try rw [show (1) + (6) = 7 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (13))) (K.neg (K.mul (Zs K x (7)) (Zs K x (8))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (13))) (K.neg (K.mul (Zs K x (7)) (Zs K x (8)))))) := by
                        have h := A2.mk K O x hT (6) (1) (4)
                        try rw [show (1) + (4) + 1 + (6) = 12 by lib_nat] at h
                        try rw [show (1) + (4) + 1 = 6 by lib_nat] at h
                        try rw [show (1) + (6) = 7 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 14))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (8))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 14))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (8)))))) := by
                        have h := A2.mk K O x hT (6) (1) (w + 5)
                        try rw [show (1) + (w + 5) + 1 + (6) = w + 13 by lib_nat] at h
                        try rw [show (1) + (w + 5) + 1 = w + 7 by lib_nat] at h
                        try rw [show (1) + (6) = 7 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ i =>
            cases i with
            | zero =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (10))) (K.neg (K.mul (Zs K x (4)) (Zs K x (9))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (10))) (K.neg (K.mul (Zs K x (4)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (6) (2) (0)
                  try rw [show (2) + (0) + 1 + (6) = 9 by lib_nat] at h
                  try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                  try rw [show (2) + (6) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (11))) (K.neg (K.mul (Zs K x (5)) (Zs K x (9))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (11))) (K.neg (K.mul (Zs K x (5)) (Zs K x (9)))))) := by
                    have h := A2.mk K O x hT (6) (2) (1)
                    try rw [show (2) + (1) + 1 + (6) = 10 by lib_nat] at h
                    try rw [show (2) + (1) + 1 = 4 by lib_nat] at h
                    try rw [show (2) + (6) = 8 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (12))) (K.neg (K.mul (Zs K x (6)) (Zs K x (9))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (12))) (K.neg (K.mul (Zs K x (6)) (Zs K x (9)))))) := by
                      have h := A2.mk K O x hT (6) (2) (2)
                      try rw [show (2) + (2) + 1 + (6) = 11 by lib_nat] at h
                      try rw [show (2) + (2) + 1 = 5 by lib_nat] at h
                      try rw [show (2) + (6) = 8 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (13))) (K.neg (K.mul (Zs K x (7)) (Zs K x (9))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (13))) (K.neg (K.mul (Zs K x (7)) (Zs K x (9)))))) := by
                        have h := A2.mk K O x hT (6) (2) (3)
                        try rw [show (2) + (3) + 1 + (6) = 12 by lib_nat] at h
                        try rw [show (2) + (3) + 1 = 6 by lib_nat] at h
                        try rw [show (2) + (6) = 8 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (14))) (K.neg (K.mul (Zs K x (8)) (Zs K x (9))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (14))) (K.neg (K.mul (Zs K x (8)) (Zs K x (9)))))) := by
                          have h := A2.mk K O x hT (6) (2) (4)
                          try rw [show (2) + (4) + 1 + (6) = 13 by lib_nat] at h
                          try rw [show (2) + (4) + 1 = 7 by lib_nat] at h
                          try rw [show (2) + (6) = 8 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                      | succ w =>
                        rw [show 0 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 15))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (9))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 15))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (9)))))) := by
                          have h := A2.mk K O x hT (6) (2) (w + 5)
                          try rw [show (2) + (w + 5) + 1 + (6) = w + 14 by lib_nat] at h
                          try rw [show (2) + (w + 5) + 1 = w + 8 by lib_nat] at h
                          try rw [show (2) + (6) = 8 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ a =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 10))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 10)))))) := by
                  have h := A2.mk K O x hT (6) (a + 3) (0)
                  try rw [show (a + 3) + (0) + 1 + (6) = a + 10 by lib_nat] at h
                  try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                  try rw [show (a + 3) + (6) = a + 9 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 10))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 10)))))) := by
                    have h := A2.mk K O x hT (6) (a + 3) (1)
                    try rw [show (a + 3) + (1) + 1 + (6) = a + 11 by lib_nat] at h
                    try rw [show (a + 3) + (1) + 1 = a + 5 by lib_nat] at h
                    try rw [show (a + 3) + (6) = a + 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 13))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 10))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 13))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 10)))))) := by
                      have h := A2.mk K O x hT (6) (a + 3) (2)
                      try rw [show (a + 3) + (2) + 1 + (6) = a + 12 by lib_nat] at h
                      try rw [show (a + 3) + (2) + 1 = a + 6 by lib_nat] at h
                      try rw [show (a + 3) + (6) = a + 9 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 14))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 10))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 14))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 10)))))) := by
                        have h := A2.mk K O x hT (6) (a + 3) (3)
                        try rw [show (a + 3) + (3) + 1 + (6) = a + 13 by lib_nat] at h
                        try rw [show (a + 3) + (3) + 1 = a + 7 by lib_nat] at h
                        try rw [show (a + 3) + (6) = a + 9 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1 + 1) + 1 = a + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 15))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 10))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 15))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 10)))))) := by
                          have h := A2.mk K O x hT (6) (a + 3) (4)
                          try rw [show (a + 3) + (4) + 1 + (6) = a + 14 by lib_nat] at h
                          try rw [show (a + 3) + (4) + 1 = a + 8 by lib_nat] at h
                          try rw [show (a + 3) + (6) = a + 9 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                      | succ w =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = a + w + 12 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + w + 16))) (K.neg (K.mul (Zs K x (a + w + 10)) (Zs K x (a + 10))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + w + 16))) (K.neg (K.mul (Zs K x (a + w + 10)) (Zs K x (a + 10)))))) := by
                          have h := A2.mk K O x hT (6) (a + 3) (w + 5)
                          try rw [show (a + 3) + (w + 5) + 1 + (6) = a + w + 15 by lib_nat] at h
                          try rw [show (a + 3) + (w + 5) + 1 = a + w + 9 by lib_nat] at h
                          try rw [show (a + 3) + (6) = a + 9 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

include hx hT hD h1 h10 in
theorem sg3 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K x (fun i => x (i + 2)) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3))))))
      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3)))))) := by
        have h := A2.mk K O x hT (2) (0) (0)
        try rw [show (0) + (0) + 1 + (2) = 3 by lib_nat] at h
        try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
        try rw [show (0) + (2) = 2 by lib_nat] at h
        exact A2.nn_of_nonpos_neg K O _ h
      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3))))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3)))))) := by
          have h := A2.mk K O x hT (2) (0) (1)
          try rw [show (0) + (1) + 1 + (2) = 4 by lib_nat] at h
          try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
          try rw [show (0) + (2) = 2 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (3))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
            have h := A2.mk K O x hT (3) (0) (1)
            try rw [show (0) + (1) + 1 + (3) = 5 by lib_nat] at h
            try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
            try rw [show (0) + (3) = 3 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (5)) (Zs K x (3))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
              have h := A2.mk K O x hT (4) (0) (1)
              try rw [show (0) + (1) + 1 + (4) = 6 by lib_nat] at h
              try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
              try rw [show (0) + (4) = 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (8))) (K.neg (K.mul (Zs K x (6)) (Zs K x (3))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (8))) (K.neg (K.mul (Zs K x (3)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT (5) (0) (1)
                try rw [show (0) + (1) + 1 + (5) = 7 by lib_nat] at h
                try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
                try rw [show (0) + (5) = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              rw [show 0 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (3))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (3)))))) := by
                have h := A2.mk K O x hT (2) (0) (w + 5)
                try rw [show (0) + (w + 5) + 1 + (2) = w + 8 by lib_nat] at h
                try rw [show (0) + (w + 5) + 1 = w + 6 by lib_nat] at h
                try rw [show (0) + (2) = 2 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4))))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
          have h := A2.mk K O x hT (2) (1) (0)
          try rw [show (1) + (0) + 1 + (2) = 4 by lib_nat] at h
          try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
          try rw [show (1) + (2) = 3 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
            have h := A2.mk K O x hT (2) (1) (1)
            try rw [show (1) + (1) + 1 + (2) = 5 by lib_nat] at h
            try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
            try rw [show (1) + (2) = 3 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (5)) (Zs K x (4))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
              have h := A2.mk K O x hT (3) (1) (1)
              try rw [show (1) + (1) + 1 + (3) = 6 by lib_nat] at h
              try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
              try rw [show (1) + (3) = 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (6)) (Zs K x (4))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT (4) (1) (1)
                try rw [show (1) + (1) + 1 + (4) = 7 by lib_nat] at h
                try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
                try rw [show (1) + (4) = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (9))) (K.neg (K.mul (Zs K x (7)) (Zs K x (4))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (9))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT (5) (1) (1)
                  try rw [show (1) + (1) + 1 + (5) = 8 by lib_nat] at h
                  try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
                  try rw [show (1) + (5) = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (4))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT (2) (1) (w + 5)
                  try rw [show (1) + (w + 5) + 1 + (2) = w + 9 by lib_nat] at h
                  try rw [show (1) + (w + 5) + 1 = w + 7 by lib_nat] at h
                  try rw [show (1) + (2) = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
            have h := A2.mk K O x hT (2) (2) (0)
            try rw [show (2) + (0) + 1 + (2) = 5 by lib_nat] at h
            try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
            try rw [show (2) + (2) = 4 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5)))))) := by
              have h := A2.mk K O x hT (2) (2) (1)
              try rw [show (2) + (1) + 1 + (2) = 6 by lib_nat] at h
              try rw [show (2) + (1) + 1 = 4 by lib_nat] at h
              try rw [show (2) + (2) = 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (6)) (Zs K x (5))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT (3) (2) (1)
                try rw [show (2) + (1) + 1 + (3) = 7 by lib_nat] at h
                try rw [show (2) + (1) + 1 = 4 by lib_nat] at h
                try rw [show (2) + (3) = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (7)) (Zs K x (5))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT (4) (2) (1)
                  try rw [show (2) + (1) + 1 + (4) = 8 by lib_nat] at h
                  try rw [show (2) + (1) + 1 = 4 by lib_nat] at h
                  try rw [show (2) + (4) = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (10))) (K.neg (K.mul (Zs K x (8)) (Zs K x (5))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (10))) (K.neg (K.mul (Zs K x (5)) (Zs K x (8)))))) := by
                    have h := A2.mk K O x hT (5) (2) (1)
                    try rw [show (2) + (1) + 1 + (5) = 9 by lib_nat] at h
                    try rw [show (2) + (1) + 1 = 4 by lib_nat] at h
                    try rw [show (2) + (5) = 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (5))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT (2) (2) (w + 5)
                    try rw [show (2) + (w + 5) + 1 + (2) = w + 10 by lib_nat] at h
                    try rw [show (2) + (w + 5) + 1 = w + 8 by lib_nat] at h
                    try rw [show (2) + (2) = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
              have h := A2.mk K O x hT (2) (3) (0)
              try rw [show (3) + (0) + 1 + (2) = 6 by lib_nat] at h
              try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
              try rw [show (3) + (2) = 5 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT (2) (3) (1)
                try rw [show (3) + (1) + 1 + (2) = 7 by lib_nat] at h
                try rw [show (3) + (1) + 1 = 5 by lib_nat] at h
                try rw [show (3) + (2) = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (7)) (Zs K x (6))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT (3) (3) (1)
                  try rw [show (3) + (1) + 1 + (3) = 8 by lib_nat] at h
                  try rw [show (3) + (1) + 1 = 5 by lib_nat] at h
                  try rw [show (3) + (3) = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (10))) (K.neg (K.mul (Zs K x (8)) (Zs K x (6))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (10))) (K.neg (K.mul (Zs K x (6)) (Zs K x (8)))))) := by
                    have h := A2.mk K O x hT (4) (3) (1)
                    try rw [show (3) + (1) + 1 + (4) = 9 by lib_nat] at h
                    try rw [show (3) + (1) + 1 = 5 by lib_nat] at h
                    try rw [show (3) + (4) = 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (11))) (K.neg (K.mul (Zs K x (9)) (Zs K x (6))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (11))) (K.neg (K.mul (Zs K x (6)) (Zs K x (9)))))) := by
                      have h := A2.mk K O x hT (5) (3) (1)
                      try rw [show (3) + (1) + 1 + (5) = 10 by lib_nat] at h
                      try rw [show (3) + (1) + 1 = 5 by lib_nat] at h
                      try rw [show (3) + (5) = 8 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (6))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (2) (3) (w + 5)
                      try rw [show (3) + (w + 5) + 1 + (2) = w + 11 by lib_nat] at h
                      try rw [show (3) + (w + 5) + 1 = w + 9 by lib_nat] at h
                      try rw [show (3) + (2) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
                have h := A2.mk K O x hT (2) (4) (0)
                try rw [show (4) + (0) + 1 + (2) = 7 by lib_nat] at h
                try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                try rw [show (4) + (2) = 6 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (7)) (Zs K x (7))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (7)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT (2) (4) (1)
                  try rw [show (4) + (1) + 1 + (2) = 8 by lib_nat] at h
                  try rw [show (4) + (1) + 1 = 6 by lib_nat] at h
                  try rw [show (4) + (2) = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (10))) (K.neg (K.mul (Zs K x (8)) (Zs K x (7))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (10))) (K.neg (K.mul (Zs K x (7)) (Zs K x (8)))))) := by
                    have h := A2.mk K O x hT (3) (4) (1)
                    try rw [show (4) + (1) + 1 + (3) = 9 by lib_nat] at h
                    try rw [show (4) + (1) + 1 = 6 by lib_nat] at h
                    try rw [show (4) + (3) = 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (11))) (K.neg (K.mul (Zs K x (9)) (Zs K x (7))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (11))) (K.neg (K.mul (Zs K x (7)) (Zs K x (9)))))) := by
                      have h := A2.mk K O x hT (4) (4) (1)
                      try rw [show (4) + (1) + 1 + (4) = 10 by lib_nat] at h
                      try rw [show (4) + (1) + 1 = 6 by lib_nat] at h
                      try rw [show (4) + (4) = 8 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (12))) (K.neg (K.mul (Zs K x (10)) (Zs K x (7))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (12))) (K.neg (K.mul (Zs K x (7)) (Zs K x (10)))))) := by
                        have h := A2.mk K O x hT (5) (4) (1)
                        try rw [show (4) + (1) + 1 + (5) = 11 by lib_nat] at h
                        try rw [show (4) + (1) + 1 = 6 by lib_nat] at h
                        try rw [show (4) + (5) = 9 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 13))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (7))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 13))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (7)))))) := by
                        have h := A2.mk K O x hT (2) (4) (w + 5)
                        try rw [show (4) + (w + 5) + 1 + (2) = w + 12 by lib_nat] at h
                        try rw [show (4) + (w + 5) + 1 = w + 10 by lib_nat] at h
                        try rw [show (4) + (2) = 6 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ i =>
            cases i with
            | zero =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (9))) (K.neg (K.mul (Zs K x (7)) (Zs K x (8))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (9))) (K.neg (K.mul (Zs K x (7)) (Zs K x (8)))))) := by
                  have h := A2.mk K O x hT (2) (5) (0)
                  try rw [show (5) + (0) + 1 + (2) = 8 by lib_nat] at h
                  try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                  try rw [show (5) + (2) = 7 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (10))) (K.neg (K.mul (Zs K x (8)) (Zs K x (8))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (10))) (K.neg (K.mul (Zs K x (8)) (Zs K x (8)))))) := by
                    have h := A2.mk K O x hT (2) (5) (1)
                    try rw [show (5) + (1) + 1 + (2) = 9 by lib_nat] at h
                    try rw [show (5) + (1) + 1 = 7 by lib_nat] at h
                    try rw [show (5) + (2) = 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (11))) (K.neg (K.mul (Zs K x (9)) (Zs K x (8))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (11))) (K.neg (K.mul (Zs K x (8)) (Zs K x (9)))))) := by
                      have h := A2.mk K O x hT (3) (5) (1)
                      try rw [show (5) + (1) + 1 + (3) = 10 by lib_nat] at h
                      try rw [show (5) + (1) + 1 = 7 by lib_nat] at h
                      try rw [show (5) + (3) = 8 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (12))) (K.neg (K.mul (Zs K x (10)) (Zs K x (8))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (12))) (K.neg (K.mul (Zs K x (8)) (Zs K x (10)))))) := by
                        have h := A2.mk K O x hT (4) (5) (1)
                        try rw [show (5) + (1) + 1 + (4) = 11 by lib_nat] at h
                        try rw [show (5) + (1) + 1 = 7 by lib_nat] at h
                        try rw [show (5) + (4) = 9 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (13))) (K.neg (K.mul (Zs K x (11)) (Zs K x (8))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (13))) (K.neg (K.mul (Zs K x (8)) (Zs K x (11)))))) := by
                          have h := A2.mk K O x hT (5) (5) (1)
                          try rw [show (5) + (1) + 1 + (5) = 12 by lib_nat] at h
                          try rw [show (5) + (1) + 1 = 7 by lib_nat] at h
                          try rw [show (5) + (5) = 10 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                      | succ w =>
                        rw [show 0 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (w + 14))) (K.neg (K.mul (Zs K x (w + 12)) (Zs K x (8))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (w + 14))) (K.neg (K.mul (Zs K x (w + 12)) (Zs K x (8)))))) := by
                          have h := A2.mk K O x hT (2) (5) (w + 5)
                          try rw [show (5) + (w + 5) + 1 + (2) = w + 13 by lib_nat] at h
                          try rw [show (5) + (w + 5) + 1 = w + 11 by lib_nat] at h
                          try rw [show (5) + (2) = 7 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ a =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 9))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 9)))))) := by
                  have h := A2.mk K O x hT (2) (a + 6) (0)
                  try rw [show (a + 6) + (0) + 1 + (2) = a + 9 by lib_nat] at h
                  try rw [show (a + 6) + (0) + 1 = a + 7 by lib_nat] at h
                  try rw [show (a + 6) + (2) = a + 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 9))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 9)))))) := by
                    have h := A2.mk K O x hT (2) (a + 6) (1)
                    try rw [show (a + 6) + (1) + 1 + (2) = a + 10 by lib_nat] at h
                    try rw [show (a + 6) + (1) + 1 = a + 8 by lib_nat] at h
                    try rw [show (a + 6) + (2) = a + 8 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 9))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 10)))))) := by
                      have h := A2.mk K O x hT (3) (a + 6) (1)
                      try rw [show (a + 6) + (1) + 1 + (3) = a + 11 by lib_nat] at h
                      try rw [show (a + 6) + (1) + 1 = a + 8 by lib_nat] at h
                      try rw [show (a + 6) + (3) = a + 9 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 13))) (K.neg (K.mul (Zs K x (a + 11)) (Zs K x (a + 9))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 13))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 11)))))) := by
                        have h := A2.mk K O x hT (4) (a + 6) (1)
                        try rw [show (a + 6) + (1) + 1 + (4) = a + 12 by lib_nat] at h
                        try rw [show (a + 6) + (1) + 1 = a + 8 by lib_nat] at h
                        try rw [show (a + 6) + (4) = a + 10 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1 + 1) + 1 = a + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 14))) (K.neg (K.mul (Zs K x (a + 12)) (Zs K x (a + 9))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 14))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 12)))))) := by
                          have h := A2.mk K O x hT (5) (a + 6) (1)
                          try rw [show (a + 6) + (1) + 1 + (5) = a + 13 by lib_nat] at h
                          try rw [show (a + 6) + (1) + 1 = a + 8 by lib_nat] at h
                          try rw [show (a + 6) + (5) = a + 11 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                      | succ w =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = a + w + 12 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + w + 15))) (K.neg (K.mul (Zs K x (a + w + 13)) (Zs K x (a + 9))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + w + 15))) (K.neg (K.mul (Zs K x (a + w + 13)) (Zs K x (a + 9)))))) := by
                          have h := A2.mk K O x hT (2) (a + 6) (w + 5)
                          try rw [show (a + 6) + (w + 5) + 1 + (2) = a + w + 14 by lib_nat] at h
                          try rw [show (a + 6) + (w + 5) + 1 = a + w + 12 by lib_nat] at h
                          try rw [show (a + 6) + (2) = a + 8 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

include hx hT hD h1 h10 in
theorem sg4 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (Zs K (Zs K (Zs K x))) (Zs K (c1v K x)) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add K.zero (Zs K x (2)))) (K.neg (K.mul K.zero K.zero))))
      exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (1)) (Zs K x (3)))) (K.neg (K.mul K.zero K.zero))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (Zs K x (1)) K.zero))))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (2)) K.zero))))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (3)) K.zero))))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
            | succ w =>
              rw [show 0 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (w + 5)) (Zs K x (w + 7)))) (K.neg (K.mul (Zs K x (w + 4)) K.zero))))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (1)) (Zs K x (3)))) (K.neg (K.mul K.zero (K.add K.zero (Zs K x (2)))))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (Zs K x (1)) (K.add K.zero (Zs K x (2)))))))
          have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (0)) (hx (1))
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (2)) (K.add K.zero (Zs K x (2)))))))
            have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (1)) (hx (1))
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (3)) (K.add K.zero (Zs K x (2)))))))
              have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (1)) (hx (2))
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (Zs K x (4)) (K.add K.zero (Zs K x (2)))))))
                have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (1)) (hx (3))
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (w + 6)) (Zs K x (w + 8)))) (K.neg (K.mul (Zs K x (w + 5)) (K.add K.zero (Zs K x (2)))))))
                have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (w + 5))) := O.mul_nonneg _ _ (hx (1)) (hx (w + 4))
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (Zs K x (1)) (K.add (Zs K x (1)) (Zs K x (3)))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (2))))) := A1.Dn K O x hD (0) (1) (0) (1) (2) (1) (2) (3) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t1 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (1)) (hx (1))
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (2)) (K.add (Zs K x (1)) (Zs K x (3)))))))
            have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (0)) (hx (1))
            have t1 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (1)) (hx (2))
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (3)) (K.add (Zs K x (1)) (Zs K x (3)))))))
              have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (0)) (hx (2))
              have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (2)) (hx (2))
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (Zs K x (4)) (K.add (Zs K x (1)) (Zs K x (3)))))))
                have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (0)) (hx (3))
                have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (2)) (hx (3))
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (6)) (Zs K x (8)))) (K.neg (K.mul (Zs K x (5)) (K.add (Zs K x (1)) (Zs K x (3)))))))
                  have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (0)) (hx (4))
                  have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (2)) (hx (4))
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (w + 7)) (Zs K x (w + 9)))) (K.neg (K.mul (Zs K x (w + 6)) (K.add (Zs K x (1)) (Zs K x (3)))))))
                  have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (w + 6))) := O.mul_nonneg _ _ (hx (0)) (hx (w + 5))
                  have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (w + 6))) := O.mul_nonneg _ _ (hx (2)) (hx (w + 5))
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (2)) (K.add (Zs K x (2)) (Zs K x (4)))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3)))))) := by
              have h := A2.mk K O x hT (2) (0) (1)
              try rw [show (0) + (1) + 1 + (2) = 4 by lib_nat] at h
              try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
              try rw [show (0) + (2) = 2 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (3)) (K.add (Zs K x (2)) (Zs K x (4)))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3)))))) := by
                have h := A2.mk K O x hT (2) (0) (0)
                try rw [show (0) + (0) + 1 + (2) = 3 by lib_nat] at h
                try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                try rw [show (0) + (2) = 2 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
                have h := A2.mk K O x hT (3) (0) (1)
                try rw [show (0) + (1) + 1 + (3) = 5 by lib_nat] at h
                try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
                try rw [show (0) + (3) = 3 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (Zs K x (4)) (K.add (Zs K x (2)) (Zs K x (4)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (2)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT (3) (0) (0)
                  try rw [show (0) + (0) + 1 + (3) = 4 by lib_nat] at h
                  try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                  try rw [show (0) + (3) = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT (3) (0) (2)
                  try rw [show (0) + (2) + 1 + (3) = 6 by lib_nat] at h
                  try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
                  try rw [show (0) + (3) = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (6)) (Zs K x (8)))) (K.neg (K.mul (Zs K x (5)) (K.add (Zs K x (2)) (Zs K x (4)))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (2)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT (4) (0) (0)
                    try rw [show (0) + (0) + 1 + (4) = 5 by lib_nat] at h
                    try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                    try rw [show (0) + (4) = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT (4) (0) (2)
                    try rw [show (0) + (2) + 1 + (4) = 7 by lib_nat] at h
                    try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
                    try rw [show (0) + (4) = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (7)) (Zs K x (9)))) (K.neg (K.mul (Zs K x (6)) (K.add (Zs K x (2)) (Zs K x (4)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (2)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (5) (0) (0)
                      try rw [show (0) + (0) + 1 + (5) = 6 by lib_nat] at h
                      try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                      try rw [show (0) + (5) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (9))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (5) (0) (2)
                      try rw [show (0) + (2) + 1 + (5) = 8 by lib_nat] at h
                      try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
                      try rw [show (0) + (5) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (w + 8)) (Zs K x (w + 10)))) (K.neg (K.mul (Zs K x (w + 7)) (K.add (Zs K x (2)) (Zs K x (4)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (2)))))) := by
                      have h := A2.mk K O x hT (1) (0) (w + 5)
                      try rw [show (0) + (w + 5) + 1 + (1) = w + 7 by lib_nat] at h
                      try rw [show (0) + (w + 5) + 1 = w + 6 by lib_nat] at h
                      try rw [show (0) + (1) = 1 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (4)))))) := by
                      have h := A2.mk K O x hT (3) (0) (w + 5)
                      try rw [show (0) + (w + 5) + 1 + (3) = w + 9 by lib_nat] at h
                      try rw [show (0) + (w + 5) + 1 = w + 6 by lib_nat] at h
                      try rw [show (0) + (3) = 3 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (3)) (K.add (Zs K x (3)) (Zs K x (5)))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
                have h := A2.mk K O x hT (2) (1) (1)
                try rw [show (1) + (1) + 1 + (2) = 5 by lib_nat] at h
                try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
                try rw [show (1) + (2) = 3 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (Zs K x (4)) (K.add (Zs K x (3)) (Zs K x (5)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT (2) (1) (0)
                  try rw [show (1) + (0) + 1 + (2) = 4 by lib_nat] at h
                  try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                  try rw [show (1) + (2) = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
                  have h := A2.mk K O x hT (3) (1) (1)
                  try rw [show (1) + (1) + 1 + (3) = 6 by lib_nat] at h
                  try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
                  try rw [show (1) + (3) = 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (6)) (Zs K x (8)))) (K.neg (K.mul (Zs K x (5)) (K.add (Zs K x (3)) (Zs K x (5)))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT (3) (1) (0)
                    try rw [show (1) + (0) + 1 + (3) = 5 by lib_nat] at h
                    try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                    try rw [show (1) + (3) = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT (3) (1) (2)
                    try rw [show (1) + (2) + 1 + (3) = 7 by lib_nat] at h
                    try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
                    try rw [show (1) + (3) = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (7)) (Zs K x (9)))) (K.neg (K.mul (Zs K x (6)) (K.add (Zs K x (3)) (Zs K x (5)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (3)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (4) (1) (0)
                      try rw [show (1) + (0) + 1 + (4) = 6 by lib_nat] at h
                      try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                      try rw [show (1) + (4) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (9))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (4) (1) (2)
                      try rw [show (1) + (2) + 1 + (4) = 8 by lib_nat] at h
                      try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
                      try rw [show (1) + (4) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (8)) (Zs K x (10)))) (K.neg (K.mul (Zs K x (7)) (K.add (Zs K x (3)) (Zs K x (5)))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (3)) (Zs K x (7)))))) := by
                        have h := A2.mk K O x hT (5) (1) (0)
                        try rw [show (1) + (0) + 1 + (5) = 7 by lib_nat] at h
                        try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                        try rw [show (1) + (5) = 6 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (10))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
                        have h := A2.mk K O x hT (5) (1) (2)
                        try rw [show (1) + (2) + 1 + (5) = 9 by lib_nat] at h
                        try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
                        try rw [show (1) + (5) = 6 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                    | succ w =>
                      rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (w + 9)) (Zs K x (w + 11)))) (K.neg (K.mul (Zs K x (w + 8)) (K.add (Zs K x (3)) (Zs K x (5)))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (3)))))) := by
                        have h := A2.mk K O x hT (1) (1) (w + 5)
                        try rw [show (1) + (w + 5) + 1 + (1) = w + 8 by lib_nat] at h
                        try rw [show (1) + (w + 5) + 1 = w + 7 by lib_nat] at h
                        try rw [show (1) + (1) = 2 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (5)))))) := by
                        have h := A2.mk K O x hT (3) (1) (w + 5)
                        try rw [show (1) + (w + 5) + 1 + (3) = w + 10 by lib_nat] at h
                        try rw [show (1) + (w + 5) + 1 = w + 7 by lib_nat] at h
                        try rw [show (1) + (3) = 4 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
          | succ i =>
            cases i with
            | zero =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (Zs K x (4)) (K.add (Zs K x (4)) (Zs K x (6)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5)))))) := by
                  have h := A2.mk K O x hT (2) (2) (1)
                  try rw [show (2) + (1) + 1 + (2) = 6 by lib_nat] at h
                  try rw [show (2) + (1) + 1 = 4 by lib_nat] at h
                  try rw [show (2) + (2) = 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (6)) (Zs K x (8)))) (K.neg (K.mul (Zs K x (5)) (K.add (Zs K x (4)) (Zs K x (6)))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT (2) (2) (0)
                    try rw [show (2) + (0) + 1 + (2) = 5 by lib_nat] at h
                    try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                    try rw [show (2) + (2) = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
                    have h := A2.mk K O x hT (3) (2) (1)
                    try rw [show (2) + (1) + 1 + (3) = 7 by lib_nat] at h
                    try rw [show (2) + (1) + 1 = 4 by lib_nat] at h
                    try rw [show (2) + (3) = 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (7)) (Zs K x (9)))) (K.neg (K.mul (Zs K x (6)) (K.add (Zs K x (4)) (Zs K x (6)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (3) (2) (0)
                      try rw [show (2) + (0) + 1 + (3) = 6 by lib_nat] at h
                      try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                      try rw [show (2) + (3) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (3) (2) (2)
                      try rw [show (2) + (2) + 1 + (3) = 8 by lib_nat] at h
                      try rw [show (2) + (2) + 1 = 5 by lib_nat] at h
                      try rw [show (2) + (3) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (8)) (Zs K x (10)))) (K.neg (K.mul (Zs K x (7)) (K.add (Zs K x (4)) (Zs K x (6)))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7)))))) := by
                        have h := A2.mk K O x hT (4) (2) (0)
                        try rw [show (2) + (0) + 1 + (4) = 7 by lib_nat] at h
                        try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                        try rw [show (2) + (4) = 6 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (10))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
                        have h := A2.mk K O x hT (4) (2) (2)
                        try rw [show (2) + (2) + 1 + (4) = 9 by lib_nat] at h
                        try rw [show (2) + (2) + 1 = 5 by lib_nat] at h
                        try rw [show (2) + (4) = 6 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (9)) (Zs K x (11)))) (K.neg (K.mul (Zs K x (8)) (K.add (Zs K x (4)) (Zs K x (6)))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (4)) (Zs K x (8)))))) := by
                          have h := A2.mk K O x hT (5) (2) (0)
                          try rw [show (2) + (0) + 1 + (5) = 8 by lib_nat] at h
                          try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                          try rw [show (2) + (5) = 7 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (11))) (K.neg (K.mul (Zs K x (6)) (Zs K x (8)))))) := by
                          have h := A2.mk K O x hT (5) (2) (2)
                          try rw [show (2) + (2) + 1 + (5) = 10 by lib_nat] at h
                          try rw [show (2) + (2) + 1 = 5 by lib_nat] at h
                          try rw [show (2) + (5) = 7 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                      | succ w =>
                        rw [show 0 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (w + 10)) (Zs K x (w + 12)))) (K.neg (K.mul (Zs K x (w + 9)) (K.add (Zs K x (4)) (Zs K x (6)))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (4)))))) := by
                          have h := A2.mk K O x hT (1) (2) (w + 5)
                          try rw [show (2) + (w + 5) + 1 + (1) = w + 9 by lib_nat] at h
                          try rw [show (2) + (w + 5) + 1 = w + 8 by lib_nat] at h
                          try rw [show (2) + (1) = 3 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (6)))))) := by
                          have h := A2.mk K O x hT (3) (2) (w + 5)
                          try rw [show (2) + (w + 5) + 1 + (3) = w + 11 by lib_nat] at h
                          try rw [show (2) + (w + 5) + 1 = w + 8 by lib_nat] at h
                          try rw [show (2) + (3) = 5 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
            | succ a =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (K.add (Zs K x (a + 6)) (Zs K x (a + 8)))) (K.neg (K.mul (Zs K x (a + 5)) (K.add (Zs K x (a + 5)) (Zs K x (a + 7)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 6)))))) := by
                  have h := A2.mk K O x hT (2) (a + 3) (1)
                  try rw [show (a + 3) + (1) + 1 + (2) = a + 7 by lib_nat] at h
                  try rw [show (a + 3) + (1) + 1 = a + 5 by lib_nat] at h
                  try rw [show (a + 3) + (2) = a + 5 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 4) (1) (a + 4) (a + 5) (a + 6) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (K.add (Zs K x (a + 7)) (Zs K x (a + 9)))) (K.neg (K.mul (Zs K x (a + 6)) (K.add (Zs K x (a + 5)) (Zs K x (a + 7)))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 7))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 6)))))) := by
                    have h := A2.mk K O x hT (2) (a + 3) (0)
                    try rw [show (a + 3) + (0) + 1 + (2) = a + 6 by lib_nat] at h
                    try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                    try rw [show (a + 3) + (2) = a + 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 7)))))) := by
                    have h := A2.mk K O x hT (3) (a + 3) (1)
                    try rw [show (a + 3) + (1) + 1 + (3) = a + 8 by lib_nat] at h
                    try rw [show (a + 3) + (1) + 1 = a + 5 by lib_nat] at h
                    try rw [show (a + 3) + (3) = a + 6 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (K.add (Zs K x (a + 8)) (Zs K x (a + 10)))) (K.neg (K.mul (Zs K x (a + 7)) (K.add (Zs K x (a + 5)) (Zs K x (a + 7)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 7)))))) := by
                      have h := A2.mk K O x hT (3) (a + 3) (0)
                      try rw [show (a + 3) + (0) + 1 + (3) = a + 7 by lib_nat] at h
                      try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                      try rw [show (a + 3) + (3) = a + 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 7)))))) := by
                      have h := A2.mk K O x hT (3) (a + 3) (2)
                      try rw [show (a + 3) + (2) + 1 + (3) = a + 9 by lib_nat] at h
                      try rw [show (a + 3) + (2) + 1 = a + 6 by lib_nat] at h
                      try rw [show (a + 3) + (3) = a + 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (K.add (Zs K x (a + 9)) (Zs K x (a + 11)))) (K.neg (K.mul (Zs K x (a + 8)) (K.add (Zs K x (a + 5)) (Zs K x (a + 7)))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 8)))))) := by
                        have h := A2.mk K O x hT (4) (a + 3) (0)
                        try rw [show (a + 3) + (0) + 1 + (4) = a + 8 by lib_nat] at h
                        try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                        try rw [show (a + 3) + (4) = a + 7 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 8)))))) := by
                        have h := A2.mk K O x hT (4) (a + 3) (2)
                        try rw [show (a + 3) + (2) + 1 + (4) = a + 10 by lib_nat] at h
                        try rw [show (a + 3) + (2) + 1 = a + 6 by lib_nat] at h
                        try rw [show (a + 3) + (4) = a + 7 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1 + 1) + 1 = a + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (K.add (Zs K x (a + 10)) (Zs K x (a + 12)))) (K.neg (K.mul (Zs K x (a + 9)) (K.add (Zs K x (a + 5)) (Zs K x (a + 7)))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 9)))))) := by
                          have h := A2.mk K O x hT (5) (a + 3) (0)
                          try rw [show (a + 3) + (0) + 1 + (5) = a + 9 by lib_nat] at h
                          try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                          try rw [show (a + 3) + (5) = a + 8 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 9)))))) := by
                          have h := A2.mk K O x hT (5) (a + 3) (2)
                          try rw [show (a + 3) + (2) + 1 + (5) = a + 11 by lib_nat] at h
                          try rw [show (a + 3) + (2) + 1 = a + 6 by lib_nat] at h
                          try rw [show (a + 3) + (5) = a + 8 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                      | succ w =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = a + w + 12 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (K.add (Zs K x (a + w + 11)) (Zs K x (a + w + 13)))) (K.neg (K.mul (Zs K x (a + w + 10)) (K.add (Zs K x (a + 5)) (Zs K x (a + 7)))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + w + 11))) (K.neg (K.mul (Zs K x (a + w + 10)) (Zs K x (a + 5)))))) := by
                          have h := A2.mk K O x hT (1) (a + 3) (w + 5)
                          try rw [show (a + 3) + (w + 5) + 1 + (1) = a + w + 10 by lib_nat] at h
                          try rw [show (a + 3) + (w + 5) + 1 = a + w + 9 by lib_nat] at h
                          try rw [show (a + 3) + (1) = a + 4 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + w + 13))) (K.neg (K.mul (Zs K x (a + w + 10)) (Zs K x (a + 7)))))) := by
                          have h := A2.mk K O x hT (3) (a + 3) (w + 5)
                          try rw [show (a + 3) + (w + 5) + 1 + (3) = a + w + 12 by lib_nat] at h
                          try rw [show (a + 3) + (w + 5) + 1 = a + w + 9 by lib_nat] at h
                          try rw [show (a + 3) + (3) = a + 6 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)

include hx hT hD h1 h10 in
theorem sg5 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (Zs K (Zs K (Zs K x))) (pv2 K x) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul K.zero (Zs K x (3))))))
      exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))) (K.neg (K.mul K.zero (Zs K x (3))))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (Zs K x (1)) (Zs K x (3))))))
          have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (0)) (hx (2))
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3))))))
            have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (1)) (hx (2))
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3))))))
              have t0 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (2)) (hx (2))
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              rw [show 0 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (w + 9)))) (K.neg (K.mul (Zs K x (w + 4)) (Zs K x (3))))))
              have t0 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (w + 4))) := O.mul_nonneg _ _ (hx (2)) (hx (w + 3))
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))) (K.neg (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (Zs K x (1)) (K.add (Zs K x (2)) (Zs K x (4)))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t1 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (1)) (hx (2))
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (Zs K x (2)) (K.add (Zs K x (2)) (Zs K x (4)))))))
            have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (1)) (hx (1))
            have t1 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (1)) (hx (3))
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (Zs K x (3)) (K.add (Zs K x (2)) (Zs K x (4)))))))
              have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (1)) (hx (2))
              have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (2)) (hx (3))
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (Zs K x (4)) (K.add (Zs K x (2)) (Zs K x (4)))))))
                have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (1)) (hx (3))
                have t1 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (3)) (hx (3))
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (w + 10)))) (K.neg (K.mul (Zs K x (w + 5)) (K.add (Zs K x (2)) (Zs K x (4)))))))
                have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (w + 5))) := O.mul_nonneg _ _ (hx (1)) (hx (w + 4))
                have t1 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (w + 5))) := O.mul_nonneg _ _ (hx (3)) (hx (w + 4))
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (Zs K x (1)) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (2))))) := A1.Dn K O x hD (0) (1) (0) (1) (2) (1) (2) (3) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t3 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (2)) (hx (2))
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (Zs K x (2)) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (1)) (hx (2))
            have t3 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (2)) (hx (3))
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (Zs K x (3)) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
              have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (0)) (hx (2))
              have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (2)) (hx (2))
              have t2 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (2)) (hx (4))
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (Zs K x (4)) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
                have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (0)) (hx (3))
                have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (2)) (hx (3))
                have t2 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (3)) (hx (4))
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10)))) (K.neg (K.mul (Zs K x (5)) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
                  have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (0)) (hx (4))
                  have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (2)) (hx (4))
                  have t2 : O.le K.zero (K.mul (Zs K x (5)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (4)) (hx (4))
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (w + 11)))) (K.neg (K.mul (Zs K x (w + 6)) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
                  have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (w + 6))) := O.mul_nonneg _ _ (hx (0)) (hx (w + 5))
                  have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (w + 6))) := O.mul_nonneg _ _ (hx (2)) (hx (w + 5))
                  have t2 : O.le K.zero (K.mul (Zs K x (5)) (Zs K x (w + 6))) := O.mul_nonneg _ _ (hx (4)) (hx (w + 5))
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (Zs K x (2)) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2)))))) := by
              have h := A2.mk K O x hT (1) (0) (0)
              try rw [show (0) + (0) + 1 + (1) = 2 by lib_nat] at h
              try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
              try rw [show (0) + (1) = 1 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
              have h := A2.mk K O x hT (4) (0) (1)
              try rw [show (0) + (1) + 1 + (4) = 6 by lib_nat] at h
              try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
              try rw [show (0) + (4) = 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (Zs K x (3)) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3)))))) := by
                have h := A2.mk K O x hT (2) (0) (0)
                try rw [show (0) + (0) + 1 + (2) = 3 by lib_nat] at h
                try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                try rw [show (0) + (2) = 2 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
                have h := A2.mk K O x hT (3) (0) (1)
                try rw [show (0) + (1) + 1 + (3) = 5 by lib_nat] at h
                try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
                try rw [show (0) + (3) = 3 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (8))) (K.neg (K.mul (Zs K x (3)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT (5) (0) (1)
                try rw [show (0) + (1) + 1 + (5) = 7 by lib_nat] at h
                try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
                try rw [show (0) + (5) = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (Zs K x (4)) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (2)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT (3) (0) (0)
                  try rw [show (0) + (0) + 1 + (3) = 4 by lib_nat] at h
                  try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                  try rw [show (0) + (3) = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT (3) (0) (2)
                  try rw [show (0) + (2) + 1 + (3) = 6 by lib_nat] at h
                  try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
                  try rw [show (0) + (3) = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (9))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                  have h := A2.mk K O x hT (5) (0) (2)
                  try rw [show (0) + (2) + 1 + (5) = 8 by lib_nat] at h
                  try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
                  try rw [show (0) + (5) = 5 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10)))) (K.neg (K.mul (Zs K x (5)) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (2)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT (4) (0) (0)
                    try rw [show (0) + (0) + 1 + (4) = 5 by lib_nat] at h
                    try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                    try rw [show (0) + (4) = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT (4) (0) (2)
                    try rw [show (0) + (2) + 1 + (4) = 7 by lib_nat] at h
                    try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
                    try rw [show (0) + (4) = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (10))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
                    have h := A2.mk K O x hT (5) (0) (3)
                    try rw [show (0) + (3) + 1 + (5) = 9 by lib_nat] at h
                    try rw [show (0) + (3) + 1 = 4 by lib_nat] at h
                    try rw [show (0) + (5) = 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (11)))) (K.neg (K.mul (Zs K x (6)) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (2)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (5) (0) (0)
                      try rw [show (0) + (0) + 1 + (5) = 6 by lib_nat] at h
                      try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                      try rw [show (0) + (5) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (9))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (5) (0) (2)
                      try rw [show (0) + (2) + 1 + (5) = 8 by lib_nat] at h
                      try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
                      try rw [show (0) + (5) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (11))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (5) (0) (4)
                      try rw [show (0) + (4) + 1 + (5) = 10 by lib_nat] at h
                      try rw [show (0) + (4) + 1 = 5 by lib_nat] at h
                      try rw [show (0) + (5) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (K.add (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (w + 12)))) (K.neg (K.mul (Zs K x (w + 7)) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (2)))))) := by
                      have h := A2.mk K O x hT (1) (0) (w + 5)
                      try rw [show (0) + (w + 5) + 1 + (1) = w + 7 by lib_nat] at h
                      try rw [show (0) + (w + 5) + 1 = w + 6 by lib_nat] at h
                      try rw [show (0) + (1) = 1 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (4)))))) := by
                      have h := A2.mk K O x hT (3) (0) (w + 5)
                      try rw [show (0) + (w + 5) + 1 + (3) = w + 9 by lib_nat] at h
                      try rw [show (0) + (w + 5) + 1 = w + 6 by lib_nat] at h
                      try rw [show (0) + (3) = 3 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (5) (0) (w + 5)
                      try rw [show (0) + (w + 5) + 1 + (5) = w + 11 by lib_nat] at h
                      try rw [show (0) + (w + 5) + 1 = w + 6 by lib_nat] at h
                      try rw [show (0) + (5) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (Zs K x (3)) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3)))))) := by
                have h := A2.mk K O x hT (1) (1) (0)
                try rw [show (1) + (0) + 1 + (1) = 3 by lib_nat] at h
                try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                try rw [show (1) + (1) = 2 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT (4) (1) (1)
                try rw [show (1) + (1) + 1 + (4) = 7 by lib_nat] at h
                try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
                try rw [show (1) + (4) = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (Zs K x (4)) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT (2) (1) (0)
                  try rw [show (1) + (0) + 1 + (2) = 4 by lib_nat] at h
                  try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                  try rw [show (1) + (2) = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
                  have h := A2.mk K O x hT (3) (1) (1)
                  try rw [show (1) + (1) + 1 + (3) = 6 by lib_nat] at h
                  try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
                  try rw [show (1) + (3) = 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (9))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT (5) (1) (1)
                  try rw [show (1) + (1) + 1 + (5) = 8 by lib_nat] at h
                  try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
                  try rw [show (1) + (5) = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10)))) (K.neg (K.mul (Zs K x (5)) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT (3) (1) (0)
                    try rw [show (1) + (0) + 1 + (3) = 5 by lib_nat] at h
                    try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                    try rw [show (1) + (3) = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT (3) (1) (2)
                    try rw [show (1) + (2) + 1 + (3) = 7 by lib_nat] at h
                    try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
                    try rw [show (1) + (3) = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (10))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
                    have h := A2.mk K O x hT (5) (1) (2)
                    try rw [show (1) + (2) + 1 + (5) = 9 by lib_nat] at h
                    try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
                    try rw [show (1) + (5) = 6 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (11)))) (K.neg (K.mul (Zs K x (6)) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (3)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (4) (1) (0)
                      try rw [show (1) + (0) + 1 + (4) = 6 by lib_nat] at h
                      try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                      try rw [show (1) + (4) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (9))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (4) (1) (2)
                      try rw [show (1) + (2) + 1 + (4) = 8 by lib_nat] at h
                      try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
                      try rw [show (1) + (4) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (11))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
                      have h := A2.mk K O x hT (5) (1) (3)
                      try rw [show (1) + (3) + 1 + (5) = 10 by lib_nat] at h
                      try rw [show (1) + (3) + 1 = 5 by lib_nat] at h
                      try rw [show (1) + (5) = 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (12)))) (K.neg (K.mul (Zs K x (7)) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (3)) (Zs K x (7)))))) := by
                        have h := A2.mk K O x hT (5) (1) (0)
                        try rw [show (1) + (0) + 1 + (5) = 7 by lib_nat] at h
                        try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                        try rw [show (1) + (5) = 6 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (10))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
                        have h := A2.mk K O x hT (5) (1) (2)
                        try rw [show (1) + (2) + 1 + (5) = 9 by lib_nat] at h
                        try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
                        try rw [show (1) + (5) = 6 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (12))) (K.neg (K.mul (Zs K x (7)) (Zs K x (7)))))) := by
                        have h := A2.mk K O x hT (5) (1) (4)
                        try rw [show (1) + (4) + 1 + (5) = 11 by lib_nat] at h
                        try rw [show (1) + (4) + 1 = 6 by lib_nat] at h
                        try rw [show (1) + (5) = 6 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
                    | succ w =>
                      rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (K.add (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (w + 13)))) (K.neg (K.mul (Zs K x (w + 8)) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (3)))))) := by
                        have h := A2.mk K O x hT (1) (1) (w + 5)
                        try rw [show (1) + (w + 5) + 1 + (1) = w + 8 by lib_nat] at h
                        try rw [show (1) + (w + 5) + 1 = w + 7 by lib_nat] at h
                        try rw [show (1) + (1) = 2 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (5)))))) := by
                        have h := A2.mk K O x hT (3) (1) (w + 5)
                        try rw [show (1) + (w + 5) + 1 + (3) = w + 10 by lib_nat] at h
                        try rw [show (1) + (w + 5) + 1 = w + 7 by lib_nat] at h
                        try rw [show (1) + (3) = 4 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 13))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (7)))))) := by
                        have h := A2.mk K O x hT (5) (1) (w + 5)
                        try rw [show (1) + (w + 5) + 1 + (5) = w + 12 by lib_nat] at h
                        try rw [show (1) + (w + 5) + 1 = w + 7 by lib_nat] at h
                        try rw [show (1) + (5) = 6 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
          | succ i =>
            cases i with
            | zero =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (Zs K x (4)) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT (1) (2) (0)
                  try rw [show (2) + (0) + 1 + (1) = 4 by lib_nat] at h
                  try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                  try rw [show (2) + (1) = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT (4) (2) (1)
                  try rw [show (2) + (1) + 1 + (4) = 8 by lib_nat] at h
                  try rw [show (2) + (1) + 1 = 4 by lib_nat] at h
                  try rw [show (2) + (4) = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10)))) (K.neg (K.mul (Zs K x (5)) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT (2) (2) (0)
                    try rw [show (2) + (0) + 1 + (2) = 5 by lib_nat] at h
                    try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                    try rw [show (2) + (2) = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
                    have h := A2.mk K O x hT (3) (2) (1)
                    try rw [show (2) + (1) + 1 + (3) = 7 by lib_nat] at h
                    try rw [show (2) + (1) + 1 = 4 by lib_nat] at h
                    try rw [show (2) + (3) = 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (10))) (K.neg (K.mul (Zs K x (5)) (Zs K x (8)))))) := by
                    have h := A2.mk K O x hT (5) (2) (1)
                    try rw [show (2) + (1) + 1 + (5) = 9 by lib_nat] at h
                    try rw [show (2) + (1) + 1 = 4 by lib_nat] at h
                    try rw [show (2) + (5) = 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (K.add (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (11)))) (K.neg (K.mul (Zs K x (6)) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (3) (2) (0)
                      try rw [show (2) + (0) + 1 + (3) = 6 by lib_nat] at h
                      try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                      try rw [show (2) + (3) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (3) (2) (2)
                      try rw [show (2) + (2) + 1 + (3) = 8 by lib_nat] at h
                      try rw [show (2) + (2) + 1 = 5 by lib_nat] at h
                      try rw [show (2) + (3) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (11))) (K.neg (K.mul (Zs K x (6)) (Zs K x (8)))))) := by
                      have h := A2.mk K O x hT (5) (2) (2)
                      try rw [show (2) + (2) + 1 + (5) = 10 by lib_nat] at h
                      try rw [show (2) + (2) + 1 = 5 by lib_nat] at h
                      try rw [show (2) + (5) = 7 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (K.add (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (12)))) (K.neg (K.mul (Zs K x (7)) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7)))))) := by
                        have h := A2.mk K O x hT (4) (2) (0)
                        try rw [show (2) + (0) + 1 + (4) = 7 by lib_nat] at h
                        try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                        try rw [show (2) + (4) = 6 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (10))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
                        have h := A2.mk K O x hT (4) (2) (2)
                        try rw [show (2) + (2) + 1 + (4) = 9 by lib_nat] at h
                        try rw [show (2) + (2) + 1 = 5 by lib_nat] at h
                        try rw [show (2) + (4) = 6 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (12))) (K.neg (K.mul (Zs K x (7)) (Zs K x (8)))))) := by
                        have h := A2.mk K O x hT (5) (2) (3)
                        try rw [show (2) + (3) + 1 + (5) = 11 by lib_nat] at h
                        try rw [show (2) + (3) + 1 = 6 by lib_nat] at h
                        try rw [show (2) + (5) = 7 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (K.add (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (13)))) (K.neg (K.mul (Zs K x (8)) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (4)) (Zs K x (8)))))) := by
                          have h := A2.mk K O x hT (5) (2) (0)
                          try rw [show (2) + (0) + 1 + (5) = 8 by lib_nat] at h
                          try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                          try rw [show (2) + (5) = 7 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (11))) (K.neg (K.mul (Zs K x (6)) (Zs K x (8)))))) := by
                          have h := A2.mk K O x hT (5) (2) (2)
                          try rw [show (2) + (2) + 1 + (5) = 10 by lib_nat] at h
                          try rw [show (2) + (2) + 1 = 5 by lib_nat] at h
                          try rw [show (2) + (5) = 7 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (13))) (K.neg (K.mul (Zs K x (8)) (Zs K x (8)))))) := by
                          have h := A2.mk K O x hT (5) (2) (4)
                          try rw [show (2) + (4) + 1 + (5) = 12 by lib_nat] at h
                          try rw [show (2) + (4) + 1 = 7 by lib_nat] at h
                          try rw [show (2) + (5) = 7 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
                      | succ w =>
                        rw [show 0 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (K.add (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (w + 14)))) (K.neg (K.mul (Zs K x (w + 9)) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (4)))))) := by
                          have h := A2.mk K O x hT (1) (2) (w + 5)
                          try rw [show (2) + (w + 5) + 1 + (1) = w + 9 by lib_nat] at h
                          try rw [show (2) + (w + 5) + 1 = w + 8 by lib_nat] at h
                          try rw [show (2) + (1) = 3 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (6)))))) := by
                          have h := A2.mk K O x hT (3) (2) (w + 5)
                          try rw [show (2) + (w + 5) + 1 + (3) = w + 11 by lib_nat] at h
                          try rw [show (2) + (w + 5) + 1 = w + 8 by lib_nat] at h
                          try rw [show (2) + (3) = 5 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 14))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (8)))))) := by
                          have h := A2.mk K O x hT (5) (2) (w + 5)
                          try rw [show (2) + (w + 5) + 1 + (5) = w + 13 by lib_nat] at h
                          try rw [show (2) + (w + 5) + 1 = w + 8 by lib_nat] at h
                          try rw [show (2) + (5) = 7 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
            | succ a =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (K.add (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10)))) (K.neg (K.mul (Zs K x (a + 5)) (K.add (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 6))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 5)))))) := by
                  have h := A2.mk K O x hT (1) (a + 3) (0)
                  try rw [show (a + 3) + (0) + 1 + (1) = a + 5 by lib_nat] at h
                  try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                  try rw [show (a + 3) + (1) = a + 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 8)))))) := by
                  have h := A2.mk K O x hT (4) (a + 3) (1)
                  try rw [show (a + 3) + (1) + 1 + (4) = a + 9 by lib_nat] at h
                  try rw [show (a + 3) + (1) + 1 = a + 5 by lib_nat] at h
                  try rw [show (a + 3) + (4) = a + 7 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 4) (3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (K.add (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 11)))) (K.neg (K.mul (Zs K x (a + 6)) (K.add (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9)))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 7))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 6)))))) := by
                    have h := A2.mk K O x hT (2) (a + 3) (0)
                    try rw [show (a + 3) + (0) + 1 + (2) = a + 6 by lib_nat] at h
                    try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                    try rw [show (a + 3) + (2) = a + 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 7)))))) := by
                    have h := A2.mk K O x hT (3) (a + 3) (1)
                    try rw [show (a + 3) + (1) + 1 + (3) = a + 8 by lib_nat] at h
                    try rw [show (a + 3) + (1) + 1 = a + 5 by lib_nat] at h
                    try rw [show (a + 3) + (3) = a + 6 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 9)))))) := by
                    have h := A2.mk K O x hT (5) (a + 3) (1)
                    try rw [show (a + 3) + (1) + 1 + (5) = a + 10 by lib_nat] at h
                    try rw [show (a + 3) + (1) + 1 = a + 5 by lib_nat] at h
                    try rw [show (a + 3) + (5) = a + 8 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (K.add (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 12)))) (K.neg (K.mul (Zs K x (a + 7)) (K.add (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 7)))))) := by
                      have h := A2.mk K O x hT (3) (a + 3) (0)
                      try rw [show (a + 3) + (0) + 1 + (3) = a + 7 by lib_nat] at h
                      try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                      try rw [show (a + 3) + (3) = a + 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 7)))))) := by
                      have h := A2.mk K O x hT (3) (a + 3) (2)
                      try rw [show (a + 3) + (2) + 1 + (3) = a + 9 by lib_nat] at h
                      try rw [show (a + 3) + (2) + 1 = a + 6 by lib_nat] at h
                      try rw [show (a + 3) + (3) = a + 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 9)))))) := by
                      have h := A2.mk K O x hT (5) (a + 3) (2)
                      try rw [show (a + 3) + (2) + 1 + (5) = a + 11 by lib_nat] at h
                      try rw [show (a + 3) + (2) + 1 = a + 6 by lib_nat] at h
                      try rw [show (a + 3) + (5) = a + 8 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (K.add (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 13)))) (K.neg (K.mul (Zs K x (a + 8)) (K.add (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9)))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 8)))))) := by
                        have h := A2.mk K O x hT (4) (a + 3) (0)
                        try rw [show (a + 3) + (0) + 1 + (4) = a + 8 by lib_nat] at h
                        try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                        try rw [show (a + 3) + (4) = a + 7 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 8)))))) := by
                        have h := A2.mk K O x hT (4) (a + 3) (2)
                        try rw [show (a + 3) + (2) + 1 + (4) = a + 10 by lib_nat] at h
                        try rw [show (a + 3) + (2) + 1 = a + 6 by lib_nat] at h
                        try rw [show (a + 3) + (4) = a + 7 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 13))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 9)))))) := by
                        have h := A2.mk K O x hT (5) (a + 3) (3)
                        try rw [show (a + 3) + (3) + 1 + (5) = a + 12 by lib_nat] at h
                        try rw [show (a + 3) + (3) + 1 = a + 7 by lib_nat] at h
                        try rw [show (a + 3) + (5) = a + 8 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1 + 1) + 1 = a + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (K.add (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 14)))) (K.neg (K.mul (Zs K x (a + 9)) (K.add (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9)))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 9)))))) := by
                          have h := A2.mk K O x hT (5) (a + 3) (0)
                          try rw [show (a + 3) + (0) + 1 + (5) = a + 9 by lib_nat] at h
                          try rw [show (a + 3) + (0) + 1 = a + 4 by lib_nat] at h
                          try rw [show (a + 3) + (5) = a + 8 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 9)))))) := by
                          have h := A2.mk K O x hT (5) (a + 3) (2)
                          try rw [show (a + 3) + (2) + 1 + (5) = a + 11 by lib_nat] at h
                          try rw [show (a + 3) + (2) + 1 = a + 6 by lib_nat] at h
                          try rw [show (a + 3) + (5) = a + 8 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 14))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 9)))))) := by
                          have h := A2.mk K O x hT (5) (a + 3) (4)
                          try rw [show (a + 3) + (4) + 1 + (5) = a + 13 by lib_nat] at h
                          try rw [show (a + 3) + (4) + 1 = a + 8 by lib_nat] at h
                          try rw [show (a + 3) + (5) = a + 8 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
                      | succ w =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = a + w + 12 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (K.add (K.add (Zs K x (a + w + 11)) (Zs K x (a + w + 13))) (Zs K x (a + w + 15)))) (K.neg (K.mul (Zs K x (a + w + 10)) (K.add (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9)))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + w + 11))) (K.neg (K.mul (Zs K x (a + w + 10)) (Zs K x (a + 5)))))) := by
                          have h := A2.mk K O x hT (1) (a + 3) (w + 5)
                          try rw [show (a + 3) + (w + 5) + 1 + (1) = a + w + 10 by lib_nat] at h
                          try rw [show (a + 3) + (w + 5) + 1 = a + w + 9 by lib_nat] at h
                          try rw [show (a + 3) + (1) = a + 4 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + w + 13))) (K.neg (K.mul (Zs K x (a + w + 10)) (Zs K x (a + 7)))))) := by
                          have h := A2.mk K O x hT (3) (a + 3) (w + 5)
                          try rw [show (a + 3) + (w + 5) + 1 + (3) = a + w + 12 by lib_nat] at h
                          try rw [show (a + 3) + (w + 5) + 1 = a + w + 9 by lib_nat] at h
                          try rw [show (a + 3) + (3) = a + 6 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + w + 15))) (K.neg (K.mul (Zs K x (a + w + 10)) (Zs K x (a + 9)))))) := by
                          have h := A2.mk K O x hT (5) (a + 3) (w + 5)
                          try rw [show (a + 3) + (w + 5) + 1 + (5) = a + w + 14 by lib_nat] at h
                          try rw [show (a + 3) + (w + 5) + 1 = a + w + 9 by lib_nat] at h
                          try rw [show (a + 3) + (5) = a + 8 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)

include hx hT hD h1 h10 in
theorem sg6 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (Zs K x) x i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (2))) (K.neg (K.mul (Zs K x (1)) (Zs K x (1))))))
      have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (1))) := O.mul_nonneg _ _ (hx (0)) (hx (0))
      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (1))))))
        have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (2))) := O.mul_nonneg _ _ (hx (0)) (hx (1))
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (1))))))
          have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (0)) (hx (2))
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (1))))))
            have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (0)) (hx (3))
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (1))))))
              have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (0)) (hx (4))
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              rw [show 0 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (w + 7))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (1))))))
              have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (w + 6))) := O.mul_nonneg _ _ (hx (0)) (hx (w + 5))
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2))))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2)))))) := by
          have h := A2.mk K O x hT (1) (0) (0)
          try rw [show (0) + (0) + 1 + (1) = 2 by lib_nat] at h
          try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
          try rw [show (0) + (1) = 1 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (2))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3)))))) := by
            have h := A2.mk K O x hT (2) (0) (0)
            try rw [show (0) + (0) + 1 + (2) = 3 by lib_nat] at h
            try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
            try rw [show (0) + (2) = 2 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (2))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (2)) (Zs K x (4)))))) := by
              have h := A2.mk K O x hT (3) (0) (0)
              try rw [show (0) + (0) + 1 + (3) = 4 by lib_nat] at h
              try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
              try rw [show (0) + (3) = 3 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (2))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (2)) (Zs K x (5)))))) := by
                have h := A2.mk K O x hT (4) (0) (0)
                try rw [show (0) + (0) + 1 + (4) = 5 by lib_nat] at h
                try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                try rw [show (0) + (4) = 4 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (2))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (2)) (Zs K x (6)))))) := by
                  have h := A2.mk K O x hT (5) (0) (0)
                  try rw [show (0) + (0) + 1 + (5) = 6 by lib_nat] at h
                  try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                  try rw [show (0) + (5) = 5 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (2))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (2)))))) := by
                  have h := A2.mk K O x hT (1) (0) (w + 5)
                  try rw [show (0) + (w + 5) + 1 + (1) = w + 7 by lib_nat] at h
                  try rw [show (0) + (w + 5) + 1 = w + 6 by lib_nat] at h
                  try rw [show (0) + (1) = 1 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3)))))) := by
            have h := A2.mk K O x hT (1) (1) (0)
            try rw [show (1) + (0) + 1 + (1) = 3 by lib_nat] at h
            try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
            try rw [show (1) + (1) = 2 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (3))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
              have h := A2.mk K O x hT (2) (1) (0)
              try rw [show (1) + (0) + 1 + (2) = 4 by lib_nat] at h
              try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
              try rw [show (1) + (2) = 3 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (3))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
                have h := A2.mk K O x hT (3) (1) (0)
                try rw [show (1) + (0) + 1 + (3) = 5 by lib_nat] at h
                try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                try rw [show (1) + (3) = 4 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (3))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (3)) (Zs K x (6)))))) := by
                  have h := A2.mk K O x hT (4) (1) (0)
                  try rw [show (1) + (0) + 1 + (4) = 6 by lib_nat] at h
                  try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                  try rw [show (1) + (4) = 5 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (3))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (3)) (Zs K x (7)))))) := by
                    have h := A2.mk K O x hT (5) (1) (0)
                    try rw [show (1) + (0) + 1 + (5) = 7 by lib_nat] at h
                    try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                    try rw [show (1) + (5) = 6 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (3))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (3)))))) := by
                    have h := A2.mk K O x hT (1) (1) (w + 5)
                    try rw [show (1) + (w + 5) + 1 + (1) = w + 8 by lib_nat] at h
                    try rw [show (1) + (w + 5) + 1 = w + 7 by lib_nat] at h
                    try rw [show (1) + (1) = 2 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
              have h := A2.mk K O x hT (1) (2) (0)
              try rw [show (2) + (0) + 1 + (1) = 4 by lib_nat] at h
              try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
              try rw [show (2) + (1) = 3 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (4))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
                have h := A2.mk K O x hT (2) (2) (0)
                try rw [show (2) + (0) + 1 + (2) = 5 by lib_nat] at h
                try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                try rw [show (2) + (2) = 4 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (4))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                  have h := A2.mk K O x hT (3) (2) (0)
                  try rw [show (2) + (0) + 1 + (3) = 6 by lib_nat] at h
                  try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                  try rw [show (2) + (3) = 5 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (4))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7)))))) := by
                    have h := A2.mk K O x hT (4) (2) (0)
                    try rw [show (2) + (0) + 1 + (4) = 7 by lib_nat] at h
                    try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                    try rw [show (2) + (4) = 6 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (4))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (4)) (Zs K x (8)))))) := by
                      have h := A2.mk K O x hT (5) (2) (0)
                      try rw [show (2) + (0) + 1 + (5) = 8 by lib_nat] at h
                      try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                      try rw [show (2) + (5) = 7 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (4))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (4)))))) := by
                      have h := A2.mk K O x hT (1) (2) (w + 5)
                      try rw [show (2) + (w + 5) + 1 + (1) = w + 9 by lib_nat] at h
                      try rw [show (2) + (w + 5) + 1 = w + 8 by lib_nat] at h
                      try rw [show (2) + (1) = 3 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5)))))) := by
                have h := A2.mk K O x hT (1) (3) (0)
                try rw [show (3) + (0) + 1 + (1) = 5 by lib_nat] at h
                try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                try rw [show (3) + (1) = 4 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (5))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
                  have h := A2.mk K O x hT (2) (3) (0)
                  try rw [show (3) + (0) + 1 + (2) = 6 by lib_nat] at h
                  try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                  try rw [show (3) + (2) = 5 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (5))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
                    have h := A2.mk K O x hT (3) (3) (0)
                    try rw [show (3) + (0) + 1 + (3) = 7 by lib_nat] at h
                    try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                    try rw [show (3) + (3) = 6 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (5))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (5)) (Zs K x (8)))))) := by
                      have h := A2.mk K O x hT (4) (3) (0)
                      try rw [show (3) + (0) + 1 + (4) = 8 by lib_nat] at h
                      try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                      try rw [show (3) + (4) = 7 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (5))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (10))) (K.neg (K.mul (Zs K x (5)) (Zs K x (9)))))) := by
                        have h := A2.mk K O x hT (5) (3) (0)
                        try rw [show (3) + (0) + 1 + (5) = 9 by lib_nat] at h
                        try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                        try rw [show (3) + (5) = 8 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (5))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (5)))))) := by
                        have h := A2.mk K O x hT (1) (3) (w + 5)
                        try rw [show (3) + (w + 5) + 1 + (1) = w + 10 by lib_nat] at h
                        try rw [show (3) + (w + 5) + 1 = w + 9 by lib_nat] at h
                        try rw [show (3) + (1) = 4 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ i =>
            cases i with
            | zero =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6)))))) := by
                  have h := A2.mk K O x hT (1) (4) (0)
                  try rw [show (4) + (0) + 1 + (1) = 6 by lib_nat] at h
                  try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                  try rw [show (4) + (1) = 5 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (6))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
                    have h := A2.mk K O x hT (2) (4) (0)
                    try rw [show (4) + (0) + 1 + (2) = 7 by lib_nat] at h
                    try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                    try rw [show (4) + (2) = 6 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (6))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (6)) (Zs K x (8)))))) := by
                      have h := A2.mk K O x hT (3) (4) (0)
                      try rw [show (4) + (0) + 1 + (3) = 8 by lib_nat] at h
                      try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                      try rw [show (4) + (3) = 7 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (6))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (10))) (K.neg (K.mul (Zs K x (6)) (Zs K x (9)))))) := by
                        have h := A2.mk K O x hT (4) (4) (0)
                        try rw [show (4) + (0) + 1 + (4) = 9 by lib_nat] at h
                        try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                        try rw [show (4) + (4) = 8 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (11))) (K.neg (K.mul (Zs K x (10)) (Zs K x (6))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (11))) (K.neg (K.mul (Zs K x (6)) (Zs K x (10)))))) := by
                          have h := A2.mk K O x hT (5) (4) (0)
                          try rw [show (4) + (0) + 1 + (5) = 10 by lib_nat] at h
                          try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                          try rw [show (4) + (5) = 9 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                      | succ w =>
                        rw [show 0 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (6))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (6)))))) := by
                          have h := A2.mk K O x hT (1) (4) (w + 5)
                          try rw [show (4) + (w + 5) + 1 + (1) = w + 11 by lib_nat] at h
                          try rw [show (4) + (w + 5) + 1 = w + 10 by lib_nat] at h
                          try rw [show (4) + (1) = 5 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ a =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 7))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 7)))))) := by
                  have h := A2.mk K O x hT (1) (a + 5) (0)
                  try rw [show (a + 5) + (0) + 1 + (1) = a + 7 by lib_nat] at h
                  try rw [show (a + 5) + (0) + 1 = a + 6 by lib_nat] at h
                  try rw [show (a + 5) + (1) = a + 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 7))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 8)))))) := by
                    have h := A2.mk K O x hT (2) (a + 5) (0)
                    try rw [show (a + 5) + (0) + 1 + (2) = a + 8 by lib_nat] at h
                    try rw [show (a + 5) + (0) + 1 = a + 6 by lib_nat] at h
                    try rw [show (a + 5) + (2) = a + 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 7))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 9)))))) := by
                      have h := A2.mk K O x hT (3) (a + 5) (0)
                      try rw [show (a + 5) + (0) + 1 + (3) = a + 9 by lib_nat] at h
                      try rw [show (a + 5) + (0) + 1 = a + 6 by lib_nat] at h
                      try rw [show (a + 5) + (3) = a + 8 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 7))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 10)))))) := by
                        have h := A2.mk K O x hT (4) (a + 5) (0)
                        try rw [show (a + 5) + (0) + 1 + (4) = a + 10 by lib_nat] at h
                        try rw [show (a + 5) + (0) + 1 = a + 6 by lib_nat] at h
                        try rw [show (a + 5) + (4) = a + 9 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1 + 1) + 1 = a + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 11)) (Zs K x (a + 7))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 11)))))) := by
                          have h := A2.mk K O x hT (5) (a + 5) (0)
                          try rw [show (a + 5) + (0) + 1 + (5) = a + 11 by lib_nat] at h
                          try rw [show (a + 5) + (0) + 1 = a + 6 by lib_nat] at h
                          try rw [show (a + 5) + (5) = a + 10 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                      | succ w =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = a + w + 12 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + w + 13))) (K.neg (K.mul (Zs K x (a + w + 12)) (Zs K x (a + 7))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + w + 13))) (K.neg (K.mul (Zs K x (a + w + 12)) (Zs K x (a + 7)))))) := by
                          have h := A2.mk K O x hT (1) (a + 5) (w + 5)
                          try rw [show (a + 5) + (w + 5) + 1 + (1) = a + w + 12 by lib_nat] at h
                          try rw [show (a + 5) + (w + 5) + 1 = a + w + 11 by lib_nat] at h
                          try rw [show (a + 5) + (1) = a + 6 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

include hx hT hD h1 h10 in
theorem sg7 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (Zs K (pv4 K x)) (Zs K (pv3 K x)) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (4))) (K.neg (K.mul (Zs K x (5)) K.zero))))
      exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) K.zero))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) K.zero))))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) K.zero))))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) K.zero))))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
            | succ w =>
              rw [show 0 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (K.add (Zs K x (w + 3)) (Zs K x (w + 5))) (Zs K x (w + 7))) (Zs K x (w + 9)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (w + 2)) (Zs K x (w + 4))) (Zs K x (w + 6))) (Zs K x (w + 8))) (Zs K x (w + 10))) K.zero))))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))))))
        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (4))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (Zs K x (4))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (Zs K x (4))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (Zs K x (10))) (Zs K x (4))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (K.add (K.add (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (w + 8))) (Zs K x (w + 10)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (w + 3)) (Zs K x (w + 5))) (Zs K x (w + 7))) (Zs K x (w + 9))) (Zs K x (w + 11))) (Zs K x (4))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 7))))) := A1.Dn K O x hD (0) (w + 6) (0) (1) (2) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 6))))) := A1.Dn K O x hD (1) (w + 4) (1) (2) (3) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 8))))) := A1.Dn K O x hD (1) (w + 6) (1) (2) (3) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 5))))) := A1.Dn K O x hD (2) (w + 2) (2) (3) (4) (w + 4) (w + 5) (w + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 7))))) := A1.Dn K O x hD (2) (w + 4) (2) (3) (4) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 3)) (Zs K x (w + 5))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 4))))) := A1.Dn K O x hD (3) (w) (3) (4) (5) (w + 3) (w + 4) (w + 5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 6))))) := A1.Dn K O x hD (3) (w + 2) (3) (4) (5) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 8))))) := A1.Dn K O x hD (3) (w + 4) (3) (4) (5) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 10))))) := A1.Dn K O x hD (3) (w + 6) (3) (4) (5) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (K.add (Zs K x (3)) (Zs K x (5)))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (Zs K x (3)) (Zs K x (5)))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (Zs K x (3)) (Zs K x (5)))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (Zs K x (10))) (K.add (Zs K x (3)) (Zs K x (5)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (7))))) := A1.Dn K O x hD (0) (6) (0) (1) (2) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (8))))) := A1.Dn K O x hD (1) (6) (1) (2) (3) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (9))))) := A1.Dn K O x hD (2) (6) (2) (3) (4) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) t13) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (Zs K x (11))) (K.add (Zs K x (3)) (Zs K x (5)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (8))))) := A1.Dn K O x hD (0) (7) (0) (1) (2) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (9))))) := A1.Dn K O x hD (1) (7) (1) (2) (3) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (10))))) := A1.Dn K O x hD (2) (7) (2) (3) (4) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t16 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (10))))) := A1.Dn K O x hD (4) (5) (4) (5) (6) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12  -- (+35 chars; full line in the Zenodo source)
                | succ w =>
                  rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (K.add (K.add (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (w + 9))) (Zs K x (w + 11)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (w + 8))) (Zs K x (w + 10))) (Zs K x (w + 12))) (K.add (Zs K x (3)) (Zs K x (5)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 7))))) := A1.Dn K O x hD (0) (w + 6) (0) (1) (2) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 9))))) := A1.Dn K O x hD (0) (w + 8) (0) (1) (2) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 6))))) := A1.Dn K O x hD (1) (w + 4) (1) (2) (3) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 8))))) := A1.Dn K O x hD (1) (w + 6) (1) (2) (3) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 8))))) := A1.Dn K O x hD (1) (w + 6) (1) (2) (3) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 10))))) := A1.Dn K O x hD (1) (w + 8) (1) (2) (3) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 5))))) := A1.Dn K O x hD (2) (w + 2) (2) (3) (4) (w + 4) (w + 5) (w + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 7))))) := A1.Dn K O x hD (2) (w + 4) (2) (3) (4) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 7))))) := A1.Dn K O x hD (2) (w + 4) (2) (3) (4) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 11))))) := A1.Dn K O x hD (2) (w + 8) (2) (3) (4) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 6))))) := A1.Dn K O x hD (3) (w + 2) (3) (4) (5) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 8))))) := A1.Dn K O x hD (3) (w + 4) (3) (4) (5) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 10))))) := A1.Dn K O x hD (3) (w + 6) (3) (4) (5) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 5))))) := A1.Dn K O x hD (4) (w) (4) (5) (6) (w + 4) (w + 5) (w + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t16 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 7))))) := A1.Dn K O x hD (4) (w + 2) (4) (5) (6) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t17 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 9))))) := A1.Dn K O x hD (4) (w + 4) (4) (5) (6) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t18 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 11))))) := A1.Dn K O x hD (4) (w + 6) (4) (5) (6) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3)  -- (+83 chars; full line in the Zenodo source)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (7))))) := A1.Dn K O x hD (5) (1) (5) (6) (7) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (7))))) := A1.Dn K O x hD (0) (6) (0) (1) (2) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (8))))) := A1.Dn K O x hD (1) (6) (1) (2) (3) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (8))))) := A1.Dn K O x hD (5) (2) (5) (6) (7) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (Zs K x (10))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (8))))) := A1.Dn K O x hD (0) (7) (0) (1) (2) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (9))))) := A1.Dn K O x hD (1) (7) (1) (2) (3) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t16 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (7))))) := A1.Dn K O x hD (5) (1) (5) (6) (7) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t17 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))))) := A1.Dn K O x hD (5) (3) (5) (6) (7) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8)   -- (+57 chars; full line in the Zenodo source)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (Zs K x (11))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (7))))) := A1.Dn K O x hD (0) (6) (0) (1) (2) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (9))))) := A1.Dn K O x hD (0) (8) (0) (1) (2) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (8))))) := A1.Dn K O x hD (1) (6) (1) (2) (3) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (8))))) := A1.Dn K O x hD (1) (6) (1) (2) (3) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (10))))) := A1.Dn K O x hD (1) (8) (1) (2) (3) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (9))))) := A1.Dn K O x hD (2) (6) (2) (3) (4) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t16 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (10))))) := A1.Dn K O x hD (3) (6) (3) (4) (5) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t17 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t18 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t19 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (8))))) := A1.Dn K O x hD (5) (2) (5) (6) (7) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t20 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (10))))) := A1.Dn K O x hD (5) (4) (5) (6) (7) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O  -- (+131 chars; full line in the Zenodo source)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (Zs K x (11)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10))) (Zs K x (12))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (8))))) := A1.Dn K O x hD (0) (7) (0) (1) (2) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (10))))) := A1.Dn K O x hD (0) (9) (0) (1) (2) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (9))))) := A1.Dn K O x hD (1) (7) (1) (2) (3) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (9))))) := A1.Dn K O x hD (1) (7) (1) (2) (3) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (11))))) := A1.Dn K O x hD (1) (9) (1) (2) (3) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (10))))) := A1.Dn K O x hD (2) (7) (2) (3) (4) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t16 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t17 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t18 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (11))))) := A1.Dn K O x hD (3) (7) (3) (4) (5) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t19 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t20 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (10))))) := A1.Dn K O x hD (4) (5) (4) (5) (6) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t21 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (7))))) := A1.Dn K O x hD (5) (1) (5) (6) (7) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t22 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))))) := A1.Dn K O x hD (5) (3) (5) (6) (7) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t23 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (11))))) := A1.Dn K O x hD (5) (5) (5) (6) (7) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K  -- (+205 chars; full line in the Zenodo source)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (w + 10))) (Zs K x (w + 12)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (w + 9))) (Zs K x (w + 11))) (Zs K x (w + 13))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 7))))) := A1.Dn K O x hD (0) (w + 6) (0) (1) (2) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 9))))) := A1.Dn K O x hD (0) (w + 8) (0) (1) (2) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 11))))) := A1.Dn K O x hD (0) (w + 10) (0) (1) (2) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 6))))) := A1.Dn K O x hD (1) (w + 4) (1) (2) (3) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 8))))) := A1.Dn K O x hD (1) (w + 6) (1) (2) (3) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 8))))) := A1.Dn K O x hD (1) (w + 6) (1) (2) (3) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 10))))) := A1.Dn K O x hD (1) (w + 8) (1) (2) (3) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 10))))) := A1.Dn K O x hD (1) (w + 8) (1) (2) (3) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 12))))) := A1.Dn K O x hD (1) (w + 10) (1) (2) (3) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 7))))) := A1.Dn K O x hD (2) (w + 4) (2) (3) (4) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 11))))) := A1.Dn K O x hD (2) (w + 8) (2) (3) (4) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 6))))) := A1.Dn K O x hD (3) (w + 2) (3) (4) (5) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 8))))) := A1.Dn K O x hD (3) (w + 4) (3) (4) (5) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 8))))) := A1.Dn K O x hD (3) (w + 4) (3) (4) (5) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t16 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 10))))) := A1.Dn K O x hD (3) (w + 6) (3) (4) (5) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t17 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 10))))) := A1.Dn K O x hD (3) (w + 6) (3) (4) (5) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t18 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 12))))) := A1.Dn K O x hD (3) (w + 8) (3) (4) (5) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t19 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 7))))) := A1.Dn K O x hD (4) (w + 2) (4) (5) (6) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t20 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 9))))) := A1.Dn K O x hD (4) (w + 4) (4) (5) (6) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t21 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 11))))) := A1.Dn K O x hD (4) (w + 6) (4) (5) (6) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t22 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 6))))) := A1.Dn K O x hD (5) (w) (5) (6) (7) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t23 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 8))))) := A1.Dn K O x hD (5) (w + 2) (5) (6) (7) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t24 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 10))))) := A1.Dn K O x hD (5) (w + 4) (5) (6) (7) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t25 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 12))))) := A1.Dn K O x hD (5) (w + 6) (5) (6) (7) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K  -- (+253 chars; full line in the Zenodo source)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7)))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (2))))) := A1.Dn K O x hD (0) (1) (0) (1) (2) (1) (2) (3) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (8))))) := A1.Dn K O x hD (0) (7) (0) (1) (2) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (8))))) := A1.Dn K O x hD (6) (1) (6) (7) (8) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (Zs K x (10))) (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (7))))) := A1.Dn K O x hD (0) (6) (0) (1) (2) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (9))))) := A1.Dn K O x hD (0) (8) (0) (1) (2) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (8))))) := A1.Dn K O x hD (1) (6) (1) (2) (3) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (9))))) := A1.Dn K O x hD (2) (6) (2) (3) (4) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (8))))) := A1.Dn K O x hD (5) (2) (5) (6) (7) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (9))))) := A1.Dn K O x hD (6) (2) (6) (7) (8) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) t13) t14) t15) (by   -- (+9 chars; full line in the Zenodo source)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (Zs K x (11))) (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))))))  -- (+1 chars; full line in the Zenodo source)
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (8))))) := A1.Dn K O x hD (0) (7) (0) (1) (2) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (10))))) := A1.Dn K O x hD (0) (9) (0) (1) (2) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (9))))) := A1.Dn K O x hD (1) (7) (1) (2) (3) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (10))))) := A1.Dn K O x hD (2) (7) (2) (3) (4) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t16 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t17 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t18 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (10))))) := A1.Dn K O x hD (4) (5) (4) (5) (6) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t19 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))))) := A1.Dn K O x hD (5) (3) (5) (6) (7) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t20 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (8))))) := A1.Dn K O x hD (6) (1) (6) (7) (8) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t21 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))))) := A1.Dn K O x hD (6) (3) (6) (7) (8) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O  -- (+155 chars; full line in the Zenodo source)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (Zs K x (11)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10))) (Zs K x (12))) (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7)))  -- (+4 chars; full line in the Zenodo source)
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (7))))) := A1.Dn K O x hD (0) (6) (0) (1) (2) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (9))))) := A1.Dn K O x hD (0) (8) (0) (1) (2) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (11))))) := A1.Dn K O x hD (0) (10) (0) (1) (2) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (8))))) := A1.Dn K O x hD (1) (6) (1) (2) (3) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (10))))) := A1.Dn K O x hD (1) (8) (1) (2) (3) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (9))))) := A1.Dn K O x hD (2) (6) (2) (3) (4) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (9))))) := A1.Dn K O x hD (2) (6) (2) (3) (4) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (11))))) := A1.Dn K O x hD (2) (8) (2) (3) (4) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t16 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (10))))) := A1.Dn K O x hD (3) (6) (3) (4) (5) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t17 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t18 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t19 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t20 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (11))))) := A1.Dn K O x hD (4) (6) (4) (5) (6) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t21 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (8))))) := A1.Dn K O x hD (5) (2) (5) (6) (7) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t22 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (10))))) := A1.Dn K O x hD (5) (4) (5) (6) (7) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t23 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (9))))) := A1.Dn K O x hD (6) (2) (6) (7) (8) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t24 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (11))))) := A1.Dn K O x hD (6) (4) (6) (7) (8) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K  -- (+229 chars; full line in the Zenodo source)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))) (Zs K x (12)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (Zs K x (11))) (Zs K x (13))) (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7  -- (+7 chars; full line in the Zenodo source)
                      have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (8))))) := A1.Dn K O x hD (0) (7) (0) (1) (2) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (10))))) := A1.Dn K O x hD (0) (9) (0) (1) (2) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (12))))) := A1.Dn K O x hD (0) (11) (0) (1) (2) (11) (12) (13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (9))))) := A1.Dn K O x hD (1) (7) (1) (2) (3) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (11))))) := A1.Dn K O x hD (1) (9) (1) (2) (3) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (10))))) := A1.Dn K O x hD (2) (7) (2) (3) (4) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (10))))) := A1.Dn K O x hD (2) (7) (2) (3) (4) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (12))))) := A1.Dn K O x hD (2) (9) (2) (3) (4) (11) (12) (13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t16 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (11))))) := A1.Dn K O x hD (3) (7) (3) (4) (5) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t17 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t18 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t19 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t20 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (10))))) := A1.Dn K O x hD (4) (5) (4) (5) (6) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t21 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (10))))) := A1.Dn K O x hD (4) (5) (4) (5) (6) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t22 : O.le K.zero (K.add (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (12))))) := A1.Dn K O x hD (4) (7) (4) (5) (6) (11) (12) (13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t23 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))))) := A1.Dn K O x hD (5) (3) (5) (6) (7) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t24 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (11))))) := A1.Dn K O x hD (5) (5) (5) (6) (7) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t25 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (8))))) := A1.Dn K O x hD (6) (1) (6) (7) (8) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t26 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))))) := A1.Dn K O x hD (6) (3) (6) (7) (8) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t27 : O.le K.zero (K.add (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (12))))) := A1.Dn K O x hD (6) (5) (6) (7) (8) (11) (12) (13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add  -- (+303 chars; full line in the Zenodo source)
                    | succ w =>
                      rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (w + 11))) (Zs K x (w + 13)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (w + 10))) (Zs K x (w + 12))) (Zs K x (w + 14))) (K.add (K.add (K.add (Zs K x (1)) (  -- (+44 chars; full line in the Zenodo source)
                      have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 7))))) := A1.Dn K O x hD (0) (w + 6) (0) (1) (2) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 9))))) := A1.Dn K O x hD (0) (w + 8) (0) (1) (2) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 11))))) := A1.Dn K O x hD (0) (w + 10) (0) (1) (2) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 12)) (Zs K x (w + 14))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 13))))) := A1.Dn K O x hD (0) (w + 12) (0) (1) (2) (w + 12) (w + 13) (w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 8))))) := A1.Dn K O x hD (1) (w + 6) (1) (2) (3) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 10))))) := A1.Dn K O x hD (1) (w + 8) (1) (2) (3) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 12))))) := A1.Dn K O x hD (1) (w + 10) (1) (2) (3) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 7))))) := A1.Dn K O x hD (2) (w + 4) (2) (3) (4) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 11))))) := A1.Dn K O x hD (2) (w + 8) (2) (3) (4) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 11))))) := A1.Dn K O x hD (2) (w + 8) (2) (3) (4) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 12)) (Zs K x (w + 14))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 13))))) := A1.Dn K O x hD (2) (w + 10) (2) (3) (4) (w + 12) (w + 13) (w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 8))))) := A1.Dn K O x hD (3) (w + 4) (3) (4) (5) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 10))))) := A1.Dn K O x hD (3) (w + 6) (3) (4) (5) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 10))))) := A1.Dn K O x hD (3) (w + 6) (3) (4) (5) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t16 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 12))))) := A1.Dn K O x hD (3) (w + 8) (3) (4) (5) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t17 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 7))))) := A1.Dn K O x hD (4) (w + 2) (4) (5) (6) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t18 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 9))))) := A1.Dn K O x hD (4) (w + 4) (4) (5) (6) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t19 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 9))))) := A1.Dn K O x hD (4) (w + 4) (4) (5) (6) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t20 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 11))))) := A1.Dn K O x hD (4) (w + 6) (4) (5) (6) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t21 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 11))))) := A1.Dn K O x hD (4) (w + 6) (4) (5) (6) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t22 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 12)) (Zs K x (w + 14))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 13))))) := A1.Dn K O x hD (4) (w + 8) (4) (5) (6) (w + 12) (w + 13) (w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t23 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 8))))) := A1.Dn K O x hD (5) (w + 2) (5) (6) (7) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t24 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 10))))) := A1.Dn K O x hD (5) (w + 4) (5) (6) (7) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t25 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 12))))) := A1.Dn K O x hD (5) (w + 6) (5) (6) (7) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t26 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (w + 7))))) := A1.Dn K O x hD (6) (w) (6) (7) (8) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t27 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (w + 9))))) := A1.Dn K O x hD (6) (w + 2) (6) (7) (8) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t28 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (w + 11))))) := A1.Dn K O x hD (6) (w + 4) (6) (7) (8) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t29 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 12)) (Zs K x (w + 14))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (w + 13))))) := A1.Dn K O x hD (6) (w + 6) (6) (7) (8) (w + 12) (w + 13) (w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add  -- (+351 chars; full line in the Zenodo source)
          | succ i =>
            cases i with
            | zero =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (Zs K x (10))) (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))  -- (+19 chars; full line in the Zenodo source)
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (9))))) := A1.Dn K O x hD (1) (7) (1) (2) (3) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (7))))) := A1.Dn K O x hD (5) (1) (5) (6) (7) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))))) := A1.Dn K O x hD (5) (3) (5) (6) (7) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (8))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (9))))) := A1.Dn K O x hD (7) (1) (7) (8) (9) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (Zs K x (11))) (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (  -- (+22 chars; full line in the Zenodo source)
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (8))))) := A1.Dn K O x hD (1) (6) (1) (2) (3) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (10))))) := A1.Dn K O x hD (1) (8) (1) (2) (3) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (9))))) := A1.Dn K O x hD (2) (6) (2) (3) (4) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (10))))) := A1.Dn K O x hD (3) (6) (3) (4) (5) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (8))))) := A1.Dn K O x hD (5) (2) (5) (6) (7) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (10))))) := A1.Dn K O x hD (5) (4) (5) (6) (7) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (9))))) := A1.Dn K O x hD (6) (2) (6) (7) (8) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (8))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (10))))) := A1.Dn K O x hD (7) (2) (7) (8) (9) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) t13) t14) t15) (b  -- (+11 chars; full line in the Zenodo source)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (Zs K x (11)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10))) (Zs K x (12))) (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K   -- (+25 chars; full line in the Zenodo source)
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (9))))) := A1.Dn K O x hD (1) (7) (1) (2) (3) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (11))))) := A1.Dn K O x hD (1) (9) (1) (2) (3) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (10))))) := A1.Dn K O x hD (2) (7) (2) (3) (4) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (11))))) := A1.Dn K O x hD (3) (7) (3) (4) (5) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (10))))) := A1.Dn K O x hD (4) (5) (4) (5) (6) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (7))))) := A1.Dn K O x hD (5) (1) (5) (6) (7) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t16 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))))) := A1.Dn K O x hD (5) (3) (5) (6) (7) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t17 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))))) := A1.Dn K O x hD (5) (3) (5) (6) (7) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t18 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (11))))) := A1.Dn K O x hD (5) (5) (5) (6) (7) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t19 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))))) := A1.Dn K O x hD (6) (3) (6) (7) (8) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t20 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (8))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (9))))) := A1.Dn K O x hD (7) (1) (7) (8) (9) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t21 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (8))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (11))))) := A1.Dn K O x hD (7) (3) (7) (8) (9) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K  -- (+157 chars; full line in the Zenodo source)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))) (Zs K x (12)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (Zs K x (11))) (Zs K x (13))) (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs  -- (+28 chars; full line in the Zenodo source)
                      have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (8))))) := A1.Dn K O x hD (1) (6) (1) (2) (3) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (10))))) := A1.Dn K O x hD (1) (8) (1) (2) (3) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (12))))) := A1.Dn K O x hD (1) (10) (1) (2) (3) (11) (12) (13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (9))))) := A1.Dn K O x hD (2) (6) (2) (3) (4) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (11))))) := A1.Dn K O x hD (2) (8) (2) (3) (4) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (10))))) := A1.Dn K O x hD (3) (6) (3) (4) (5) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (10))))) := A1.Dn K O x hD (3) (6) (3) (4) (5) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (12))))) := A1.Dn K O x hD (3) (8) (3) (4) (5) (11) (12) (13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t16 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (11))))) := A1.Dn K O x hD (4) (6) (4) (5) (6) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t17 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (8))))) := A1.Dn K O x hD (5) (2) (5) (6) (7) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t18 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (10))))) := A1.Dn K O x hD (5) (4) (5) (6) (7) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t19 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (10))))) := A1.Dn K O x hD (5) (4) (5) (6) (7) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t20 : O.le K.zero (K.add (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (12))))) := A1.Dn K O x hD (5) (6) (5) (6) (7) (11) (12) (13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t21 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (9))))) := A1.Dn K O x hD (6) (2) (6) (7) (8) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t22 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (11))))) := A1.Dn K O x hD (6) (4) (6) (7) (8) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t23 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (8))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (10))))) := A1.Dn K O x hD (7) (2) (7) (8) (9) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t24 : O.le K.zero (K.add (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (8))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (12))))) := A1.Dn K O x hD (7) (4) (7) (8) (9) (11) (12) (13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add  -- (+231 chars; full line in the Zenodo source)
                    | succ w =>
                      cases w with
                      | zero =>
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (K.add (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (11))) (Zs K x (13)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))) (Zs K x (12))) (Zs K x (14))) (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4)))   -- (+31 chars; full line in the Zenodo source)
                        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (9))))) := A1.Dn K O x hD (1) (7) (1) (2) (3) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (11))))) := A1.Dn K O x hD (1) (9) (1) (2) (3) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (12)) (Zs K x (14))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (13))))) := A1.Dn K O x hD (1) (11) (1) (2) (3) (12) (13) (14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (10))))) := A1.Dn K O x hD (2) (7) (2) (3) (4) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (12))))) := A1.Dn K O x hD (2) (9) (2) (3) (4) (11) (12) (13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (11))))) := A1.Dn K O x hD (3) (7) (3) (4) (5) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (11))))) := A1.Dn K O x hD (3) (7) (3) (4) (5) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (12)) (Zs K x (14))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (13))))) := A1.Dn K O x hD (3) (9) (3) (4) (5) (12) (13) (14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (10))))) := A1.Dn K O x hD (4) (5) (4) (5) (6) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (10))))) := A1.Dn K O x hD (4) (5) (4) (5) (6) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t16 : O.le K.zero (K.add (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (12))))) := A1.Dn K O x hD (4) (7) (4) (5) (6) (11) (12) (13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t17 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (7))))) := A1.Dn K O x hD (5) (1) (5) (6) (7) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t18 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))))) := A1.Dn K O x hD (5) (3) (5) (6) (7) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t19 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))))) := A1.Dn K O x hD (5) (3) (5) (6) (7) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t20 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (11))))) := A1.Dn K O x hD (5) (5) (5) (6) (7) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t21 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (11))))) := A1.Dn K O x hD (5) (5) (5) (6) (7) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t22 : O.le K.zero (K.add (K.mul (K.add (Zs K x (12)) (Zs K x (14))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (13))))) := A1.Dn K O x hD (5) (7) (5) (6) (7) (12) (13) (14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t23 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))))) := A1.Dn K O x hD (6) (3) (6) (7) (8) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t24 : O.le K.zero (K.add (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (12))))) := A1.Dn K O x hD (6) (5) (6) (7) (8) (11) (12) (13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t25 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (8))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (9))))) := A1.Dn K O x hD (7) (1) (7) (8) (9) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t26 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (8))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (11))))) := A1.Dn K O x hD (7) (3) (7) (8) (9) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t27 : O.le K.zero (K.add (K.mul (K.add (Zs K x (12)) (Zs K x (14))) (Zs K x (8))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (13))))) := A1.Dn K O x hD (7) (5) (7) (8) (9) (12) (13) (14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_a  -- (+305 chars; full line in the Zenodo source)
                      | succ w =>
                        rw [show 0 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (K.add (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (w + 12))) (Zs K x (w + 14)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (w + 11))) (Zs K x (w + 13))) (Zs K x (w + 15))) (K.add (K.a  -- (+68 chars; full line in the Zenodo source)
                        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 8))))) := A1.Dn K O x hD (1) (w + 6) (1) (2) (3) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 10))))) := A1.Dn K O x hD (1) (w + 8) (1) (2) (3) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 12))))) := A1.Dn K O x hD (1) (w + 10) (1) (2) (3) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 13)) (Zs K x (w + 15))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 14))))) := A1.Dn K O x hD (1) (w + 12) (1) (2) (3) (w + 13) (w + 14) (w + 15) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 11))))) := A1.Dn K O x hD (2) (w + 8) (2) (3) (4) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 12)) (Zs K x (w + 14))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 13))))) := A1.Dn K O x hD (2) (w + 10) (2) (3) (4) (w + 12) (w + 13) (w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 8))))) := A1.Dn K O x hD (3) (w + 4) (3) (4) (5) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 10))))) := A1.Dn K O x hD (3) (w + 6) (3) (4) (5) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 10))))) := A1.Dn K O x hD (3) (w + 6) (3) (4) (5) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 12))))) := A1.Dn K O x hD (3) (w + 8) (3) (4) (5) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 12))))) := A1.Dn K O x hD (3) (w + 8) (3) (4) (5) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 13)) (Zs K x (w + 15))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 14))))) := A1.Dn K O x hD (3) (w + 10) (3) (4) (5) (w + 13) (w + 14) (w + 15) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 9))))) := A1.Dn K O x hD (4) (w + 4) (4) (5) (6) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 11))))) := A1.Dn K O x hD (4) (w + 6) (4) (5) (6) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 11))))) := A1.Dn K O x hD (4) (w + 6) (4) (5) (6) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t16 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 12)) (Zs K x (w + 14))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 13))))) := A1.Dn K O x hD (4) (w + 8) (4) (5) (6) (w + 12) (w + 13) (w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t17 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 8))))) := A1.Dn K O x hD (5) (w + 2) (5) (6) (7) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t18 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 10))))) := A1.Dn K O x hD (5) (w + 4) (5) (6) (7) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t19 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 10))))) := A1.Dn K O x hD (5) (w + 4) (5) (6) (7) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t20 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 12))))) := A1.Dn K O x hD (5) (w + 6) (5) (6) (7) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t21 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 12))))) := A1.Dn K O x hD (5) (w + 6) (5) (6) (7) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t22 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 13)) (Zs K x (w + 15))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 14))))) := A1.Dn K O x hD (5) (w + 8) (5) (6) (7) (w + 13) (w + 14) (w + 15) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t23 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (w + 9))))) := A1.Dn K O x hD (6) (w + 2) (6) (7) (8) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t24 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (w + 11))))) := A1.Dn K O x hD (6) (w + 4) (6) (7) (8) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t25 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 12)) (Zs K x (w + 14))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (w + 13))))) := A1.Dn K O x hD (6) (w + 6) (6) (7) (8) (w + 12) (w + 13) (w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t26 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (8))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (w + 8))))) := A1.Dn K O x hD (7) (w) (7) (8) (9) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t27 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (8))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (w + 10))))) := A1.Dn K O x hD (7) (w + 2) (7) (8) (9) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t28 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (8))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (w + 12))))) := A1.Dn K O x hD (7) (w + 4) (7) (8) (9) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t29 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 13)) (Zs K x (w + 15))) (Zs K x (8))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (w + 14))))) := A1.Dn K O x hD (7) (w + 6) (7) (8) (9) (w + 13) (w + 14) (w + 15) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_a  -- (+353 chars; full line in the Zenodo source)
            | succ a =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))) (Zs K x (a + 8))) (Zs K x (a + 10))) (K.add (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))) (Zs K x (a + 10)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))) (Zs K x (a + 9))) (Zs K x (a + 11))) (K  -- (+93 chars; full line in the Zenodo source)
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 4))))) := A1.Dn K O x hD (a + 2) (1) (a + 2) (a + 3) (a + 4) (a + 3) (a + 4) (a + 5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 2) (3) (a + 2) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 2) (5) (a + 2) (a + 3) (a + 4) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 2) (7) (a + 2) (a + 3) (a + 4) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 4) (1) (a + 4) (a + 5) (a + 6) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 4) (3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 4) (5) (a + 4) (a + 5) (a + 6) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 6) (1) (a + 6) (a + 7) (a + 8) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 6) (3) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 9))) (K.neg (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 8) (1) (a + 8) (a + 9) (a + 10) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))) (Zs K x (a + 8))) (Zs K x (a + 10))) (K.add (K.add (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9))) (Zs K x (a + 11)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))) (Zs K x (a + 10))) (Zs K x (a + 12)))  -- (+96 chars; full line in the Zenodo source)
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 5))))) := A1.Dn K O x hD (a + 2) (2) (a + 2) (a + 3) (a + 4) (a + 4) (a + 5) (a + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 2) (4) (a + 2) (a + 3) (a + 4) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 2) (6) (a + 2) (a + 3) (a + 4) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 2) (8) (a + 2) (a + 3) (a + 4) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 3) (2) (a + 3) (a + 4) (a + 5) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 3) (4) (a + 3) (a + 4) (a + 5) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 3) (6) (a + 3) (a + 4) (a + 5) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 4) (2) (a + 4) (a + 5) (a + 6) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 4) (4) (a + 4) (a + 5) (a + 6) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 4) (6) (a + 4) (a + 5) (a + 6) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 5) (2) (a + 5) (a + 6) (a + 7) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 5) (4) (a + 5) (a + 6) (a + 7) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 6) (2) (a + 6) (a + 7) (a + 8) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 6) (4) (a + 6) (a + 7) (a + 8) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 7) (2) (a + 7) (a + 8) (a + 9) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 9))) (K.neg (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 8) (2) (a + 8) (a + 9) (a + 10) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) t13) t14) t15) (b  -- (+11 chars; full line in the Zenodo source)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))) (Zs K x (a + 8))) (Zs K x (a + 10))) (K.add (K.add (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10))) (Zs K x (a + 12)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9))) (Zs K x (a + 11))) (Zs K x (a + 13  -- (+99 chars; full line in the Zenodo source)
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 2) (3) (a + 2) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 2) (5) (a + 2) (a + 3) (a + 4) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 2) (7) (a + 2) (a + 3) (a + 4) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 2) (9) (a + 2) (a + 3) (a + 4) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 3) (3) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 3) (5) (a + 3) (a + 4) (a + 5) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 3) (7) (a + 3) (a + 4) (a + 5) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 4) (1) (a + 4) (a + 5) (a + 6) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 4) (3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 4) (3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 4) (5) (a + 4) (a + 5) (a + 6) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 4) (5) (a + 4) (a + 5) (a + 6) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 4) (7) (a + 4) (a + 5) (a + 6) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 5) (3) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 5) (5) (a + 5) (a + 6) (a + 7) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 6) (1) (a + 6) (a + 7) (a + 8) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t16 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 6) (3) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t17 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 6) (3) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t18 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 6) (5) (a + 6) (a + 7) (a + 8) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t19 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 7) (3) (a + 7) (a + 8) (a + 9) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t20 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 9))) (K.neg (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 8) (1) (a + 8) (a + 9) (a + 10) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t21 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 9))) (K.neg (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 8) (3) (a + 8) (a + 9) (a + 10) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K  -- (+157 chars; full line in the Zenodo source)
                  | succ w =>
                    cases w with
                    | zero =>
                      rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))) (Zs K x (a + 8))) (Zs K x (a + 10))) (K.add (K.add (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 11))) (Zs K x (a + 13)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10))) (Zs K x (a + 12))) (Zs K x (a +  -- (+102 chars; full line in the Zenodo source)
                      have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 2) (4) (a + 2) (a + 3) (a + 4) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 2) (6) (a + 2) (a + 3) (a + 4) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 2) (8) (a + 2) (a + 3) (a + 4) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 12)) (Zs K x (a + 14))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 13))))) := A1.Dn K O x hD (a + 2) (10) (a + 2) (a + 3) (a + 4) (a + 12) (a + 13) (a + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 3) (4) (a + 3) (a + 4) (a + 5) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 3) (6) (a + 3) (a + 4) (a + 5) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 3) (8) (a + 3) (a + 4) (a + 5) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 4) (2) (a + 4) (a + 5) (a + 6) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 4) (4) (a + 4) (a + 5) (a + 6) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 4) (4) (a + 4) (a + 5) (a + 6) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 4) (6) (a + 4) (a + 5) (a + 6) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 4) (6) (a + 4) (a + 5) (a + 6) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 12)) (Zs K x (a + 14))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 13))))) := A1.Dn K O x hD (a + 4) (8) (a + 4) (a + 5) (a + 6) (a + 12) (a + 13) (a + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 5) (2) (a + 5) (a + 6) (a + 7) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 5) (4) (a + 5) (a + 6) (a + 7) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 5) (4) (a + 5) (a + 6) (a + 7) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t16 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 5) (6) (a + 5) (a + 6) (a + 7) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t17 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 6) (2) (a + 6) (a + 7) (a + 8) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t18 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 6) (4) (a + 6) (a + 7) (a + 8) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t19 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 6) (4) (a + 6) (a + 7) (a + 8) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t20 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 12)) (Zs K x (a + 14))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 13))))) := A1.Dn K O x hD (a + 6) (6) (a + 6) (a + 7) (a + 8) (a + 12) (a + 13) (a + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t21 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 7) (2) (a + 7) (a + 8) (a + 9) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t22 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 7) (4) (a + 7) (a + 8) (a + 9) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t23 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 9))) (K.neg (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 8) (2) (a + 8) (a + 9) (a + 10) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t24 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 12)) (Zs K x (a + 14))) (Zs K x (a + 9))) (K.neg (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 13))))) := A1.Dn K O x hD (a + 8) (4) (a + 8) (a + 9) (a + 10) (a + 12) (a + 13) (a + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add  -- (+231 chars; full line in the Zenodo source)
                    | succ w =>
                      cases w with
                      | zero =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1 + 1) + 1 = a + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))) (Zs K x (a + 8))) (Zs K x (a + 10))) (K.add (K.add (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 12))) (Zs K x (a + 14)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 11))) (Zs K x (a + 13))) (Zs K x (  -- (+105 chars; full line in the Zenodo source)
                        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 2) (5) (a + 2) (a + 3) (a + 4) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 2) (7) (a + 2) (a + 3) (a + 4) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 2) (9) (a + 2) (a + 3) (a + 4) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 13)) (Zs K x (a + 15))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 14))))) := A1.Dn K O x hD (a + 2) (11) (a + 2) (a + 3) (a + 4) (a + 13) (a + 14) (a + 15) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 3) (5) (a + 3) (a + 4) (a + 5) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 3) (7) (a + 3) (a + 4) (a + 5) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 12)) (Zs K x (a + 14))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 13))))) := A1.Dn K O x hD (a + 3) (9) (a + 3) (a + 4) (a + 5) (a + 12) (a + 13) (a + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 4) (3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 4) (5) (a + 4) (a + 5) (a + 6) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 4) (5) (a + 4) (a + 5) (a + 6) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 4) (7) (a + 4) (a + 5) (a + 6) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 4) (7) (a + 4) (a + 5) (a + 6) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 13)) (Zs K x (a + 15))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 14))))) := A1.Dn K O x hD (a + 4) (9) (a + 4) (a + 5) (a + 6) (a + 13) (a + 14) (a + 15) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 5) (3) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 5) (5) (a + 5) (a + 6) (a + 7) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 5) (5) (a + 5) (a + 6) (a + 7) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t16 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 12)) (Zs K x (a + 14))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 13))))) := A1.Dn K O x hD (a + 5) (7) (a + 5) (a + 6) (a + 7) (a + 12) (a + 13) (a + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t17 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 6) (1) (a + 6) (a + 7) (a + 8) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t18 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 6) (3) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t19 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 6) (3) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t20 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 6) (5) (a + 6) (a + 7) (a + 8) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t21 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 6) (5) (a + 6) (a + 7) (a + 8) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t22 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 13)) (Zs K x (a + 15))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 14))))) := A1.Dn K O x hD (a + 6) (7) (a + 6) (a + 7) (a + 8) (a + 13) (a + 14) (a + 15) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t23 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 7) (3) (a + 7) (a + 8) (a + 9) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t24 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 12)) (Zs K x (a + 14))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 13))))) := A1.Dn K O x hD (a + 7) (5) (a + 7) (a + 8) (a + 9) (a + 12) (a + 13) (a + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t25 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 9))) (K.neg (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 8) (1) (a + 8) (a + 9) (a + 10) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t26 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 9))) (K.neg (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 8) (3) (a + 8) (a + 9) (a + 10) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t27 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 13)) (Zs K x (a + 15))) (Zs K x (a + 9))) (K.neg (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 14))))) := A1.Dn K O x hD (a + 8) (5) (a + 8) (a + 9) (a + 10) (a + 13) (a + 14) (a + 15) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_a  -- (+305 chars; full line in the Zenodo source)
                      | succ w =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = a + w + 12 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + 6))) (Zs K x (a + 8))) (Zs K x (a + 10))) (K.add (K.add (K.add (Zs K x (a + w + 9)) (Zs K x (a + w + 11))) (Zs K x (a + w + 13))) (Zs K x (a + w + 15)))) (K.neg (K.mul (K.add (K.add (K.add (K.add (Zs K x (a + w + 8)) (Zs K x (a + w + 10))) (Zs K x (a + w + 12)))  -- (+142 chars; full line in the Zenodo source)
                        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 8)) (Zs K x (a + w + 10))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + w + 9))))) := A1.Dn K O x hD (a + 2) (w + 6) (a + 2) (a + 3) (a + 4) (a + w + 8) (a + w + 9) (a + w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 10)) (Zs K x (a + w + 12))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + w + 11))))) := A1.Dn K O x hD (a + 2) (w + 8) (a + 2) (a + 3) (a + 4) (a + w + 10) (a + w + 11) (a + w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 12)) (Zs K x (a + w + 14))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + w + 13))))) := A1.Dn K O x hD (a + 2) (w + 10) (a + 2) (a + 3) (a + 4) (a + w + 12) (a + w + 13) (a + w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 14)) (Zs K x (a + w + 16))) (Zs K x (a + 3))) (K.neg (K.mul (K.add (Zs K x (a + 2)) (Zs K x (a + 4))) (Zs K x (a + w + 15))))) := A1.Dn K O x hD (a + 2) (w + 12) (a + 2) (a + 3) (a + 4) (a + w + 14) (a + w + 15) (a + w + 16) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 9)) (Zs K x (a + w + 11))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + w + 10))))) := A1.Dn K O x hD (a + 3) (w + 6) (a + 3) (a + 4) (a + 5) (a + w + 9) (a + w + 10) (a + w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 11)) (Zs K x (a + w + 13))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + w + 12))))) := A1.Dn K O x hD (a + 3) (w + 8) (a + 3) (a + 4) (a + 5) (a + w + 11) (a + w + 12) (a + w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 13)) (Zs K x (a + w + 15))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + w + 14))))) := A1.Dn K O x hD (a + 3) (w + 10) (a + 3) (a + 4) (a + 5) (a + w + 13) (a + w + 14) (a + w + 15) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 8)) (Zs K x (a + w + 10))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + w + 9))))) := A1.Dn K O x hD (a + 4) (w + 4) (a + 4) (a + 5) (a + 6) (a + w + 8) (a + w + 9) (a + w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 10)) (Zs K x (a + w + 12))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + w + 11))))) := A1.Dn K O x hD (a + 4) (w + 6) (a + 4) (a + 5) (a + 6) (a + w + 10) (a + w + 11) (a + w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 10)) (Zs K x (a + w + 12))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + w + 11))))) := A1.Dn K O x hD (a + 4) (w + 6) (a + 4) (a + 5) (a + 6) (a + w + 10) (a + w + 11) (a + w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 12)) (Zs K x (a + w + 14))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + w + 13))))) := A1.Dn K O x hD (a + 4) (w + 8) (a + 4) (a + 5) (a + 6) (a + w + 12) (a + w + 13) (a + w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 12)) (Zs K x (a + w + 14))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + w + 13))))) := A1.Dn K O x hD (a + 4) (w + 8) (a + 4) (a + 5) (a + 6) (a + w + 12) (a + w + 13) (a + w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 14)) (Zs K x (a + w + 16))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + w + 15))))) := A1.Dn K O x hD (a + 4) (w + 10) (a + 4) (a + 5) (a + 6) (a + w + 14) (a + w + 15) (a + w + 16) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 9)) (Zs K x (a + w + 11))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + w + 10))))) := A1.Dn K O x hD (a + 5) (w + 4) (a + 5) (a + 6) (a + 7) (a + w + 9) (a + w + 10) (a + w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 11)) (Zs K x (a + w + 13))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + w + 12))))) := A1.Dn K O x hD (a + 5) (w + 6) (a + 5) (a + 6) (a + 7) (a + w + 11) (a + w + 12) (a + w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t15 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 11)) (Zs K x (a + w + 13))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + w + 12))))) := A1.Dn K O x hD (a + 5) (w + 6) (a + 5) (a + 6) (a + 7) (a + w + 11) (a + w + 12) (a + w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t16 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 13)) (Zs K x (a + w + 15))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + w + 14))))) := A1.Dn K O x hD (a + 5) (w + 8) (a + 5) (a + 6) (a + 7) (a + w + 13) (a + w + 14) (a + w + 15) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t17 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 8)) (Zs K x (a + w + 10))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + w + 9))))) := A1.Dn K O x hD (a + 6) (w + 2) (a + 6) (a + 7) (a + 8) (a + w + 8) (a + w + 9) (a + w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t18 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 10)) (Zs K x (a + w + 12))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + w + 11))))) := A1.Dn K O x hD (a + 6) (w + 4) (a + 6) (a + 7) (a + 8) (a + w + 10) (a + w + 11) (a + w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t19 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 10)) (Zs K x (a + w + 12))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + w + 11))))) := A1.Dn K O x hD (a + 6) (w + 4) (a + 6) (a + 7) (a + 8) (a + w + 10) (a + w + 11) (a + w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t20 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 12)) (Zs K x (a + w + 14))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + w + 13))))) := A1.Dn K O x hD (a + 6) (w + 6) (a + 6) (a + 7) (a + 8) (a + w + 12) (a + w + 13) (a + w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t21 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 12)) (Zs K x (a + w + 14))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + w + 13))))) := A1.Dn K O x hD (a + 6) (w + 6) (a + 6) (a + 7) (a + 8) (a + w + 12) (a + w + 13) (a + w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t22 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 14)) (Zs K x (a + w + 16))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + w + 15))))) := A1.Dn K O x hD (a + 6) (w + 8) (a + 6) (a + 7) (a + 8) (a + w + 14) (a + w + 15) (a + w + 16) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t23 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 9)) (Zs K x (a + w + 11))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + w + 10))))) := A1.Dn K O x hD (a + 7) (w + 2) (a + 7) (a + 8) (a + 9) (a + w + 9) (a + w + 10) (a + w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t24 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 11)) (Zs K x (a + w + 13))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + w + 12))))) := A1.Dn K O x hD (a + 7) (w + 4) (a + 7) (a + 8) (a + 9) (a + w + 11) (a + w + 12) (a + w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t25 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 13)) (Zs K x (a + w + 15))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + w + 14))))) := A1.Dn K O x hD (a + 7) (w + 6) (a + 7) (a + 8) (a + 9) (a + w + 13) (a + w + 14) (a + w + 15) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t26 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 8)) (Zs K x (a + w + 10))) (Zs K x (a + 9))) (K.neg (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + w + 9))))) := A1.Dn K O x hD (a + 8) (w) (a + 8) (a + 9) (a + 10) (a + w + 8) (a + w + 9) (a + w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t27 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 10)) (Zs K x (a + w + 12))) (Zs K x (a + 9))) (K.neg (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + w + 11))))) := A1.Dn K O x hD (a + 8) (w + 2) (a + 8) (a + 9) (a + 10) (a + w + 10) (a + w + 11) (a + w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t28 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 12)) (Zs K x (a + w + 14))) (Zs K x (a + 9))) (K.neg (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + w + 13))))) := A1.Dn K O x hD (a + 8) (w + 4) (a + 8) (a + 9) (a + 10) (a + w + 12) (a + w + 13) (a + w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t29 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 14)) (Zs K x (a + w + 16))) (Zs K x (a + 9))) (K.neg (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + w + 15))))) := A1.Dn K O x hD (a + 8) (w + 6) (a + 8) (a + 9) (a + 10) (a + w + 14) (a + w + 15) (a + w + 16) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_a  -- (+353 chars; full line in the Zenodo source)

include hx hT hD h1 h10 in
theorem sg8 (i w : Nat) : O.le K.zero (Lagrange.minor K (Zs K x) (Zs K (c1v K x)) i (i + w + 1)) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.add (K.mul K.zero (K.add K.zero (Zs K x (2)))) (K.neg (K.mul (Zs K x (1)) K.zero)))
      exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (1)) (Zs K x (3)))) (K.neg (K.mul (Zs K x (2)) K.zero)))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (Zs K x (3)) K.zero)))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (4)) K.zero)))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (5)) K.zero)))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
            | succ w =>
              rw [show 0 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.add (K.mul K.zero (K.add (Zs K x (w + 5)) (Zs K x (w + 7)))) (K.neg (K.mul (Zs K x (w + 6)) K.zero)))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (1)) (Zs K x (3)))) (K.neg (K.mul (Zs K x (2)) (K.add K.zero (Zs K x (2))))))
        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (2))))) := A1.Dn K O x hD (0) (1) (0) (1) (2) (1) (2) (3) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (Zs K x (3)) (K.add K.zero (Zs K x (2))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (4)) (K.add K.zero (Zs K x (2))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (5)) (K.add K.zero (Zs K x (2))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (Zs K x (6)) (K.add K.zero (Zs K x (2))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.add (K.mul (Zs K x (1)) (K.add (Zs K x (w + 6)) (Zs K x (w + 8)))) (K.neg (K.mul (Zs K x (w + 7)) (K.add K.zero (Zs K x (2))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 7))))) := A1.Dn K O x hD (0) (w + 6) (0) (1) (2) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (Zs K x (3)) (K.add (Zs K x (1)) (Zs K x (3))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (4)) (K.add (Zs K x (1)) (Zs K x (3))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (5)) (K.add (Zs K x (1)) (Zs K x (3))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (Zs K x (6)) (K.add (Zs K x (1)) (Zs K x (3))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (6)) (Zs K x (8)))) (K.neg (K.mul (Zs K x (7)) (K.add (Zs K x (1)) (Zs K x (3))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.add (K.mul (Zs K x (2)) (K.add (Zs K x (w + 7)) (Zs K x (w + 9)))) (K.neg (K.mul (Zs K x (w + 8)) (K.add (Zs K x (1)) (Zs K x (3))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 8))))) := A1.Dn K O x hD (1) (w + 6) (1) (2) (3) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (4)) (K.add (Zs K x (2)) (Zs K x (4))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (5)) (K.add (Zs K x (2)) (Zs K x (4))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (Zs K x (6)) (K.add (Zs K x (2)) (Zs K x (4))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (6)) (Zs K x (8)))) (K.neg (K.mul (Zs K x (7)) (K.add (Zs K x (2)) (Zs K x (4))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (7)) (Zs K x (9)))) (K.neg (K.mul (Zs K x (8)) (K.add (Zs K x (2)) (Zs K x (4))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (w + 8)) (Zs K x (w + 10)))) (K.neg (K.mul (Zs K x (w + 9)) (K.add (Zs K x (2)) (Zs K x (4))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (4)) (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (Zs K x (5)) (K.add (Zs K x (3)) (Zs K x (5))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (4)) (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (Zs K x (6)) (K.add (Zs K x (3)) (Zs K x (5))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.add (K.mul (Zs K x (4)) (K.add (Zs K x (6)) (Zs K x (8)))) (K.neg (K.mul (Zs K x (7)) (K.add (Zs K x (3)) (Zs K x (5))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.add (K.mul (Zs K x (4)) (K.add (Zs K x (7)) (Zs K x (9)))) (K.neg (K.mul (Zs K x (8)) (K.add (Zs K x (3)) (Zs K x (5))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.add (K.mul (Zs K x (4)) (K.add (Zs K x (8)) (Zs K x (10)))) (K.neg (K.mul (Zs K x (9)) (K.add (Zs K x (3)) (Zs K x (5))))))
                      have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 10 by lib_nat]
                      show O.le K.zero (K.add (K.mul (Zs K x (4)) (K.add (Zs K x (w + 9)) (Zs K x (w + 11)))) (K.neg (K.mul (Zs K x (w + 10)) (K.add (Zs K x (3)) (Zs K x (5))))))
                      have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 10))))) := A1.Dn K O x hD (3) (w + 6) (3) (4) (5) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ i =>
            cases i with
            | zero =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (5)) (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (Zs K x (6)) (K.add (Zs K x (4)) (Zs K x (6))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.add (K.mul (Zs K x (5)) (K.add (Zs K x (6)) (Zs K x (8)))) (K.neg (K.mul (Zs K x (7)) (K.add (Zs K x (4)) (Zs K x (6))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.add (K.mul (Zs K x (5)) (K.add (Zs K x (7)) (Zs K x (9)))) (K.neg (K.mul (Zs K x (8)) (K.add (Zs K x (4)) (Zs K x (6))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.add (K.mul (Zs K x (5)) (K.add (Zs K x (8)) (Zs K x (10)))) (K.neg (K.mul (Zs K x (9)) (K.add (Zs K x (4)) (Zs K x (6))))))
                      have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        show O.le K.zero (K.add (K.mul (Zs K x (5)) (K.add (Zs K x (9)) (Zs K x (11)))) (K.neg (K.mul (Zs K x (10)) (K.add (Zs K x (4)) (Zs K x (6))))))
                        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (10))))) := A1.Dn K O x hD (4) (5) (4) (5) (6) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                      | succ w =>
                        rw [show 0 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 11 by lib_nat]
                        show O.le K.zero (K.add (K.mul (Zs K x (5)) (K.add (Zs K x (w + 10)) (Zs K x (w + 12)))) (K.neg (K.mul (Zs K x (w + 11)) (K.add (Zs K x (4)) (Zs K x (6))))))
                        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 11))))) := A1.Dn K O x hD (4) (w + 6) (4) (5) (6) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ a =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.add (K.mul (Zs K x (a + 6)) (K.add (Zs K x (a + 6)) (Zs K x (a + 8)))) (K.neg (K.mul (Zs K x (a + 7)) (K.add (Zs K x (a + 5)) (Zs K x (a + 7))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 5) (1) (a + 5) (a + 6) (a + 7) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.add (K.mul (Zs K x (a + 6)) (K.add (Zs K x (a + 7)) (Zs K x (a + 9)))) (K.neg (K.mul (Zs K x (a + 8)) (K.add (Zs K x (a + 5)) (Zs K x (a + 7))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 5) (2) (a + 5) (a + 6) (a + 7) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.add (K.mul (Zs K x (a + 6)) (K.add (Zs K x (a + 8)) (Zs K x (a + 10)))) (K.neg (K.mul (Zs K x (a + 9)) (K.add (Zs K x (a + 5)) (Zs K x (a + 7))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 5) (3) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 10 by lib_nat]
                      show O.le K.zero (K.add (K.mul (Zs K x (a + 6)) (K.add (Zs K x (a + 9)) (Zs K x (a + 11)))) (K.neg (K.mul (Zs K x (a + 10)) (K.add (Zs K x (a + 5)) (Zs K x (a + 7))))))
                      have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 5) (4) (a + 5) (a + 6) (a + 7) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1 + 1) + 1 = a + 11 by lib_nat]
                        show O.le K.zero (K.add (K.mul (Zs K x (a + 6)) (K.add (Zs K x (a + 10)) (Zs K x (a + 12)))) (K.neg (K.mul (Zs K x (a + 11)) (K.add (Zs K x (a + 5)) (Zs K x (a + 7))))))
                        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 5) (5) (a + 5) (a + 6) (a + 7) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                      | succ w =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = a + w + 12 by lib_nat]
                        show O.le K.zero (K.add (K.mul (Zs K x (a + 6)) (K.add (Zs K x (a + w + 11)) (Zs K x (a + w + 13)))) (K.neg (K.mul (Zs K x (a + w + 12)) (K.add (Zs K x (a + 5)) (Zs K x (a + 7))))))
                        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 11)) (Zs K x (a + w + 13))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + w + 12))))) := A1.Dn K O x hD (a + 5) (w + 6) (a + 5) (a + 6) (a + 7) (a + w + 11) (a + w + 12) (a + w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

include hx hT hD h1 h10 in
theorem sg9 (i w : Nat) : O.le K.zero (Lagrange.minor K (fun i => x (i + 3)) (fun i => x (i + 2)) i (i + w + 1)) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (4))) (K.neg (K.mul (Zs K x (5)) (Zs K x (3)))))
      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
        have h := A2.mk K O x hT (1) (2) (0)
        try rw [show (2) + (0) + 1 + (1) = 4 by lib_nat] at h
        try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
        try rw [show (2) + (1) = 3 by lib_nat] at h
        exact A2.nn_of_nonpos_neg K O _ h
      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (5))) (K.neg (K.mul (Zs K x (6)) (Zs K x (3)))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
          have h := A2.mk K O x hT (2) (2) (0)
          try rw [show (2) + (0) + 1 + (2) = 5 by lib_nat] at h
          try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
          try rw [show (2) + (2) = 4 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (7)) (Zs K x (3)))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
            have h := A2.mk K O x hT (3) (2) (0)
            try rw [show (2) + (0) + 1 + (3) = 6 by lib_nat] at h
            try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
            try rw [show (2) + (3) = 5 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (8)) (Zs K x (3)))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7)))))) := by
              have h := A2.mk K O x hT (4) (2) (0)
              try rw [show (2) + (0) + 1 + (4) = 7 by lib_nat] at h
              try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
              try rw [show (2) + (4) = 6 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (9)) (Zs K x (3)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (4)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (5) (2) (0)
                try rw [show (2) + (0) + 1 + (5) = 8 by lib_nat] at h
                try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                try rw [show (2) + (5) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              rw [show 0 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.add (K.mul (Zs K x (4)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (3)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (4)))))) := by
                have h := A2.mk K O x hT (1) (2) (w + 5)
                try rw [show (2) + (w + 5) + 1 + (1) = w + 9 by lib_nat] at h
                try rw [show (2) + (w + 5) + 1 = w + 8 by lib_nat] at h
                try rw [show (2) + (1) = 3 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.add (K.mul (Zs K x (5)) (Zs K x (5))) (K.neg (K.mul (Zs K x (6)) (Zs K x (4)))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5)))))) := by
          have h := A2.mk K O x hT (1) (3) (0)
          try rw [show (3) + (0) + 1 + (1) = 5 by lib_nat] at h
          try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
          try rw [show (3) + (1) = 4 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul (Zs K x (5)) (Zs K x (6))) (K.neg (K.mul (Zs K x (7)) (Zs K x (4)))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
            have h := A2.mk K O x hT (2) (3) (0)
            try rw [show (3) + (0) + 1 + (2) = 6 by lib_nat] at h
            try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
            try rw [show (3) + (2) = 5 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (5)) (Zs K x (7))) (K.neg (K.mul (Zs K x (8)) (Zs K x (4)))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
              have h := A2.mk K O x hT (3) (3) (0)
              try rw [show (3) + (0) + 1 + (3) = 7 by lib_nat] at h
              try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
              try rw [show (3) + (3) = 6 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (9)) (Zs K x (4)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (5)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (4) (3) (0)
                try rw [show (3) + (0) + 1 + (4) = 8 by lib_nat] at h
                try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                try rw [show (3) + (4) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (10)) (Zs K x (4)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (10))) (K.neg (K.mul (Zs K x (5)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (5) (3) (0)
                  try rw [show (3) + (0) + 1 + (5) = 9 by lib_nat] at h
                  try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                  try rw [show (3) + (5) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.add (K.mul (Zs K x (5)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (4)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (5)))))) := by
                  have h := A2.mk K O x hT (1) (3) (w + 5)
                  try rw [show (3) + (w + 5) + 1 + (1) = w + 10 by lib_nat] at h
                  try rw [show (3) + (w + 5) + 1 = w + 9 by lib_nat] at h
                  try rw [show (3) + (1) = 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.add (K.mul (Zs K x (6)) (Zs K x (6))) (K.neg (K.mul (Zs K x (7)) (Zs K x (5)))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6)))))) := by
            have h := A2.mk K O x hT (1) (4) (0)
            try rw [show (4) + (0) + 1 + (1) = 6 by lib_nat] at h
            try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
            try rw [show (4) + (1) = 5 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (6)) (Zs K x (7))) (K.neg (K.mul (Zs K x (8)) (Zs K x (5)))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
              have h := A2.mk K O x hT (2) (4) (0)
              try rw [show (4) + (0) + 1 + (2) = 7 by lib_nat] at h
              try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
              try rw [show (4) + (2) = 6 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (6)) (Zs K x (8))) (K.neg (K.mul (Zs K x (9)) (Zs K x (5)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (6)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (3) (4) (0)
                try rw [show (4) + (0) + 1 + (3) = 8 by lib_nat] at h
                try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                try rw [show (4) + (3) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (6)) (Zs K x (9))) (K.neg (K.mul (Zs K x (10)) (Zs K x (5)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (10))) (K.neg (K.mul (Zs K x (6)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (4) (4) (0)
                  try rw [show (4) + (0) + 1 + (4) = 9 by lib_nat] at h
                  try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                  try rw [show (4) + (4) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.add (K.mul (Zs K x (6)) (Zs K x (10))) (K.neg (K.mul (Zs K x (11)) (Zs K x (5)))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (11))) (K.neg (K.mul (Zs K x (6)) (Zs K x (10)))))) := by
                    have h := A2.mk K O x hT (5) (4) (0)
                    try rw [show (4) + (0) + 1 + (5) = 10 by lib_nat] at h
                    try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                    try rw [show (4) + (5) = 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.add (K.mul (Zs K x (6)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 12)) (Zs K x (5)))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (6)))))) := by
                    have h := A2.mk K O x hT (1) (4) (w + 5)
                    try rw [show (4) + (w + 5) + 1 + (1) = w + 11 by lib_nat] at h
                    try rw [show (4) + (w + 5) + 1 = w + 10 by lib_nat] at h
                    try rw [show (4) + (1) = 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.add (K.mul (Zs K x (7)) (Zs K x (7))) (K.neg (K.mul (Zs K x (8)) (Zs K x (6)))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (7)))))) := by
              have h := A2.mk K O x hT (1) (5) (0)
              try rw [show (5) + (0) + 1 + (1) = 7 by lib_nat] at h
              try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
              try rw [show (5) + (1) = 6 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (7)) (Zs K x (8))) (K.neg (K.mul (Zs K x (9)) (Zs K x (6)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (9))) (K.neg (K.mul (Zs K x (7)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (2) (5) (0)
                try rw [show (5) + (0) + 1 + (2) = 8 by lib_nat] at h
                try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                try rw [show (5) + (2) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (7)) (Zs K x (9))) (K.neg (K.mul (Zs K x (10)) (Zs K x (6)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (10))) (K.neg (K.mul (Zs K x (7)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (3) (5) (0)
                  try rw [show (5) + (0) + 1 + (3) = 9 by lib_nat] at h
                  try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                  try rw [show (5) + (3) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.add (K.mul (Zs K x (7)) (Zs K x (10))) (K.neg (K.mul (Zs K x (11)) (Zs K x (6)))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (11))) (K.neg (K.mul (Zs K x (7)) (Zs K x (10)))))) := by
                    have h := A2.mk K O x hT (4) (5) (0)
                    try rw [show (5) + (0) + 1 + (4) = 10 by lib_nat] at h
                    try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                    try rw [show (5) + (4) = 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.add (K.mul (Zs K x (7)) (Zs K x (11))) (K.neg (K.mul (Zs K x (12)) (Zs K x (6)))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (12))) (K.neg (K.mul (Zs K x (7)) (Zs K x (11)))))) := by
                      have h := A2.mk K O x hT (5) (5) (0)
                      try rw [show (5) + (0) + 1 + (5) = 11 by lib_nat] at h
                      try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                      try rw [show (5) + (5) = 10 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.add (K.mul (Zs K x (7)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 13)) (Zs K x (6)))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (w + 13))) (K.neg (K.mul (Zs K x (w + 12)) (Zs K x (7)))))) := by
                      have h := A2.mk K O x hT (1) (5) (w + 5)
                      try rw [show (5) + (w + 5) + 1 + (1) = w + 12 by lib_nat] at h
                      try rw [show (5) + (w + 5) + 1 = w + 11 by lib_nat] at h
                      try rw [show (5) + (1) = 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.add (K.mul (Zs K x (8)) (Zs K x (8))) (K.neg (K.mul (Zs K x (9)) (Zs K x (7)))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (1) (6) (0)
                try rw [show (6) + (0) + 1 + (1) = 8 by lib_nat] at h
                try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                try rw [show (6) + (1) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (8)) (Zs K x (9))) (K.neg (K.mul (Zs K x (10)) (Zs K x (7)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (10))) (K.neg (K.mul (Zs K x (8)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (2) (6) (0)
                  try rw [show (6) + (0) + 1 + (2) = 9 by lib_nat] at h
                  try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                  try rw [show (6) + (2) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.add (K.mul (Zs K x (8)) (Zs K x (10))) (K.neg (K.mul (Zs K x (11)) (Zs K x (7)))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (11))) (K.neg (K.mul (Zs K x (8)) (Zs K x (10)))))) := by
                    have h := A2.mk K O x hT (3) (6) (0)
                    try rw [show (6) + (0) + 1 + (3) = 10 by lib_nat] at h
                    try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                    try rw [show (6) + (3) = 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.add (K.mul (Zs K x (8)) (Zs K x (11))) (K.neg (K.mul (Zs K x (12)) (Zs K x (7)))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (12))) (K.neg (K.mul (Zs K x (8)) (Zs K x (11)))))) := by
                      have h := A2.mk K O x hT (4) (6) (0)
                      try rw [show (6) + (0) + 1 + (4) = 11 by lib_nat] at h
                      try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                      try rw [show (6) + (4) = 10 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.add (K.mul (Zs K x (8)) (Zs K x (12))) (K.neg (K.mul (Zs K x (13)) (Zs K x (7)))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (13))) (K.neg (K.mul (Zs K x (8)) (Zs K x (12)))))) := by
                        have h := A2.mk K O x hT (5) (6) (0)
                        try rw [show (6) + (0) + 1 + (5) = 12 by lib_nat] at h
                        try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                        try rw [show (6) + (5) = 11 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 10 by lib_nat]
                      show O.le K.zero (K.add (K.mul (Zs K x (8)) (Zs K x (w + 13))) (K.neg (K.mul (Zs K x (w + 14)) (Zs K x (7)))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (w + 14))) (K.neg (K.mul (Zs K x (w + 13)) (Zs K x (8)))))) := by
                        have h := A2.mk K O x hT (1) (6) (w + 5)
                        try rw [show (6) + (w + 5) + 1 + (1) = w + 13 by lib_nat] at h
                        try rw [show (6) + (w + 5) + 1 = w + 12 by lib_nat] at h
                        try rw [show (6) + (1) = 7 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ i =>
            cases i with
            | zero =>
              cases w with
              | zero =>
                show O.le K.zero (K.add (K.mul (Zs K x (9)) (Zs K x (9))) (K.neg (K.mul (Zs K x (10)) (Zs K x (8)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (1) (7) (0)
                  try rw [show (7) + (0) + 1 + (1) = 9 by lib_nat] at h
                  try rw [show (7) + (0) + 1 = 8 by lib_nat] at h
                  try rw [show (7) + (1) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.add (K.mul (Zs K x (9)) (Zs K x (10))) (K.neg (K.mul (Zs K x (11)) (Zs K x (8)))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (11))) (K.neg (K.mul (Zs K x (9)) (Zs K x (10)))))) := by
                    have h := A2.mk K O x hT (2) (7) (0)
                    try rw [show (7) + (0) + 1 + (2) = 10 by lib_nat] at h
                    try rw [show (7) + (0) + 1 = 8 by lib_nat] at h
                    try rw [show (7) + (2) = 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.add (K.mul (Zs K x (9)) (Zs K x (11))) (K.neg (K.mul (Zs K x (12)) (Zs K x (8)))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (12))) (K.neg (K.mul (Zs K x (9)) (Zs K x (11)))))) := by
                      have h := A2.mk K O x hT (3) (7) (0)
                      try rw [show (7) + (0) + 1 + (3) = 11 by lib_nat] at h
                      try rw [show (7) + (0) + 1 = 8 by lib_nat] at h
                      try rw [show (7) + (3) = 10 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.add (K.mul (Zs K x (9)) (Zs K x (12))) (K.neg (K.mul (Zs K x (13)) (Zs K x (8)))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (13))) (K.neg (K.mul (Zs K x (9)) (Zs K x (12)))))) := by
                        have h := A2.mk K O x hT (4) (7) (0)
                        try rw [show (7) + (0) + 1 + (4) = 12 by lib_nat] at h
                        try rw [show (7) + (0) + 1 = 8 by lib_nat] at h
                        try rw [show (7) + (4) = 11 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        show O.le K.zero (K.add (K.mul (Zs K x (9)) (Zs K x (13))) (K.neg (K.mul (Zs K x (14)) (Zs K x (8)))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (14))) (K.neg (K.mul (Zs K x (9)) (Zs K x (13)))))) := by
                          have h := A2.mk K O x hT (5) (7) (0)
                          try rw [show (7) + (0) + 1 + (5) = 13 by lib_nat] at h
                          try rw [show (7) + (0) + 1 = 8 by lib_nat] at h
                          try rw [show (7) + (5) = 12 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                      | succ w =>
                        rw [show 0 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 11 by lib_nat]
                        show O.le K.zero (K.add (K.mul (Zs K x (9)) (Zs K x (w + 14))) (K.neg (K.mul (Zs K x (w + 15)) (Zs K x (8)))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (w + 15))) (K.neg (K.mul (Zs K x (w + 14)) (Zs K x (9)))))) := by
                          have h := A2.mk K O x hT (1) (7) (w + 5)
                          try rw [show (7) + (w + 5) + 1 + (1) = w + 14 by lib_nat] at h
                          try rw [show (7) + (w + 5) + 1 = w + 13 by lib_nat] at h
                          try rw [show (7) + (1) = 8 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ a =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.add (K.mul (Zs K x (a + 10)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 11)) (Zs K x (a + 9)))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 10)))))) := by
                  have h := A2.mk K O x hT (1) (a + 8) (0)
                  try rw [show (a + 8) + (0) + 1 + (1) = a + 10 by lib_nat] at h
                  try rw [show (a + 8) + (0) + 1 = a + 9 by lib_nat] at h
                  try rw [show (a + 8) + (1) = a + 9 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.add (K.mul (Zs K x (a + 10)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 12)) (Zs K x (a + 9)))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 11)))))) := by
                    have h := A2.mk K O x hT (2) (a + 8) (0)
                    try rw [show (a + 8) + (0) + 1 + (2) = a + 11 by lib_nat] at h
                    try rw [show (a + 8) + (0) + 1 = a + 9 by lib_nat] at h
                    try rw [show (a + 8) + (2) = a + 10 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.add (K.mul (Zs K x (a + 10)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 13)) (Zs K x (a + 9)))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 13))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 12)))))) := by
                      have h := A2.mk K O x hT (3) (a + 8) (0)
                      try rw [show (a + 8) + (0) + 1 + (3) = a + 12 by lib_nat] at h
                      try rw [show (a + 8) + (0) + 1 = a + 9 by lib_nat] at h
                      try rw [show (a + 8) + (3) = a + 11 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 10 by lib_nat]
                      show O.le K.zero (K.add (K.mul (Zs K x (a + 10)) (Zs K x (a + 13))) (K.neg (K.mul (Zs K x (a + 14)) (Zs K x (a + 9)))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 14))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 13)))))) := by
                        have h := A2.mk K O x hT (4) (a + 8) (0)
                        try rw [show (a + 8) + (0) + 1 + (4) = a + 13 by lib_nat] at h
                        try rw [show (a + 8) + (0) + 1 = a + 9 by lib_nat] at h
                        try rw [show (a + 8) + (4) = a + 12 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1 + 1) + 1 = a + 11 by lib_nat]
                        show O.le K.zero (K.add (K.mul (Zs K x (a + 10)) (Zs K x (a + 14))) (K.neg (K.mul (Zs K x (a + 15)) (Zs K x (a + 9)))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 15))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 14)))))) := by
                          have h := A2.mk K O x hT (5) (a + 8) (0)
                          try rw [show (a + 8) + (0) + 1 + (5) = a + 14 by lib_nat] at h
                          try rw [show (a + 8) + (0) + 1 = a + 9 by lib_nat] at h
                          try rw [show (a + 8) + (5) = a + 13 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                      | succ w =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = a + w + 12 by lib_nat]
                        show O.le K.zero (K.add (K.mul (Zs K x (a + 10)) (Zs K x (a + w + 15))) (K.neg (K.mul (Zs K x (a + w + 16)) (Zs K x (a + 9)))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + w + 16))) (K.neg (K.mul (Zs K x (a + w + 15)) (Zs K x (a + 10)))))) := by
                          have h := A2.mk K O x hT (1) (a + 8) (w + 5)
                          try rw [show (a + 8) + (w + 5) + 1 + (1) = a + w + 15 by lib_nat] at h
                          try rw [show (a + 8) + (w + 5) + 1 = a + w + 14 by lib_nat] at h
                          try rw [show (a + 8) + (1) = a + 9 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

include hx hT hD h1 h10 in
theorem sg10 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K x (fun i => x (i + 1)) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2))))))
      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (3))) (K.neg (K.mul (Zs K x (2)) (Zs K x (2)))))) := by
        have h := A2.mk K O x hT (1) (0) (0)
        try rw [show (0) + (0) + 1 + (1) = 2 by lib_nat] at h
        try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
        try rw [show (0) + (1) = 1 by lib_nat] at h
        exact A2.nn_of_nonpos_neg K O _ h
      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (2))))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (4))) (K.neg (K.mul (Zs K x (2)) (Zs K x (3)))))) := by
          have h := A2.mk K O x hT (2) (0) (0)
          try rw [show (0) + (0) + 1 + (2) = 3 by lib_nat] at h
          try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
          try rw [show (0) + (2) = 2 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (2))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (2)) (Zs K x (4)))))) := by
            have h := A2.mk K O x hT (3) (0) (0)
            try rw [show (0) + (0) + 1 + (3) = 4 by lib_nat] at h
            try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
            try rw [show (0) + (3) = 3 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (2))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (2)) (Zs K x (5)))))) := by
              have h := A2.mk K O x hT (4) (0) (0)
              try rw [show (0) + (0) + 1 + (4) = 5 by lib_nat] at h
              try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
              try rw [show (0) + (4) = 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (2))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (2)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT (5) (0) (0)
                try rw [show (0) + (0) + 1 + (5) = 6 by lib_nat] at h
                try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                try rw [show (0) + (5) = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              rw [show 0 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (2))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (2)))))) := by
                have h := A2.mk K O x hT (1) (0) (w + 5)
                try rw [show (0) + (w + 5) + 1 + (1) = w + 7 by lib_nat] at h
                try rw [show (0) + (w + 5) + 1 = w + 6 by lib_nat] at h
                try rw [show (0) + (1) = 1 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3))))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (4))) (K.neg (K.mul (Zs K x (3)) (Zs K x (3)))))) := by
          have h := A2.mk K O x hT (1) (1) (0)
          try rw [show (1) + (0) + 1 + (1) = 3 by lib_nat] at h
          try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
          try rw [show (1) + (1) = 2 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (3))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (5))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
            have h := A2.mk K O x hT (2) (1) (0)
            try rw [show (1) + (0) + 1 + (2) = 4 by lib_nat] at h
            try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
            try rw [show (1) + (2) = 3 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (3))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
              have h := A2.mk K O x hT (3) (1) (0)
              try rw [show (1) + (0) + 1 + (3) = 5 by lib_nat] at h
              try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
              try rw [show (1) + (3) = 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (3))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (3)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT (4) (1) (0)
                try rw [show (1) + (0) + 1 + (4) = 6 by lib_nat] at h
                try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                try rw [show (1) + (4) = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (3))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (3)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT (5) (1) (0)
                  try rw [show (1) + (0) + 1 + (5) = 7 by lib_nat] at h
                  try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                  try rw [show (1) + (5) = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (3))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (3)))))) := by
                  have h := A2.mk K O x hT (1) (1) (w + 5)
                  try rw [show (1) + (w + 5) + 1 + (1) = w + 8 by lib_nat] at h
                  try rw [show (1) + (w + 5) + 1 = w + 7 by lib_nat] at h
                  try rw [show (1) + (1) = 2 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
            have h := A2.mk K O x hT (1) (2) (0)
            try rw [show (2) + (0) + 1 + (1) = 4 by lib_nat] at h
            try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
            try rw [show (2) + (1) = 3 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (4))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
              have h := A2.mk K O x hT (2) (2) (0)
              try rw [show (2) + (0) + 1 + (2) = 5 by lib_nat] at h
              try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
              try rw [show (2) + (2) = 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (4))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT (3) (2) (0)
                try rw [show (2) + (0) + 1 + (3) = 6 by lib_nat] at h
                try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                try rw [show (2) + (3) = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (4))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT (4) (2) (0)
                  try rw [show (2) + (0) + 1 + (4) = 7 by lib_nat] at h
                  try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                  try rw [show (2) + (4) = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (4))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (4)) (Zs K x (8)))))) := by
                    have h := A2.mk K O x hT (5) (2) (0)
                    try rw [show (2) + (0) + 1 + (5) = 8 by lib_nat] at h
                    try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                    try rw [show (2) + (5) = 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (4))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (4)))))) := by
                    have h := A2.mk K O x hT (1) (2) (w + 5)
                    try rw [show (2) + (w + 5) + 1 + (1) = w + 9 by lib_nat] at h
                    try rw [show (2) + (w + 5) + 1 = w + 8 by lib_nat] at h
                    try rw [show (2) + (1) = 3 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5)))))) := by
              have h := A2.mk K O x hT (1) (3) (0)
              try rw [show (3) + (0) + 1 + (1) = 5 by lib_nat] at h
              try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
              try rw [show (3) + (1) = 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (5))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT (2) (3) (0)
                try rw [show (3) + (0) + 1 + (2) = 6 by lib_nat] at h
                try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                try rw [show (3) + (2) = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (5))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT (3) (3) (0)
                  try rw [show (3) + (0) + 1 + (3) = 7 by lib_nat] at h
                  try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                  try rw [show (3) + (3) = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (5))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (5)) (Zs K x (8)))))) := by
                    have h := A2.mk K O x hT (4) (3) (0)
                    try rw [show (3) + (0) + 1 + (4) = 8 by lib_nat] at h
                    try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                    try rw [show (3) + (4) = 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (5))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (10))) (K.neg (K.mul (Zs K x (5)) (Zs K x (9)))))) := by
                      have h := A2.mk K O x hT (5) (3) (0)
                      try rw [show (3) + (0) + 1 + (5) = 9 by lib_nat] at h
                      try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                      try rw [show (3) + (5) = 8 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (5))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (5)))))) := by
                      have h := A2.mk K O x hT (1) (3) (w + 5)
                      try rw [show (3) + (w + 5) + 1 + (1) = w + 10 by lib_nat] at h
                      try rw [show (3) + (w + 5) + 1 = w + 9 by lib_nat] at h
                      try rw [show (3) + (1) = 4 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT (1) (4) (0)
                try rw [show (4) + (0) + 1 + (1) = 6 by lib_nat] at h
                try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                try rw [show (4) + (1) = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (6))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT (2) (4) (0)
                  try rw [show (4) + (0) + 1 + (2) = 7 by lib_nat] at h
                  try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                  try rw [show (4) + (2) = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (6))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (6)) (Zs K x (8)))))) := by
                    have h := A2.mk K O x hT (3) (4) (0)
                    try rw [show (4) + (0) + 1 + (3) = 8 by lib_nat] at h
                    try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                    try rw [show (4) + (3) = 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (6))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (10))) (K.neg (K.mul (Zs K x (6)) (Zs K x (9)))))) := by
                      have h := A2.mk K O x hT (4) (4) (0)
                      try rw [show (4) + (0) + 1 + (4) = 9 by lib_nat] at h
                      try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                      try rw [show (4) + (4) = 8 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (11))) (K.neg (K.mul (Zs K x (10)) (Zs K x (6))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (11))) (K.neg (K.mul (Zs K x (6)) (Zs K x (10)))))) := by
                        have h := A2.mk K O x hT (5) (4) (0)
                        try rw [show (4) + (0) + 1 + (5) = 10 by lib_nat] at h
                        try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                        try rw [show (4) + (5) = 9 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (6))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (6)))))) := by
                        have h := A2.mk K O x hT (1) (4) (w + 5)
                        try rw [show (4) + (w + 5) + 1 + (1) = w + 11 by lib_nat] at h
                        try rw [show (4) + (w + 5) + 1 = w + 10 by lib_nat] at h
                        try rw [show (4) + (1) = 5 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ i =>
            cases i with
            | zero =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (7))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT (1) (5) (0)
                  try rw [show (5) + (0) + 1 + (1) = 7 by lib_nat] at h
                  try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                  try rw [show (5) + (1) = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (7))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (9))) (K.neg (K.mul (Zs K x (7)) (Zs K x (8)))))) := by
                    have h := A2.mk K O x hT (2) (5) (0)
                    try rw [show (5) + (0) + 1 + (2) = 8 by lib_nat] at h
                    try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                    try rw [show (5) + (2) = 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (7))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (10))) (K.neg (K.mul (Zs K x (7)) (Zs K x (9)))))) := by
                      have h := A2.mk K O x hT (3) (5) (0)
                      try rw [show (5) + (0) + 1 + (3) = 9 by lib_nat] at h
                      try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                      try rw [show (5) + (3) = 8 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (11))) (K.neg (K.mul (Zs K x (10)) (Zs K x (7))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (11))) (K.neg (K.mul (Zs K x (7)) (Zs K x (10)))))) := by
                        have h := A2.mk K O x hT (4) (5) (0)
                        try rw [show (5) + (0) + 1 + (4) = 10 by lib_nat] at h
                        try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                        try rw [show (5) + (4) = 9 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (12))) (K.neg (K.mul (Zs K x (11)) (Zs K x (7))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (12))) (K.neg (K.mul (Zs K x (7)) (Zs K x (11)))))) := by
                          have h := A2.mk K O x hT (5) (5) (0)
                          try rw [show (5) + (0) + 1 + (5) = 11 by lib_nat] at h
                          try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                          try rw [show (5) + (5) = 10 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                      | succ w =>
                        rw [show 0 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (w + 13))) (K.neg (K.mul (Zs K x (w + 12)) (Zs K x (7))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (w + 13))) (K.neg (K.mul (Zs K x (w + 12)) (Zs K x (7)))))) := by
                          have h := A2.mk K O x hT (1) (5) (w + 5)
                          try rw [show (5) + (w + 5) + 1 + (1) = w + 12 by lib_nat] at h
                          try rw [show (5) + (w + 5) + 1 = w + 11 by lib_nat] at h
                          try rw [show (5) + (1) = 6 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ a =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 8))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 8)))))) := by
                  have h := A2.mk K O x hT (1) (a + 6) (0)
                  try rw [show (a + 6) + (0) + 1 + (1) = a + 8 by lib_nat] at h
                  try rw [show (a + 6) + (0) + 1 = a + 7 by lib_nat] at h
                  try rw [show (a + 6) + (1) = a + 7 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 8))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 9)))))) := by
                    have h := A2.mk K O x hT (2) (a + 6) (0)
                    try rw [show (a + 6) + (0) + 1 + (2) = a + 9 by lib_nat] at h
                    try rw [show (a + 6) + (0) + 1 = a + 7 by lib_nat] at h
                    try rw [show (a + 6) + (2) = a + 8 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 8))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 10)))))) := by
                      have h := A2.mk K O x hT (3) (a + 6) (0)
                      try rw [show (a + 6) + (0) + 1 + (3) = a + 10 by lib_nat] at h
                      try rw [show (a + 6) + (0) + 1 = a + 7 by lib_nat] at h
                      try rw [show (a + 6) + (3) = a + 9 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 11)) (Zs K x (a + 8))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 11)))))) := by
                        have h := A2.mk K O x hT (4) (a + 6) (0)
                        try rw [show (a + 6) + (0) + 1 + (4) = a + 11 by lib_nat] at h
                        try rw [show (a + 6) + (0) + 1 = a + 7 by lib_nat] at h
                        try rw [show (a + 6) + (4) = a + 10 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1 + 1) + 1 = a + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 13))) (K.neg (K.mul (Zs K x (a + 12)) (Zs K x (a + 8))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 13))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 12)))))) := by
                          have h := A2.mk K O x hT (5) (a + 6) (0)
                          try rw [show (a + 6) + (0) + 1 + (5) = a + 12 by lib_nat] at h
                          try rw [show (a + 6) + (0) + 1 = a + 7 by lib_nat] at h
                          try rw [show (a + 6) + (5) = a + 11 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                      | succ w =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = a + w + 12 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + w + 14))) (K.neg (K.mul (Zs K x (a + w + 13)) (Zs K x (a + 8))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + w + 14))) (K.neg (K.mul (Zs K x (a + w + 13)) (Zs K x (a + 8)))))) := by
                          have h := A2.mk K O x hT (1) (a + 6) (w + 5)
                          try rw [show (a + 6) + (w + 5) + 1 + (1) = a + w + 13 by lib_nat] at h
                          try rw [show (a + 6) + (w + 5) + 1 = a + w + 12 by lib_nat] at h
                          try rw [show (a + 6) + (1) = a + 7 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

include hx hT hD h1 h10 in
theorem sg11 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (Zs K (pv3 K x)) (Zs K (pv2 K x)) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul K.zero (Zs K x (3))) (K.neg (K.mul (Zs K x (4)) K.zero))))
      exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) K.zero))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))) (K.neg (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) K.zero))))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) K.zero))))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) K.zero))))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
            | succ w =>
              rw [show 0 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (w + 8)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (w + 3)) (Zs K x (w + 5))) (Zs K x (w + 7))) (Zs K x (w + 9))) K.zero))))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))))))
        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))) (K.neg (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (3))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (Zs K x (3))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (Zs K x (3))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (Zs K x (3))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (K.add (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (w + 9)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (w + 8))) (Zs K x (w + 10))) (Zs K x (3))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 7))))) := A1.Dn K O x hD (0) (w + 6) (0) (1) (2) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 6))))) := A1.Dn K O x hD (1) (w + 4) (1) (2) (3) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 8))))) := A1.Dn K O x hD (1) (w + 6) (1) (2) (3) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 5))))) := A1.Dn K O x hD (2) (w + 2) (2) (3) (4) (w + 4) (w + 5) (w + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 7))))) := A1.Dn K O x hD (2) (w + 4) (2) (3) (4) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))) (K.neg (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (Zs K x (2)) (Zs K x (4)))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (K.add (Zs K x (2)) (Zs K x (4)))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (Zs K x (2)) (Zs K x (4)))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (Zs K x (2)) (Zs K x (4)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (7))))) := A1.Dn K O x hD (0) (6) (0) (1) (2) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (8))))) := A1.Dn K O x hD (1) (6) (1) (2) (3) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10))) (K.add (Zs K x (2)) (Zs K x (4)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (8))))) := A1.Dn K O x hD (0) (7) (0) (1) (2) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (9))))) := A1.Dn K O x hD (1) (7) (1) (2) (3) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (w + 10)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (w + 9))) (Zs K x (w + 11))) (K.add (Zs K x (2)) (Zs K x (4)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 7))))) := A1.Dn K O x hD (0) (w + 6) (0) (1) (2) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 9))))) := A1.Dn K O x hD (0) (w + 8) (0) (1) (2) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 6))))) := A1.Dn K O x hD (1) (w + 4) (1) (2) (3) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 8))))) := A1.Dn K O x hD (1) (w + 6) (1) (2) (3) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 8))))) := A1.Dn K O x hD (1) (w + 6) (1) (2) (3) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 10))))) := A1.Dn K O x hD (1) (w + 8) (1) (2) (3) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 7))))) := A1.Dn K O x hD (2) (w + 4) (2) (3) (4) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 6))))) := A1.Dn K O x hD (3) (w + 2) (3) (4) (5) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 8))))) := A1.Dn K O x hD (3) (w + 4) (3) (4) (5) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 10))))) := A1.Dn K O x hD (3) (w + 6) (3) (4) (5) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (2))))) := A1.Dn K O x hD (0) (1) (0) (1) (2) (1) (2) (3) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (7))))) := A1.Dn K O x hD (0) (6) (0) (1) (2) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (8))))) := A1.Dn K O x hD (0) (7) (0) (1) (2) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (7))))) := A1.Dn K O x hD (0) (6) (0) (1) (2) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (9))))) := A1.Dn K O x hD (0) (8) (0) (1) (2) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (8))))) := A1.Dn K O x hD (1) (6) (1) (2) (3) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (9))))) := A1.Dn K O x hD (2) (6) (2) (3) (4) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (Zs K x (11))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (8))))) := A1.Dn K O x hD (0) (7) (0) (1) (2) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (10))))) := A1.Dn K O x hD (0) (9) (0) (1) (2) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (9))))) := A1.Dn K O x hD (1) (7) (1) (2) (3) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (10))))) := A1.Dn K O x hD (2) (7) (2) (3) (4) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (10))))) := A1.Dn K O x hD (4) (5) (4) (5) (6) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) t13) (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (w + 11)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (w + 10))) (Zs K x (w + 12))) (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5)))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 7))))) := A1.Dn K O x hD (0) (w + 6) (0) (1) (2) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 9))))) := A1.Dn K O x hD (0) (w + 8) (0) (1) (2) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 11))))) := A1.Dn K O x hD (0) (w + 10) (0) (1) (2) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 8))))) := A1.Dn K O x hD (1) (w + 6) (1) (2) (3) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 10))))) := A1.Dn K O x hD (1) (w + 8) (1) (2) (3) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 7))))) := A1.Dn K O x hD (2) (w + 4) (2) (3) (4) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 11))))) := A1.Dn K O x hD (2) (w + 8) (2) (3) (4) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 8))))) := A1.Dn K O x hD (3) (w + 4) (3) (4) (5) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 10))))) := A1.Dn K O x hD (3) (w + 6) (3) (4) (5) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 7))))) := A1.Dn K O x hD (4) (w + 2) (4) (5) (6) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 9))))) := A1.Dn K O x hD (4) (w + 4) (4) (5) (6) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 11))))) := A1.Dn K O x hD (4) (w + 6) (4) (5) (6) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) t13) (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (7))))) := A1.Dn K O x hD (5) (1) (5) (6) (7) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (8))))) := A1.Dn K O x hD (1) (6) (1) (2) (3) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (8))))) := A1.Dn K O x hD (5) (2) (5) (6) (7) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (9))))) := A1.Dn K O x hD (1) (7) (1) (2) (3) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (7))))) := A1.Dn K O x hD (5) (1) (5) (6) (7) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))))) := A1.Dn K O x hD (5) (3) (5) (6) (7) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (Zs K x (11))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (8))))) := A1.Dn K O x hD (1) (6) (1) (2) (3) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (10))))) := A1.Dn K O x hD (1) (8) (1) (2) (3) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (9))))) := A1.Dn K O x hD (2) (6) (2) (3) (4) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (10))))) := A1.Dn K O x hD (3) (6) (3) (4) (5) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (8))))) := A1.Dn K O x hD (5) (2) (5) (6) (7) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (10))))) := A1.Dn K O x hD (5) (4) (5) (6) (7) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (11)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))) (Zs K x (12))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
                      have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (9))))) := A1.Dn K O x hD (1) (7) (1) (2) (3) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (11))))) := A1.Dn K O x hD (1) (9) (1) (2) (3) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (10))))) := A1.Dn K O x hD (2) (7) (2) (3) (4) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (11))))) := A1.Dn K O x hD (3) (7) (3) (4) (5) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (10))))) := A1.Dn K O x hD (4) (5) (4) (5) (6) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (7))))) := A1.Dn K O x hD (5) (1) (5) (6) (7) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))))) := A1.Dn K O x hD (5) (3) (5) (6) (7) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (11))))) := A1.Dn K O x hD (5) (5) (5) (6) (7) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) t13) (by lib_ring)
                    | succ w =>
                      rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (w + 12)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (w + 11))) (Zs K x (w + 13))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
                      have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 8))))) := A1.Dn K O x hD (1) (w + 6) (1) (2) (3) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 10))))) := A1.Dn K O x hD (1) (w + 8) (1) (2) (3) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 12))))) := A1.Dn K O x hD (1) (w + 10) (1) (2) (3) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 11))))) := A1.Dn K O x hD (2) (w + 8) (2) (3) (4) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 8))))) := A1.Dn K O x hD (3) (w + 4) (3) (4) (5) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 10))))) := A1.Dn K O x hD (3) (w + 6) (3) (4) (5) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 10))))) := A1.Dn K O x hD (3) (w + 6) (3) (4) (5) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 12))))) := A1.Dn K O x hD (3) (w + 8) (3) (4) (5) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 9))))) := A1.Dn K O x hD (4) (w + 4) (4) (5) (6) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 11))))) := A1.Dn K O x hD (4) (w + 6) (4) (5) (6) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 8))))) := A1.Dn K O x hD (5) (w + 2) (5) (6) (7) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 10))))) := A1.Dn K O x hD (5) (w + 4) (5) (6) (7) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 12))))) := A1.Dn K O x hD (5) (w + 6) (5) (6) (7) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) t13) (by lib_ring)
          | succ i =>
            cases i with
            | zero =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (8))))) := A1.Dn K O x hD (6) (1) (6) (7) (8) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10))) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (9))))) := A1.Dn K O x hD (2) (6) (2) (3) (4) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (8))))) := A1.Dn K O x hD (5) (2) (5) (6) (7) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (9))))) := A1.Dn K O x hD (6) (2) (6) (7) (8) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (Zs K x (11))) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (10))))) := A1.Dn K O x hD (2) (7) (2) (3) (4) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (10))))) := A1.Dn K O x hD (4) (5) (4) (5) (6) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))))) := A1.Dn K O x hD (5) (3) (5) (6) (7) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (8))))) := A1.Dn K O x hD (6) (1) (6) (7) (8) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))))) := A1.Dn K O x hD (6) (3) (6) (7) (8) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (11)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))) (Zs K x (12))) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))))))
                      have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (9))))) := A1.Dn K O x hD (2) (6) (2) (3) (4) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (11))))) := A1.Dn K O x hD (2) (8) (2) (3) (4) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (10))))) := A1.Dn K O x hD (3) (6) (3) (4) (5) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (11))))) := A1.Dn K O x hD (4) (6) (4) (5) (6) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (8))))) := A1.Dn K O x hD (5) (2) (5) (6) (7) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (10))))) := A1.Dn K O x hD (5) (4) (5) (6) (7) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (9))))) := A1.Dn K O x hD (6) (2) (6) (7) (8) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (11))))) := A1.Dn K O x hD (6) (4) (6) (7) (8) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (12)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (11))) (Zs K x (13))) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))))))
                        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (10))))) := A1.Dn K O x hD (2) (7) (2) (3) (4) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (12))))) := A1.Dn K O x hD (2) (9) (2) (3) (4) (11) (12) (13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (11))))) := A1.Dn K O x hD (3) (7) (3) (4) (5) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (10))))) := A1.Dn K O x hD (4) (5) (4) (5) (6) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (10))))) := A1.Dn K O x hD (4) (5) (4) (5) (6) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (12))))) := A1.Dn K O x hD (4) (7) (4) (5) (6) (11) (12) (13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))))) := A1.Dn K O x hD (5) (3) (5) (6) (7) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (11))))) := A1.Dn K O x hD (5) (5) (5) (6) (7) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (8))))) := A1.Dn K O x hD (6) (1) (6) (7) (8) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))))) := A1.Dn K O x hD (6) (3) (6) (7) (8) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (12))))) := A1.Dn K O x hD (6) (5) (6) (7) (8) (11) (12) (13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) t13) (by lib_ring)
                      | succ w =>
                        rw [show 0 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (w + 13)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (w + 12))) (Zs K x (w + 14))) (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7)))))))
                        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 11))))) := A1.Dn K O x hD (2) (w + 8) (2) (3) (4) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 12)) (Zs K x (w + 14))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 13))))) := A1.Dn K O x hD (2) (w + 10) (2) (3) (4) (w + 12) (w + 13) (w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 10))))) := A1.Dn K O x hD (3) (w + 6) (3) (4) (5) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 12))))) := A1.Dn K O x hD (3) (w + 8) (3) (4) (5) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 9))))) := A1.Dn K O x hD (4) (w + 4) (4) (5) (6) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 11))))) := A1.Dn K O x hD (4) (w + 6) (4) (5) (6) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 11))))) := A1.Dn K O x hD (4) (w + 6) (4) (5) (6) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 12)) (Zs K x (w + 14))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 13))))) := A1.Dn K O x hD (4) (w + 8) (4) (5) (6) (w + 12) (w + 13) (w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 10))))) := A1.Dn K O x hD (5) (w + 4) (5) (6) (7) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 12))))) := A1.Dn K O x hD (5) (w + 6) (5) (6) (7) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (w + 9))))) := A1.Dn K O x hD (6) (w + 2) (6) (7) (8) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (w + 11))))) := A1.Dn K O x hD (6) (w + 4) (6) (7) (8) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 12)) (Zs K x (w + 14))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (w + 13))))) := A1.Dn K O x hD (6) (w + 6) (6) (7) (8) (w + 12) (w + 13) (w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) t13) (by lib_ring)
            | succ a =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))) (Zs K x (a + 9))) (K.add (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))) (Zs K x (a + 10))) (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 5))))) := A1.Dn K O x hD (a + 3) (1) (a + 3) (a + 4) (a + 5) (a + 4) (a + 5) (a + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 3) (3) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 3) (5) (a + 3) (a + 4) (a + 5) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 5) (1) (a + 5) (a + 6) (a + 7) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 5) (3) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 7) (1) (a + 7) (a + 8) (a + 9) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))) (Zs K x (a + 9))) (K.add (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9))) (Zs K x (a + 11))) (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 3) (2) (a + 3) (a + 4) (a + 5) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 3) (4) (a + 3) (a + 4) (a + 5) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 3) (6) (a + 3) (a + 4) (a + 5) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 4) (2) (a + 4) (a + 5) (a + 6) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 4) (4) (a + 4) (a + 5) (a + 6) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 5) (2) (a + 5) (a + 6) (a + 7) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 5) (4) (a + 5) (a + 6) (a + 7) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 6) (2) (a + 6) (a + 7) (a + 8) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 7) (2) (a + 7) (a + 8) (a + 9) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))) (Zs K x (a + 9))) (K.add (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 11)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10))) (Zs K x (a + 12))) (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8)))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 3) (3) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 3) (5) (a + 3) (a + 4) (a + 5) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 3) (7) (a + 3) (a + 4) (a + 5) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 4) (3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 4) (5) (a + 4) (a + 5) (a + 6) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 5) (1) (a + 5) (a + 6) (a + 7) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 5) (3) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 5) (3) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 5) (5) (a + 5) (a + 6) (a + 7) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 6) (3) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 7) (1) (a + 7) (a + 8) (a + 9) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 7) (3) (a + 7) (a + 8) (a + 9) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))) (Zs K x (a + 9))) (K.add (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 12)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 11))) (Zs K x (a + 13))) (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8)))))))
                      have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 3) (4) (a + 3) (a + 4) (a + 5) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 3) (6) (a + 3) (a + 4) (a + 5) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 3) (8) (a + 3) (a + 4) (a + 5) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 4) (4) (a + 4) (a + 5) (a + 6) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 4) (6) (a + 4) (a + 5) (a + 6) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 5) (2) (a + 5) (a + 6) (a + 7) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 5) (4) (a + 5) (a + 6) (a + 7) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 5) (4) (a + 5) (a + 6) (a + 7) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 5) (6) (a + 5) (a + 6) (a + 7) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 6) (2) (a + 6) (a + 7) (a + 8) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 6) (4) (a + 6) (a + 7) (a + 8) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 7) (2) (a + 7) (a + 8) (a + 9) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 7) (4) (a + 7) (a + 8) (a + 9) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1 + 1) + 1 = a + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))) (Zs K x (a + 9))) (K.add (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 13)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 12))) (Zs K x (a + 14))) (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))))  -- (+3 chars; full line in the Zenodo source)
                        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 3) (5) (a + 3) (a + 4) (a + 5) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 3) (7) (a + 3) (a + 4) (a + 5) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 12)) (Zs K x (a + 14))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 13))))) := A1.Dn K O x hD (a + 3) (9) (a + 3) (a + 4) (a + 5) (a + 12) (a + 13) (a + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 4) (5) (a + 4) (a + 5) (a + 6) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 4) (7) (a + 4) (a + 5) (a + 6) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 5) (3) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 5) (5) (a + 5) (a + 6) (a + 7) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 5) (5) (a + 5) (a + 6) (a + 7) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 12)) (Zs K x (a + 14))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 13))))) := A1.Dn K O x hD (a + 5) (7) (a + 5) (a + 6) (a + 7) (a + 12) (a + 13) (a + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 6) (3) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 6) (5) (a + 6) (a + 7) (a + 8) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 7) (1) (a + 7) (a + 8) (a + 9) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 7) (3) (a + 7) (a + 8) (a + 9) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 12)) (Zs K x (a + 14))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 13))))) := A1.Dn K O x hD (a + 7) (5) (a + 7) (a + 8) (a + 9) (a + 12) (a + 13) (a + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) t13) (by lib_ring)
                      | succ w =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = a + w + 12 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))) (Zs K x (a + 9))) (K.add (K.add (Zs K x (a + w + 10)) (Zs K x (a + w + 12))) (Zs K x (a + w + 14)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (a + w + 9)) (Zs K x (a + w + 11))) (Zs K x (a + w + 13))) (Zs K x (a + w + 15))) (K.add (K.add (Zs K x (a + 4)) (Zs K x  -- (+32 chars; full line in the Zenodo source)
                        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 9)) (Zs K x (a + w + 11))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + w + 10))))) := A1.Dn K O x hD (a + 3) (w + 6) (a + 3) (a + 4) (a + 5) (a + w + 9) (a + w + 10) (a + w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 11)) (Zs K x (a + w + 13))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + w + 12))))) := A1.Dn K O x hD (a + 3) (w + 8) (a + 3) (a + 4) (a + 5) (a + w + 11) (a + w + 12) (a + w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 13)) (Zs K x (a + w + 15))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + w + 14))))) := A1.Dn K O x hD (a + 3) (w + 10) (a + 3) (a + 4) (a + 5) (a + w + 13) (a + w + 14) (a + w + 15) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 10)) (Zs K x (a + w + 12))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + w + 11))))) := A1.Dn K O x hD (a + 4) (w + 6) (a + 4) (a + 5) (a + 6) (a + w + 10) (a + w + 11) (a + w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 12)) (Zs K x (a + w + 14))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + w + 13))))) := A1.Dn K O x hD (a + 4) (w + 8) (a + 4) (a + 5) (a + 6) (a + w + 12) (a + w + 13) (a + w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 9)) (Zs K x (a + w + 11))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + w + 10))))) := A1.Dn K O x hD (a + 5) (w + 4) (a + 5) (a + 6) (a + 7) (a + w + 9) (a + w + 10) (a + w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 11)) (Zs K x (a + w + 13))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + w + 12))))) := A1.Dn K O x hD (a + 5) (w + 6) (a + 5) (a + 6) (a + 7) (a + w + 11) (a + w + 12) (a + w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 11)) (Zs K x (a + w + 13))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + w + 12))))) := A1.Dn K O x hD (a + 5) (w + 6) (a + 5) (a + 6) (a + 7) (a + w + 11) (a + w + 12) (a + w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 13)) (Zs K x (a + w + 15))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + w + 14))))) := A1.Dn K O x hD (a + 5) (w + 8) (a + 5) (a + 6) (a + 7) (a + w + 13) (a + w + 14) (a + w + 15) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 10)) (Zs K x (a + w + 12))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + w + 11))))) := A1.Dn K O x hD (a + 6) (w + 4) (a + 6) (a + 7) (a + 8) (a + w + 10) (a + w + 11) (a + w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 12)) (Zs K x (a + w + 14))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + w + 13))))) := A1.Dn K O x hD (a + 6) (w + 6) (a + 6) (a + 7) (a + 8) (a + w + 12) (a + w + 13) (a + w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 9)) (Zs K x (a + w + 11))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + w + 10))))) := A1.Dn K O x hD (a + 7) (w + 2) (a + 7) (a + 8) (a + 9) (a + w + 9) (a + w + 10) (a + w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 11)) (Zs K x (a + w + 13))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + w + 12))))) := A1.Dn K O x hD (a + 7) (w + 4) (a + 7) (a + 8) (a + 9) (a + w + 11) (a + w + 12) (a + w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 13)) (Zs K x (a + w + 15))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + w + 14))))) := A1.Dn K O x hD (a + 7) (w + 6) (a + 7) (a + 8) (a + 9) (a + w + 13) (a + w + 14) (a + w + 15) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) t13) (by lib_ring)

include hx hT hD h1 h10 in
theorem sg12 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (Zs K (pv3 K x)) (pv3 K x) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4))))))
      have t0 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (3)) (hx (3))
      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (4))))))
        have t0 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (2)) (hx (3))
        have t1 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (3)) (hx (4))
        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (4))))))
          have t0 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (1)) (hx (3))
          have t1 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (3)) (hx (3))
          have t2 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (6))) := O.mul_nonneg _ _ (hx (3)) (hx (5))
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (Zs K x (4))))))
            have t0 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (0)) (hx (3))
            have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (2)) (hx (3))
            have t2 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (3)) (hx (4))
            have t3 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (7))) := O.mul_nonneg _ _ (hx (3)) (hx (6))
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (Zs K x (4))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t4 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (1)) (hx (3))
              have t5 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (6))) := O.mul_nonneg _ _ (hx (1)) (hx (5))
              have t6 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (6))) := O.mul_nonneg _ _ (hx (3)) (hx (5))
              have t7 : O.le K.zero (K.mul (Zs K x (6)) (Zs K x (6))) := O.mul_nonneg _ _ (hx (5)) (hx (5))
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) (by lib_ring)
            | succ w =>
              rw [show 0 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (K.add (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (w + 8))) (Zs K x (w + 10)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (w + 3)) (Zs K x (w + 5))) (Zs K x (w + 7))) (Zs K x (w + 9))) (Zs K x (4))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 6))))) := A1.Dn K O x hD (3) (w + 2) (3) (4) (5) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (w + 6))) := O.mul_nonneg _ _ (hx (2)) (hx (w + 5))
              have t2 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (w + 3))) := O.mul_nonneg _ _ (hx (3)) (hx (w + 2))
              have t3 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (w + 9))) := O.mul_nonneg _ _ (hx (3)) (hx (w + 8))
              have t4 : O.le K.zero (K.mul (Zs K x (5)) (Zs K x (w + 6))) := O.mul_nonneg _ _ (hx (4)) (hx (w + 5))
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (Zs K x (3)) (Zs K x (5)))))))
        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
        have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5)))))) := by
          have h := A2.mk K O x hT (1) (3) (0)
          try rw [show (3) + (0) + 1 + (1) = 5 by lib_nat] at h
          try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
          try rw [show (3) + (1) = 4 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        have t2 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (2)) (hx (4))
        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (Zs K x (3)) (Zs K x (5)))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
            have h := A2.mk K O x hT (3) (2) (1)
            try rw [show (2) + (1) + 1 + (3) = 7 by lib_nat] at h
            try rw [show (2) + (1) + 1 = 4 by lib_nat] at h
            try rw [show (2) + (3) = 5 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t3 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (7))) := O.mul_nonneg _ _ (hx (1)) (hx (6))
          have t4 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (2)) (hx (3))
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (K.add (Zs K x (3)) (Zs K x (5)))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (2)) (Zs K x (6)))))) := by
              have h := A2.mk K O x hT (5) (0) (0)
              try rw [show (0) + (0) + 1 + (5) = 6 by lib_nat] at h
              try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
              try rw [show (0) + (5) = 5 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (9))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
              have h := A2.mk K O x hT (5) (0) (2)
              try rw [show (0) + (2) + 1 + (5) = 8 by lib_nat] at h
              try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
              try rw [show (0) + (5) = 5 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (8))))) := A1.Dn K O x hD (0) (7) (0) (1) (2) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t6 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6)))))) := by
              have h := A2.mk K O x hT (2) (3) (1)
              try rw [show (3) + (1) + 1 + (2) = 7 by lib_nat] at h
              try rw [show (3) + (1) + 1 = 5 by lib_nat] at h
              try rw [show (3) + (2) = 5 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t8 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (1)) (hx (3))
            have t9 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (8))) := O.mul_nonneg _ _ (hx (1)) (hx (7))
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (Zs K x (3)) (Zs K x (5)))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (8))) (K.neg (K.mul (Zs K x (2)) (Zs K x (7)))))) := by
                have h := A2.mk K O x hT (6) (0) (0)
                try rw [show (0) + (0) + 1 + (6) = 7 by lib_nat] at h
                try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                try rw [show (0) + (6) = 6 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (10))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7)))))) := by
                have h := A2.mk K O x hT (6) (0) (2)
                try rw [show (0) + (2) + 1 + (6) = 9 by lib_nat] at h
                try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
                try rw [show (0) + (6) = 6 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (9))))) := A1.Dn K O x hD (0) (8) (0) (1) (2) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t5 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
                have h := A2.mk K O x hT (3) (3) (1)
                try rw [show (3) + (1) + 1 + (3) = 8 by lib_nat] at h
                try rw [show (3) + (1) + 1 = 5 by lib_nat] at h
                try rw [show (3) + (3) = 6 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t7 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (0)) (hx (3))
              have t8 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (9))) := O.mul_nonneg _ _ (hx (1)) (hx (8))
              have t9 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (2)) (hx (3))
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (Zs K x (3)) (Zs K x (5)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (5))) (K.neg (K.mul (Zs K x (2)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT (3) (0) (0)
                  try rw [show (0) + (0) + 1 + (3) = 4 by lib_nat] at h
                  try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                  try rw [show (0) + (3) = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (9))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5)))))) := by
                  have h := A2.mk K O x hT (4) (0) (3)
                  try rw [show (0) + (3) + 1 + (4) = 8 by lib_nat] at h
                  try rw [show (0) + (3) + 1 = 4 by lib_nat] at h
                  try rw [show (0) + (4) = 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (8))))) := A1.Dn K O x hD (0) (7) (0) (1) (2) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t9 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (7))) := O.mul_nonneg _ _ (hx (2)) (hx (6))
                have t10 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (10))) (K.neg (K.mul (Zs K x (6)) (Zs K x (8)))))) := by
                  have h := A2.mk K O x hT (4) (3) (1)
                  try rw [show (3) + (1) + 1 + (4) = 9 by lib_nat] at h
                  try rw [show (3) + (1) + 1 = 5 by lib_nat] at h
                  try rw [show (3) + (4) = 7 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t11 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (8))) := O.mul_nonneg _ _ (hx (3)) (hx (7))
                have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (K.add (K.add (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (w + 9))) (Zs K x (w + 11)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (w + 8))) (Zs K x (w + 10))) (K.add (Zs K x (3)) (Zs K x (5)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 6))) (K.neg (K.mul (Zs K x (2)) (Zs K x (w + 5)))))) := by
                  have h := A2.mk K O x hT (w + 4) (0) (0)
                  try rw [show (0) + (0) + 1 + (w + 4) = w + 5 by lib_nat] at h
                  try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                  try rw [show (0) + (w + 4) = w + 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 6))) (K.neg (K.mul (Zs K x (2)) (Zs K x (w + 5)))))) := by
                  have h := A2.mk K O x hT (w + 4) (0) (0)
                  try rw [show (0) + (0) + 1 + (w + 4) = w + 5 by lib_nat] at h
                  try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                  try rw [show (0) + (w + 4) = w + 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (2)) (Zs K x (w + 9)))))) := by
                  have h := A2.mk K O x hT (w + 8) (0) (0)
                  try rw [show (0) + (0) + 1 + (w + 8) = w + 9 by lib_nat] at h
                  try rw [show (0) + (0) + 1 = 1 by lib_nat] at h
                  try rw [show (0) + (w + 8) = w + 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t3 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (3)) (Zs K x (w + 10)))))) := by
                  have h := A2.mk K O x hT (w + 9) (0) (1)
                  try rw [show (0) + (1) + 1 + (w + 9) = w + 11 by lib_nat] at h
                  try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
                  try rw [show (0) + (w + 9) = w + 9 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t4 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (w + 4)))))) := by
                  have h := A2.mk K O x hT (w + 3) (0) (3)
                  try rw [show (0) + (3) + 1 + (w + 3) = w + 7 by lib_nat] at h
                  try rw [show (0) + (3) + 1 = 4 by lib_nat] at h
                  try rw [show (0) + (w + 3) = w + 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t5 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (w + 4)))))) := by
                  have h := A2.mk K O x hT (w + 3) (0) (3)
                  try rw [show (0) + (3) + 1 + (w + 3) = w + 7 by lib_nat] at h
                  try rw [show (0) + (3) + 1 = 4 by lib_nat] at h
                  try rw [show (0) + (w + 3) = w + 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 7))))) := A1.Dn K O x hD (0) (w + 6) (0) (1) (2) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 7))))) := A1.Dn K O x hD (0) (w + 6) (0) (1) (2) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 11))))) := A1.Dn K O x hD (0) (w + 10) (0) (1) (2) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t9 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (w + 7))) := O.mul_nonneg _ _ (hx (1)) (hx (w + 6))
                have t10 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (w + 7))) := O.mul_nonneg _ _ (hx (1)) (hx (w + 6))
                have t11 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (w + 11))) := O.mul_nonneg _ _ (hx (1)) (hx (w + 10))
                have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 5))))) := A1.Dn K O x hD (2) (w + 2) (2) (3) (4) (w + 4) (w + 5) (w + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t13 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 5))))) := A1.Dn K O x hD (2) (w + 2) (2) (3) (4) (w + 4) (w + 5) (w + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t14 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t15 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (w + 8))) := O.mul_nonneg _ _ (hx (2)) (hx (w + 7))
                have t16 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (5)) (Zs K x (w + 10)))))) := by
                  have h := A2.mk K O x hT (w + 6) (3) (0)
                  try rw [show (3) + (0) + 1 + (w + 6) = w + 10 by lib_nat] at h
                  try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                  try rw [show (3) + (w + 6) = w + 9 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t17 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (5)) (Zs K x (w + 10)))))) := by
                  have h := A2.mk K O x hT (w + 6) (3) (0)
                  try rw [show (3) + (0) + 1 + (w + 6) = w + 10 by lib_nat] at h
                  try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                  try rw [show (3) + (w + 6) = w + 9 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t18 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (6)) (Zs K x (w + 7)))))) := by
                  have h := A2.mk K O x hT (w + 3) (3) (1)
                  try rw [show (3) + (1) + 1 + (w + 3) = w + 8 by lib_nat] at h
                  try rw [show (3) + (1) + 1 = 5 by lib_nat] at h
                  try rw [show (3) + (w + 3) = w + 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t19 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (6)) (Zs K x (w + 7)))))) := by
                  have h := A2.mk K O x hT (w + 3) (3) (1)
                  try rw [show (3) + (1) + 1 + (w + 3) = w + 8 by lib_nat] at h
                  try rw [show (3) + (1) + 1 = 5 by lib_nat] at h
                  try rw [show (3) + (w + 3) = w + 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t20 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (w + 9))) := O.mul_nonneg _ _ (hx (3)) (hx (w + 8))
                have t21 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 7))))) := A1.Dn K O x hD (4) (w + 2) (4) (5) (6) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t22 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 7))))) := A1.Dn K O x hD (4) (w + 2) (4) (5) (6) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact nn_scale K O h1 h10 2 (Nat.le_of_ble_eq_true rfl) _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (  -- (+211 chars; full line in the Zenodo source)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t3 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6)))))) := by
            have h := A2.mk K O x hT (2) (3) (1)
            try rw [show (3) + (1) + 1 + (2) = 7 by lib_nat] at h
            try rw [show (3) + (1) + 1 = 5 by lib_nat] at h
            try rw [show (3) + (2) = 5 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t5 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (6))) := O.mul_nonneg _ _ (hx (1)) (hx (5))
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t3 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
              have h := A2.mk K O x hT (3) (3) (1)
              try rw [show (3) + (1) + 1 + (3) = 8 by lib_nat] at h
              try rw [show (3) + (1) + 1 = 5 by lib_nat] at h
              try rw [show (3) + (3) = 6 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t5 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (7))) := O.mul_nonneg _ _ (hx (1)) (hx (6))
            have t6 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (2)) (hx (3))
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t4 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (10))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT (4) (1) (3)
                try rw [show (1) + (3) + 1 + (4) = 9 by lib_nat] at h
                try rw [show (1) + (3) + 1 = 5 by lib_nat] at h
                try rw [show (1) + (4) = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (9))))) := A1.Dn K O x hD (1) (7) (1) (2) (3) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t8 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (6)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (3) (4) (0)
                try rw [show (4) + (0) + 1 + (3) = 8 by lib_nat] at h
                try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                try rw [show (4) + (3) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t9 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (0)) (hx (4))
              have t10 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (9))) := O.mul_nonneg _ _ (hx (0)) (hx (8))
              have t11 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (2)) (hx (4))
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (7))))) := A1.Dn K O x hD (0) (6) (0) (1) (2) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (8))))) := A1.Dn K O x hD (1) (6) (1) (2) (3) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t6 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (11))) (K.neg (K.mul (Zs K x (7)) (Zs K x (8)))))) := by
                  have h := A2.mk K O x hT (4) (3) (2)
                  try rw [show (3) + (2) + 1 + (4) = 10 by lib_nat] at h
                  try rw [show (3) + (2) + 1 = 6 by lib_nat] at h
                  try rw [show (3) + (4) = 7 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (10))))) := A1.Dn K O x hD (3) (6) (3) (4) (5) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (8))))) := A1.Dn K O x hD (5) (2) (5) (6) (7) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t9 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (0)) (hx (3))
                have t10 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (6))) := O.mul_nonneg _ _ (hx (2)) (hx (5))
                have t11 : O.le K.zero (K.mul (Zs K x (5)) (Zs K x (6))) := O.mul_nonneg _ _ (hx (4)) (hx (5))
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (Zs K x (11)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (10))))) := A1.Dn K O x hD (0) (9) (0) (1) (2) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (12))) (K.neg (K.mul (Zs K x (7)) (Zs K x (7)))))) := by
                    have h := A2.mk K O x hT (5) (1) (4)
                    try rw [show (1) + (4) + 1 + (5) = 11 by lib_nat] at h
                    try rw [show (1) + (4) + 1 = 6 by lib_nat] at h
                    try rw [show (1) + (5) = 6 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (9))))) := A1.Dn K O x hD (1) (7) (1) (2) (3) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (11))))) := A1.Dn K O x hD (1) (9) (1) (2) (3) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                    have h := A2.mk K O x hT (3) (2) (0)
                    try rw [show (2) + (0) + 1 + (3) = 6 by lib_nat] at h
                    try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                    try rw [show (2) + (3) = 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t7 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (11))) (K.neg (K.mul (Zs K x (6)) (Zs K x (10)))))) := by
                    have h := A2.mk K O x hT (5) (4) (0)
                    try rw [show (4) + (0) + 1 + (5) = 10 by lib_nat] at h
                    try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                    try rw [show (4) + (5) = 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (7))))) := A1.Dn K O x hD (5) (1) (5) (6) (7) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t9 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (1)) (hx (3))
                  have t10 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (6))) := O.mul_nonneg _ _ (hx (1)) (hx (5))
                  have t11 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (9))) := O.mul_nonneg _ _ (hx (2)) (hx (8))
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (K.add (K.add (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (w + 10))) (Zs K x (w + 12)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (w + 9))) (Zs K x (w + 11))) (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 11))))) := A1.Dn K O x hD (0) (w + 10) (0) (1) (2) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 13))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (7)))))) := by
                    have h := A2.mk K O x hT (5) (1) (w + 5)
                    try rw [show (1) + (w + 5) + 1 + (5) = w + 12 by lib_nat] at h
                    try rw [show (1) + (w + 5) + 1 = w + 7 by lib_nat] at h
                    try rw [show (1) + (5) = 6 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 10))))) := A1.Dn K O x hD (1) (w + 8) (1) (2) (3) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 12))))) := A1.Dn K O x hD (1) (w + 10) (1) (2) (3) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 8))) (K.neg (K.mul (Zs K x (w + 5)) (Zs K x (6)))))) := by
                    have h := A2.mk K O x hT (3) (2) (w + 1)
                    try rw [show (2) + (w + 1) + 1 + (3) = w + 7 by lib_nat] at h
                    try rw [show (2) + (w + 1) + 1 = w + 4 by lib_nat] at h
                    try rw [show (2) + (3) = 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 6))))) := A1.Dn K O x hD (3) (w + 2) (3) (4) (5) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 10))))) := A1.Dn K O x hD (3) (w + 6) (3) (4) (5) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t7 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (6)))))) := by
                    have h := A2.mk K O x hT (1) (4) (w + 5)
                    try rw [show (4) + (w + 5) + 1 + (1) = w + 11 by lib_nat] at h
                    try rw [show (4) + (w + 5) + 1 = w + 10 by lib_nat] at h
                    try rw [show (4) + (1) = 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 8))))) := A1.Dn K O x hD (5) (w + 2) (5) (6) (7) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t9 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (w + 5))) := O.mul_nonneg _ _ (hx (1)) (hx (w + 4))
                  have t10 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (w + 7))) := O.mul_nonneg _ _ (hx (1)) (hx (w + 6))
                  have t11 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (w + 10))) := O.mul_nonneg _ _ (hx (2)) (hx (w + 9))
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7)))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (2))))) := A1.Dn K O x hD (0) (1) (0) (1) (2) (1) (2) (3) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (9))) (K.neg (K.mul (Zs K x (3)) (Zs K x (7)))))) := by
              have h := A2.mk K O x hT (6) (0) (1)
              try rw [show (0) + (1) + 1 + (6) = 8 by lib_nat] at h
              try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
              try rw [show (0) + (6) = 6 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (8))))) := A1.Dn K O x hD (0) (7) (0) (1) (2) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t8 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (7)) (Zs K x (7)))))) := by
              have h := A2.mk K O x hT (2) (4) (1)
              try rw [show (4) + (1) + 1 + (2) = 8 by lib_nat] at h
              try rw [show (4) + (1) + 1 = 6 by lib_nat] at h
              try rw [show (4) + (2) = 6 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7)))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (7))))) := A1.Dn K O x hD (0) (6) (0) (1) (2) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (9))) (K.neg (K.mul (Zs K x (3)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (6) (1) (0)
                try rw [show (1) + (0) + 1 + (6) = 8 by lib_nat] at h
                try rw [show (1) + (0) + 1 = 2 by lib_nat] at h
                try rw [show (1) + (6) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t3 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (10))) (K.neg (K.mul (Zs K x (7)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (3) (4) (1)
                try rw [show (4) + (1) + 1 + (3) = 9 by lib_nat] at h
                try rw [show (4) + (1) + 1 = 6 by lib_nat] at h
                try rw [show (4) + (3) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t5 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (3))) := O.mul_nonneg _ _ (hx (1)) (hx (2))
              have t6 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (7))) := O.mul_nonneg _ _ (hx (1)) (hx (6))
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (9))) (K.neg (K.mul (Zs K x (3)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT (6) (0) (1)
                  try rw [show (0) + (1) + 1 + (6) = 8 by lib_nat] at h
                  try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
                  try rw [show (0) + (6) = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (8))))) := A1.Dn K O x hD (0) (7) (0) (1) (2) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (11))) (K.neg (K.mul (Zs K x (7)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT (4) (2) (3)
                  try rw [show (2) + (3) + 1 + (4) = 10 by lib_nat] at h
                  try rw [show (2) + (3) + 1 = 6 by lib_nat] at h
                  try rw [show (2) + (4) = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (10))))) := A1.Dn K O x hD (2) (7) (2) (3) (4) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t9 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (10))) (K.neg (K.mul (Zs K x (7)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (3) (5) (0)
                  try rw [show (5) + (0) + 1 + (3) = 9 by lib_nat] at h
                  try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                  try rw [show (5) + (3) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t10 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (9))) := O.mul_nonneg _ _ (hx (0)) (hx (8))
                have t11 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (1)) (hx (3))
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (Zs K x (11)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10))) (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (9))))) := A1.Dn K O x hD (0) (8) (0) (1) (2) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (12))) (K.neg (K.mul (Zs K x (6)) (Zs K x (9)))))) := by
                    have h := A2.mk K O x hT (6) (2) (2)
                    try rw [show (2) + (2) + 1 + (6) = 11 by lib_nat] at h
                    try rw [show (2) + (2) + 1 = 5 by lib_nat] at h
                    try rw [show (2) + (6) = 8 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (11))))) := A1.Dn K O x hD (2) (8) (2) (3) (4) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t8 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (11))) (K.neg (K.mul (Zs K x (8)) (Zs K x (9)))))) := by
                    have h := A2.mk K O x hT (3) (5) (1)
                    try rw [show (5) + (1) + 1 + (3) = 10 by lib_nat] at h
                    try rw [show (5) + (1) + 1 = 7 by lib_nat] at h
                    try rw [show (5) + (3) = 8 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (9))))) := A1.Dn K O x hD (6) (2) (6) (7) (8) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t10 : O.le K.zero (K.mul (Zs K x (2)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (1)) (hx (4))
                  have t11 : O.le K.zero (K.mul (Zs K x (5)) (Zs K x (6))) := O.mul_nonneg _ _ (hx (4)) (hx (5))
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))) (Zs K x (12)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (Zs K x (11))) (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
                      have h := A2.mk K O x hT (4) (0) (1)
                      try rw [show (0) + (1) + 1 + (4) = 6 by lib_nat] at h
                      try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
                      try rw [show (0) + (4) = 4 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (8))))) := A1.Dn K O x hD (0) (7) (0) (1) (2) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (10))))) := A1.Dn K O x hD (0) (9) (0) (1) (2) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (10))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
                      have h := A2.mk K O x hT (5) (1) (2)
                      try rw [show (1) + (2) + 1 + (5) = 9 by lib_nat] at h
                      try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
                      try rw [show (1) + (5) = 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (9))))) := A1.Dn K O x hD (1) (7) (1) (2) (3) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t7 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (13))) (K.neg (K.mul (Zs K x (8)) (Zs K x (8)))))) := by
                      have h := A2.mk K O x hT (5) (2) (4)
                      try rw [show (2) + (4) + 1 + (5) = 12 by lib_nat] at h
                      try rw [show (2) + (4) + 1 = 7 by lib_nat] at h
                      try rw [show (2) + (5) = 7 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (12))))) := A1.Dn K O x hD (2) (9) (2) (3) (4) (11) (12) (13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (10))))) := A1.Dn K O x hD (4) (5) (4) (5) (6) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t11 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (12))) (K.neg (K.mul (Zs K x (7)) (Zs K x (11)))))) := by
                      have h := A2.mk K O x hT (5) (5) (0)
                      try rw [show (5) + (0) + 1 + (5) = 11 by lib_nat] at h
                      try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                      try rw [show (5) + (5) = 10 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (8))))) := A1.Dn K O x hD (6) (1) (6) (7) (8) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t13 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (9))) := O.mul_nonneg _ _ (hx (2)) (hx (8))
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) t13) (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (K.add (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (w + 11))) (Zs K x (w + 13)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (w + 10))) (Zs K x (w + 12))) (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7)))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 7))))) := A1.Dn K O x hD (0) (w + 6) (0) (1) (2) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 14))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (8)))))) := by
                      have h := A2.mk K O x hT (7) (0) (w + 5)
                      try rw [show (0) + (w + 5) + 1 + (7) = w + 13 by lib_nat] at h
                      try rw [show (0) + (w + 5) + 1 = w + 6 by lib_nat] at h
                      try rw [show (0) + (7) = 7 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 9))))) := A1.Dn K O x hD (0) (w + 8) (0) (1) (2) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 12)) (Zs K x (w + 14))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 13))))) := A1.Dn K O x hD (0) (w + 12) (0) (1) (2) (w + 12) (w + 13) (w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 9))) (K.neg (K.mul (Zs K x (w + 6)) (Zs K x (5)))))) := by
                      have h := A2.mk K O x hT (3) (1) (w + 3)
                      try rw [show (1) + (w + 3) + 1 + (3) = w + 8 by lib_nat] at h
                      try rw [show (1) + (w + 3) + 1 = w + 5 by lib_nat] at h
                      try rw [show (1) + (3) = 4 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 8))))) := A1.Dn K O x hD (1) (w + 6) (1) (2) (3) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 7))))) := A1.Dn K O x hD (2) (w + 4) (2) (3) (4) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 11))))) := A1.Dn K O x hD (2) (w + 8) (2) (3) (4) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 9))))) := A1.Dn K O x hD (4) (w + 4) (4) (5) (6) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t9 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 14))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (8)))))) := by
                      have h := A2.mk K O x hT (3) (4) (w + 5)
                      try rw [show (4) + (w + 5) + 1 + (3) = w + 13 by lib_nat] at h
                      try rw [show (4) + (w + 5) + 1 = w + 10 by lib_nat] at h
                      try rw [show (4) + (3) = 7 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 12)) (Zs K x (w + 14))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 13))))) := A1.Dn K O x hD (4) (w + 8) (4) (5) (6) (w + 12) (w + 13) (w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t11 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (w + 7))))) := A1.Dn K O x hD (6) (w) (6) (7) (8) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t12 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (w + 11))))) := A1.Dn K O x hD (6) (w + 4) (6) (7) (8) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t13 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (w + 8))) := O.mul_nonneg _ _ (hx (2)) (hx (w + 7))
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) t11) t12) t13) (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8)))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (10))) (K.neg (K.mul (Zs K x (4)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (6) (1) (1)
                try rw [show (1) + (1) + 1 + (6) = 9 by lib_nat] at h
                try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
                try rw [show (1) + (6) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (9))))) := A1.Dn K O x hD (1) (7) (1) (2) (3) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (7))))) := A1.Dn K O x hD (5) (1) (5) (6) (7) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t8 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (10))) (K.neg (K.mul (Zs K x (8)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (2) (5) (1)
                try rw [show (5) + (1) + 1 + (2) = 9 by lib_nat] at h
                try rw [show (5) + (1) + 1 = 7 by lib_nat] at h
                try rw [show (5) + (2) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))))) := A1.Dn K O x hD (5) (3) (5) (6) (7) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8)))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (6))) (K.neg (K.mul (Zs K x (3)) (Zs K x (4)))))) := by
                  have h := A2.mk K O x hT (3) (0) (1)
                  try rw [show (0) + (1) + 1 + (3) = 5 by lib_nat] at h
                  try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
                  try rw [show (0) + (3) = 3 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (10))) (K.neg (K.mul (Zs K x (3)) (Zs K x (8)))))) := by
                  have h := A2.mk K O x hT (7) (0) (1)
                  try rw [show (0) + (1) + 1 + (7) = 9 by lib_nat] at h
                  try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
                  try rw [show (0) + (7) = 7 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (8))))) := A1.Dn K O x hD (1) (6) (1) (2) (3) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (11))) (K.neg (K.mul (Zs K x (5)) (Zs K x (10)))))) := by
                  have h := A2.mk K O x hT (6) (3) (0)
                  try rw [show (3) + (0) + 1 + (6) = 10 by lib_nat] at h
                  try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                  try rw [show (3) + (6) = 9 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (10))))) := A1.Dn K O x hD (3) (6) (3) (4) (5) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t6 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (11))) (K.neg (K.mul (Zs K x (8)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (3) (5) (1)
                  try rw [show (5) + (1) + 1 + (3) = 10 by lib_nat] at h
                  try rw [show (5) + (1) + 1 = 7 by lib_nat] at h
                  try rw [show (5) + (3) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (10))))) := A1.Dn K O x hD (5) (4) (5) (6) (7) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (Zs K x (11)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10))) (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8)))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (7))) (K.neg (K.mul (Zs K x (3)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT (4) (0) (1)
                    try rw [show (0) + (1) + 1 + (4) = 6 by lib_nat] at h
                    try rw [show (0) + (1) + 1 = 2 by lib_nat] at h
                    try rw [show (0) + (4) = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (11))) (K.neg (K.mul (Zs K x (4)) (Zs K x (8)))))) := by
                    have h := A2.mk K O x hT (7) (0) (2)
                    try rw [show (0) + (2) + 1 + (7) = 10 by lib_nat] at h
                    try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
                    try rw [show (0) + (7) = 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (9))))) := A1.Dn K O x hD (1) (7) (1) (2) (3) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t6 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (12))) (K.neg (K.mul (Zs K x (8)) (Zs K x (8)))))) := by
                    have h := A2.mk K O x hT (4) (3) (3)
                    try rw [show (3) + (3) + 1 + (4) = 11 by lib_nat] at h
                    try rw [show (3) + (3) + 1 = 7 by lib_nat] at h
                    try rw [show (3) + (4) = 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (11))))) := A1.Dn K O x hD (3) (7) (3) (4) (5) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (7))))) := A1.Dn K O x hD (5) (1) (5) (6) (7) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))))) := A1.Dn K O x hD (5) (3) (5) (6) (7) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t10 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (11))) (K.neg (K.mul (Zs K x (8)) (Zs K x (10)))))) := by
                    have h := A2.mk K O x hT (3) (6) (0)
                    try rw [show (6) + (0) + 1 + (3) = 10 by lib_nat] at h
                    try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                    try rw [show (6) + (3) = 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))) (Zs K x (12)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (Zs K x (11))) (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
                      have h := A2.mk K O x hT (4) (0) (2)
                      try rw [show (0) + (2) + 1 + (4) = 7 by lib_nat] at h
                      try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
                      try rw [show (0) + (4) = 4 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (12))) (K.neg (K.mul (Zs K x (5)) (Zs K x (8)))))) := by
                      have h := A2.mk K O x hT (7) (0) (3)
                      try rw [show (0) + (3) + 1 + (7) = 11 by lib_nat] at h
                      try rw [show (0) + (3) + 1 = 4 by lib_nat] at h
                      try rw [show (0) + (7) = 7 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (10))))) := A1.Dn K O x hD (1) (8) (1) (2) (3) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t5 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (13))) (K.neg (K.mul (Zs K x (8)) (Zs K x (9)))))) := by
                      have h := A2.mk K O x hT (5) (3) (3)
                      try rw [show (3) + (3) + 1 + (5) = 12 by lib_nat] at h
                      try rw [show (3) + (3) + 1 = 7 by lib_nat] at h
                      try rw [show (3) + (5) = 8 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (12))))) := A1.Dn K O x hD (3) (8) (3) (4) (5) (11) (12) (13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (10))))) := A1.Dn K O x hD (5) (4) (5) (6) (7) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t8 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (12))) (K.neg (K.mul (Zs K x (8)) (Zs K x (11)))))) := by
                      have h := A2.mk K O x hT (4) (6) (0)
                      try rw [show (6) + (0) + 1 + (4) = 11 by lib_nat] at h
                      try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                      try rw [show (6) + (4) = 10 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (11))) (Zs K x (13)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))) (Zs K x (12))) (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8)))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (9))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                        have h := A2.mk K O x hT (5) (0) (2)
                        try rw [show (0) + (2) + 1 + (5) = 8 by lib_nat] at h
                        try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
                        try rw [show (0) + (5) = 5 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (13))) (K.neg (K.mul (Zs K x (6)) (Zs K x (8)))))) := by
                        have h := A2.mk K O x hT (7) (0) (4)
                        try rw [show (0) + (4) + 1 + (7) = 12 by lib_nat] at h
                        try rw [show (0) + (4) + 1 = 5 by lib_nat] at h
                        try rw [show (0) + (7) = 7 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (11))))) := A1.Dn K O x hD (1) (9) (1) (2) (3) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t5 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (14))) (K.neg (K.mul (Zs K x (9)) (Zs K x (9)))))) := by
                        have h := A2.mk K O x hT (5) (3) (4)
                        try rw [show (3) + (4) + 1 + (5) = 13 by lib_nat] at h
                        try rw [show (3) + (4) + 1 = 8 by lib_nat] at h
                        try rw [show (3) + (5) = 8 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (12)) (Zs K x (14))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (13))))) := A1.Dn K O x hD (3) (9) (3) (4) (5) (12) (13) (14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (7))))) := A1.Dn K O x hD (5) (1) (5) (6) (7) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (11))))) := A1.Dn K O x hD (5) (5) (5) (6) (7) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t9 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (13))) (K.neg (K.mul (Zs K x (8)) (Zs K x (12)))))) := by
                        have h := A2.mk K O x hT (5) (6) (0)
                        try rw [show (6) + (0) + 1 + (5) = 12 by lib_nat] at h
                        try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                        try rw [show (6) + (5) = 11 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (8))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (9))))) := A1.Dn K O x hD (7) (1) (7) (8) (9) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) (by lib_ring)
                    | succ w =>
                      rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (Zs K x (7))) (K.add (K.add (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (w + 12))) (Zs K x (w + 14)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (w + 11))) (Zs K x (w + 13))) (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))  -- (+19 chars; full line in the Zenodo source)
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (4)))))) := by
                        have h := A2.mk K O x hT (3) (0) (w + 5)
                        try rw [show (0) + (w + 5) + 1 + (3) = w + 9 by lib_nat] at h
                        try rw [show (0) + (w + 5) + 1 = w + 6 by lib_nat] at h
                        try rw [show (0) + (3) = 3 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 14))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (8)))))) := by
                        have h := A2.mk K O x hT (7) (0) (w + 5)
                        try rw [show (0) + (w + 5) + 1 + (7) = w + 13 by lib_nat] at h
                        try rw [show (0) + (w + 5) + 1 = w + 6 by lib_nat] at h
                        try rw [show (0) + (7) = 7 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 8))))) := A1.Dn K O x hD (1) (w + 6) (1) (2) (3) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 12))))) := A1.Dn K O x hD (1) (w + 10) (1) (2) (3) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 10))))) := A1.Dn K O x hD (3) (w + 6) (3) (4) (5) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t5 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 15))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (9)))))) := by
                        have h := A2.mk K O x hT (5) (3) (w + 5)
                        try rw [show (3) + (w + 5) + 1 + (5) = w + 14 by lib_nat] at h
                        try rw [show (3) + (w + 5) + 1 = w + 9 by lib_nat] at h
                        try rw [show (3) + (5) = 8 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 13)) (Zs K x (w + 15))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 14))))) := A1.Dn K O x hD (3) (w + 10) (3) (4) (5) (w + 13) (w + 14) (w + 15) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 8))))) := A1.Dn K O x hD (5) (w + 2) (5) (6) (7) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 12))))) := A1.Dn K O x hD (5) (w + 6) (5) (6) (7) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t9 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (w + 14))) (K.neg (K.mul (Zs K x (w + 13)) (Zs K x (8)))))) := by
                        have h := A2.mk K O x hT (1) (6) (w + 5)
                        try rw [show (6) + (w + 5) + 1 + (1) = w + 13 by lib_nat] at h
                        try rw [show (6) + (w + 5) + 1 = w + 12 by lib_nat] at h
                        try rw [show (6) + (1) = 7 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (8))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (w + 10))))) := A1.Dn K O x hD (7) (w + 2) (7) (8) (9) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) (by lib_ring)
          | succ i =>
            cases i with
            | zero =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9))) (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (11))) (K.neg (K.mul (Zs K x (5)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (6) (2) (1)
                  try rw [show (2) + (1) + 1 + (6) = 10 by lib_nat] at h
                  try rw [show (2) + (1) + 1 = 4 by lib_nat] at h
                  try rw [show (2) + (6) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (10))))) := A1.Dn K O x hD (2) (7) (2) (3) (4) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (8))))) := A1.Dn K O x hD (6) (1) (6) (7) (8) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t8 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (11))) (K.neg (K.mul (Zs K x (9)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (2) (6) (1)
                  try rw [show (6) + (1) + 1 + (2) = 10 by lib_nat] at h
                  try rw [show (6) + (1) + 1 = 8 by lib_nat] at h
                  try rw [show (6) + (2) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))))) := A1.Dn K O x hD (6) (3) (6) (7) (8) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (Zs K x (11)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (Zs K x (10))) (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9)))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
                    have h := A2.mk K O x hT (3) (1) (1)
                    try rw [show (1) + (1) + 1 + (3) = 6 by lib_nat] at h
                    try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
                    try rw [show (1) + (3) = 4 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (11))) (K.neg (K.mul (Zs K x (4)) (Zs K x (9)))))) := by
                    have h := A2.mk K O x hT (7) (1) (1)
                    try rw [show (1) + (1) + 1 + (7) = 10 by lib_nat] at h
                    try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
                    try rw [show (1) + (7) = 8 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (9))))) := A1.Dn K O x hD (2) (6) (2) (3) (4) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (11))) (K.neg (K.mul (Zs K x (5)) (Zs K x (10)))))) := by
                    have h := A2.mk K O x hT (6) (3) (0)
                    try rw [show (3) + (0) + 1 + (6) = 10 by lib_nat] at h
                    try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                    try rw [show (3) + (6) = 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t5 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (12))) (K.neg (K.mul (Zs K x (9)) (Zs K x (10)))))) := by
                    have h := A2.mk K O x hT (3) (6) (1)
                    try rw [show (6) + (1) + 1 + (3) = 11 by lib_nat] at h
                    try rw [show (6) + (1) + 1 = 8 by lib_nat] at h
                    try rw [show (6) + (3) = 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (11))))) := A1.Dn K O x hD (6) (4) (6) (7) (8) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))) (Zs K x (12)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (Zs K x (11))) (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9)))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                      have h := A2.mk K O x hT (4) (1) (1)
                      try rw [show (1) + (1) + 1 + (4) = 7 by lib_nat] at h
                      try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
                      try rw [show (1) + (4) = 5 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (12))) (K.neg (K.mul (Zs K x (5)) (Zs K x (9)))))) := by
                      have h := A2.mk K O x hT (7) (1) (2)
                      try rw [show (1) + (2) + 1 + (7) = 11 by lib_nat] at h
                      try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
                      try rw [show (1) + (7) = 8 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (10))))) := A1.Dn K O x hD (2) (7) (2) (3) (4) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t6 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (13))) (K.neg (K.mul (Zs K x (9)) (Zs K x (9)))))) := by
                      have h := A2.mk K O x hT (4) (4) (3)
                      try rw [show (4) + (3) + 1 + (4) = 12 by lib_nat] at h
                      try rw [show (4) + (3) + 1 = 8 by lib_nat] at h
                      try rw [show (4) + (4) = 8 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (12))))) := A1.Dn K O x hD (4) (7) (4) (5) (6) (11) (12) (13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (8))))) := A1.Dn K O x hD (6) (1) (6) (7) (8) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))))) := A1.Dn K O x hD (6) (3) (6) (7) (8) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t10 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (12))) (K.neg (K.mul (Zs K x (9)) (Zs K x (11)))))) := by
                      have h := A2.mk K O x hT (3) (7) (0)
                      try rw [show (7) + (0) + 1 + (3) = 11 by lib_nat] at h
                      try rw [show (7) + (0) + 1 = 8 by lib_nat] at h
                      try rw [show (7) + (3) = 10 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (11))) (Zs K x (13)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))) (Zs K x (12))) (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9)))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (9))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
                        have h := A2.mk K O x hT (4) (1) (2)
                        try rw [show (1) + (2) + 1 + (4) = 8 by lib_nat] at h
                        try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
                        try rw [show (1) + (4) = 5 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (13))) (K.neg (K.mul (Zs K x (6)) (Zs K x (9)))))) := by
                        have h := A2.mk K O x hT (7) (1) (3)
                        try rw [show (1) + (3) + 1 + (7) = 12 by lib_nat] at h
                        try rw [show (1) + (3) + 1 = 5 by lib_nat] at h
                        try rw [show (1) + (7) = 8 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (11))))) := A1.Dn K O x hD (2) (8) (2) (3) (4) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t5 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (14))) (K.neg (K.mul (Zs K x (9)) (Zs K x (10)))))) := by
                        have h := A2.mk K O x hT (5) (4) (3)
                        try rw [show (4) + (3) + 1 + (5) = 13 by lib_nat] at h
                        try rw [show (4) + (3) + 1 = 8 by lib_nat] at h
                        try rw [show (4) + (5) = 9 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (12)) (Zs K x (14))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (13))))) := A1.Dn K O x hD (4) (8) (4) (5) (6) (12) (13) (14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (11))))) := A1.Dn K O x hD (6) (4) (6) (7) (8) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t8 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (13))) (K.neg (K.mul (Zs K x (9)) (Zs K x (12)))))) := by
                        have h := A2.mk K O x hT (4) (7) (0)
                        try rw [show (7) + (0) + 1 + (4) = 12 by lib_nat] at h
                        try rw [show (7) + (0) + 1 = 8 by lib_nat] at h
                        try rw [show (7) + (4) = 11 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (12))) (Zs K x (14)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (11))) (Zs K x (13))) (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (Zs K x (9)))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (10))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
                          have h := A2.mk K O x hT (5) (1) (2)
                          try rw [show (1) + (2) + 1 + (5) = 9 by lib_nat] at h
                          try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
                          try rw [show (1) + (5) = 6 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (14))) (K.neg (K.mul (Zs K x (7)) (Zs K x (9)))))) := by
                          have h := A2.mk K O x hT (7) (1) (4)
                          try rw [show (1) + (4) + 1 + (7) = 13 by lib_nat] at h
                          try rw [show (1) + (4) + 1 = 6 by lib_nat] at h
                          try rw [show (1) + (7) = 8 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (12))))) := A1.Dn K O x hD (2) (9) (2) (3) (4) (11) (12) (13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (10))))) := A1.Dn K O x hD (4) (5) (4) (5) (6) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t5 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (15))) (K.neg (K.mul (Zs K x (10)) (Zs K x (10)))))) := by
                          have h := A2.mk K O x hT (5) (4) (4)
                          try rw [show (4) + (4) + 1 + (5) = 14 by lib_nat] at h
                          try rw [show (4) + (4) + 1 = 9 by lib_nat] at h
                          try rw [show (4) + (5) = 9 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (13)) (Zs K x (15))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (14))))) := A1.Dn K O x hD (4) (9) (4) (5) (6) (13) (14) (15) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (8))))) := A1.Dn K O x hD (6) (1) (6) (7) (8) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (12))))) := A1.Dn K O x hD (6) (5) (6) (7) (8) (11) (12) (13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t9 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (14))) (K.neg (K.mul (Zs K x (9)) (Zs K x (13)))))) := by
                          have h := A2.mk K O x hT (5) (7) (0)
                          try rw [show (7) + (0) + 1 + (5) = 13 by lib_nat] at h
                          try rw [show (7) + (0) + 1 = 8 by lib_nat] at h
                          try rw [show (7) + (5) = 12 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (9))) (K.neg (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (10))))) := A1.Dn K O x hD (8) (1) (8) (9) (10) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) (by lib_ring)
                      | succ w =>
                        rw [show 0 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (Zs K x (8))) (K.add (K.add (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (w + 13))) (Zs K x (w + 15)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (w + 12))) (Zs K x (w + 14))) (K.add (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (  -- (+22 chars; full line in the Zenodo source)
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (5)))))) := by
                          have h := A2.mk K O x hT (3) (1) (w + 5)
                          try rw [show (1) + (w + 5) + 1 + (3) = w + 10 by lib_nat] at h
                          try rw [show (1) + (w + 5) + 1 = w + 7 by lib_nat] at h
                          try rw [show (1) + (3) = 4 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 15))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (9)))))) := by
                          have h := A2.mk K O x hT (7) (1) (w + 5)
                          try rw [show (1) + (w + 5) + 1 + (7) = w + 14 by lib_nat] at h
                          try rw [show (1) + (w + 5) + 1 = w + 7 by lib_nat] at h
                          try rw [show (1) + (7) = 8 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 12)) (Zs K x (w + 14))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 13))))) := A1.Dn K O x hD (2) (w + 10) (2) (3) (4) (w + 12) (w + 13) (w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 11))))) := A1.Dn K O x hD (4) (w + 6) (4) (5) (6) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t5 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 16))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (10)))))) := by
                          have h := A2.mk K O x hT (5) (4) (w + 5)
                          try rw [show (4) + (w + 5) + 1 + (5) = w + 15 by lib_nat] at h
                          try rw [show (4) + (w + 5) + 1 = w + 10 by lib_nat] at h
                          try rw [show (4) + (5) = 9 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 14)) (Zs K x (w + 16))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 15))))) := A1.Dn K O x hD (4) (w + 10) (4) (5) (6) (w + 14) (w + 15) (w + 16) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (w + 9))))) := A1.Dn K O x hD (6) (w + 2) (6) (7) (8) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 12)) (Zs K x (w + 14))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (w + 13))))) := A1.Dn K O x hD (6) (w + 6) (6) (7) (8) (w + 12) (w + 13) (w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t9 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (w + 15))) (K.neg (K.mul (Zs K x (w + 14)) (Zs K x (9)))))) := by
                          have h := A2.mk K O x hT (1) (7) (w + 5)
                          try rw [show (7) + (w + 5) + 1 + (1) = w + 14 by lib_nat] at h
                          try rw [show (7) + (w + 5) + 1 = w + 13 by lib_nat] at h
                          try rw [show (7) + (1) = 8 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (9))) (K.neg (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (w + 11))))) := A1.Dn K O x hD (8) (w + 2) (8) (9) (10) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) (by lib_ring)
            | succ a =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))) (Zs K x (a + 9))) (K.add (K.add (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9))) (Zs K x (a + 11)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))) (Zs K x (a + 10))) (K.add (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6)  -- (+43 chars; full line in the Zenodo source)
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 5))))) := A1.Dn K O x hD (a + 3) (1) (a + 3) (a + 4) (a + 5) (a + 4) (a + 5) (a + 6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 4)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 10)))))) := by
                  have h := A2.mk K O x hT (6) (a + 3) (1)
                  try rw [show (a + 3) + (1) + 1 + (6) = a + 11 by lib_nat] at h
                  try rw [show (a + 3) + (1) + 1 = a + 5 by lib_nat] at h
                  try rw [show (a + 3) + (6) = a + 9 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 3) (3) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 3) (5) (a + 3) (a + 4) (a + 5) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 3) (7) (a + 3) (a + 4) (a + 5) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 5) (1) (a + 5) (a + 6) (a + 7) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 5) (3) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 7) (1) (a + 7) (a + 8) (a + 9) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t8 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 8)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 10)))))) := by
                  have h := A2.mk K O x hT (2) (a + 7) (1)
                  try rw [show (a + 7) + (1) + 1 + (2) = a + 11 by lib_nat] at h
                  try rw [show (a + 7) + (1) + 1 = a + 9 by lib_nat] at h
                  try rw [show (a + 7) + (2) = a + 9 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 7) (3) (a + 7) (a + 8) (a + 9) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))) (Zs K x (a + 9))) (K.add (K.add (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10))) (Zs K x (a + 12)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9))) (Zs K x (a + 11))) (K.add (K.add (K.add (Zs K x (a + 4)) (Zs K x (a +  -- (+46 chars; full line in the Zenodo source)
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 8))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 6)))))) := by
                    have h := A2.mk K O x hT (3) (a + 2) (1)
                    try rw [show (a + 2) + (1) + 1 + (3) = a + 7 by lib_nat] at h
                    try rw [show (a + 2) + (1) + 1 = a + 4 by lib_nat] at h
                    try rw [show (a + 2) + (3) = a + 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 10)))))) := by
                    have h := A2.mk K O x hT (7) (a + 2) (1)
                    try rw [show (a + 2) + (1) + 1 + (7) = a + 11 by lib_nat] at h
                    try rw [show (a + 2) + (1) + 1 = a + 4 by lib_nat] at h
                    try rw [show (a + 2) + (7) = a + 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 3) (2) (a + 3) (a + 4) (a + 5) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 3) (6) (a + 3) (a + 4) (a + 5) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 5)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 11)))))) := by
                    have h := A2.mk K O x hT (6) (a + 4) (0)
                    try rw [show (a + 4) + (0) + 1 + (6) = a + 11 by lib_nat] at h
                    try rw [show (a + 4) + (0) + 1 = a + 5 by lib_nat] at h
                    try rw [show (a + 4) + (6) = a + 10 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t5 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 8)) (Zs K x (a + 13))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 11)))))) := by
                    have h := A2.mk K O x hT (3) (a + 7) (1)
                    try rw [show (a + 7) + (1) + 1 + (3) = a + 12 by lib_nat] at h
                    try rw [show (a + 7) + (1) + 1 = a + 9 by lib_nat] at h
                    try rw [show (a + 7) + (3) = a + 10 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 7) (4) (a + 7) (a + 8) (a + 9) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))) (Zs K x (a + 9))) (K.add (K.add (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 11))) (Zs K x (a + 13)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10))) (Zs K x (a + 12))) (K.add (K.add (K.add (Zs K x (a + 4)) (Zs K x (  -- (+49 chars; full line in the Zenodo source)
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 9))) (K.neg (K.mul (Zs K x (a + 5)) (Zs K x (a + 7)))))) := by
                      have h := A2.mk K O x hT (4) (a + 2) (1)
                      try rw [show (a + 2) + (1) + 1 + (4) = a + 8 by lib_nat] at h
                      try rw [show (a + 2) + (1) + 1 = a + 4 by lib_nat] at h
                      try rw [show (a + 2) + (4) = a + 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 13))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 10)))))) := by
                      have h := A2.mk K O x hT (7) (a + 2) (2)
                      try rw [show (a + 2) + (2) + 1 + (7) = a + 12 by lib_nat] at h
                      try rw [show (a + 2) + (2) + 1 = a + 5 by lib_nat] at h
                      try rw [show (a + 2) + (7) = a + 9 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 3) (3) (a + 3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 3) (7) (a + 3) (a + 4) (a + 5) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 5) (1) (a + 5) (a + 6) (a + 7) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t5 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 5) (3) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t6 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 14))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 10)))))) := by
                      have h := A2.mk K O x hT (4) (a + 5) (3)
                      try rw [show (a + 5) + (3) + 1 + (4) = a + 13 by lib_nat] at h
                      try rw [show (a + 5) + (3) + 1 = a + 9 by lib_nat] at h
                      try rw [show (a + 5) + (4) = a + 9 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 12)) (Zs K x (a + 14))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 13))))) := A1.Dn K O x hD (a + 5) (7) (a + 5) (a + 6) (a + 7) (a + 12) (a + 13) (a + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 7) (1) (a + 7) (a + 8) (a + 9) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t9 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 7) (3) (a + 7) (a + 8) (a + 9) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t10 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 13))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 12)))))) := by
                      have h := A2.mk K O x hT (3) (a + 8) (0)
                      try rw [show (a + 8) + (0) + 1 + (3) = a + 12 by lib_nat] at h
                      try rw [show (a + 8) + (0) + 1 = a + 9 by lib_nat] at h
                      try rw [show (a + 8) + (3) = a + 11 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))) (Zs K x (a + 9))) (K.add (K.add (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 12))) (Zs K x (a + 14)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 11))) (Zs K x (a + 13))) (K.add (K.add (K.add (Zs K x (a + 4)) (Zs K   -- (+52 chars; full line in the Zenodo source)
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 10))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 7)))))) := by
                        have h := A2.mk K O x hT (4) (a + 2) (2)
                        try rw [show (a + 2) + (2) + 1 + (4) = a + 9 by lib_nat] at h
                        try rw [show (a + 2) + (2) + 1 = a + 5 by lib_nat] at h
                        try rw [show (a + 2) + (4) = a + 6 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 14))) (K.neg (K.mul (Zs K x (a + 7)) (Zs K x (a + 10)))))) := by
                        have h := A2.mk K O x hT (7) (a + 2) (3)
                        try rw [show (a + 2) + (3) + 1 + (7) = a + 13 by lib_nat] at h
                        try rw [show (a + 2) + (3) + 1 = a + 6 by lib_nat] at h
                        try rw [show (a + 2) + (7) = a + 9 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 3) (4) (a + 3) (a + 4) (a + 5) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 3) (8) (a + 3) (a + 4) (a + 5) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 5) (4) (a + 5) (a + 6) (a + 7) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t5 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 15))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 11)))))) := by
                        have h := A2.mk K O x hT (5) (a + 5) (3)
                        try rw [show (a + 5) + (3) + 1 + (5) = a + 14 by lib_nat] at h
                        try rw [show (a + 5) + (3) + 1 = a + 9 by lib_nat] at h
                        try rw [show (a + 5) + (5) = a + 10 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 13)) (Zs K x (a + 15))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 14))))) := A1.Dn K O x hD (a + 5) (8) (a + 5) (a + 6) (a + 7) (a + 13) (a + 14) (a + 15) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 7) (4) (a + 7) (a + 8) (a + 9) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t8 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 14))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 13)))))) := by
                        have h := A2.mk K O x hT (4) (a + 8) (0)
                        try rw [show (a + 8) + (0) + 1 + (4) = a + 13 by lib_nat] at h
                        try rw [show (a + 8) + (0) + 1 = a + 9 by lib_nat] at h
                        try rw [show (a + 8) + (4) = a + 12 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1 + 1) + 1 = a + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))) (Zs K x (a + 9))) (K.add (K.add (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 13))) (Zs K x (a + 15)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 12))) (Zs K x (a + 14))) (K.add (K.add (K.add (Zs K x (a + 4)) (Zs  -- (+55 chars; full line in the Zenodo source)
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 6)) (Zs K x (a + 8)))))) := by
                          have h := A2.mk K O x hT (5) (a + 2) (2)
                          try rw [show (a + 2) + (2) + 1 + (5) = a + 10 by lib_nat] at h
                          try rw [show (a + 2) + (2) + 1 = a + 5 by lib_nat] at h
                          try rw [show (a + 2) + (5) = a + 7 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + 15))) (K.neg (K.mul (Zs K x (a + 8)) (Zs K x (a + 10)))))) := by
                          have h := A2.mk K O x hT (7) (a + 2) (4)
                          try rw [show (a + 2) + (4) + 1 + (7) = a + 14 by lib_nat] at h
                          try rw [show (a + 2) + (4) + 1 = a + 7 by lib_nat] at h
                          try rw [show (a + 2) + (7) = a + 9 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 3) (5) (a + 3) (a + 4) (a + 5) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 12)) (Zs K x (a + 14))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 13))))) := A1.Dn K O x hD (a + 3) (9) (a + 3) (a + 4) (a + 5) (a + 12) (a + 13) (a + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 5) (5) (a + 5) (a + 6) (a + 7) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t5 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + 16))) (K.neg (K.mul (Zs K x (a + 11)) (Zs K x (a + 11)))))) := by
                          have h := A2.mk K O x hT (5) (a + 5) (4)
                          try rw [show (a + 5) + (4) + 1 + (5) = a + 15 by lib_nat] at h
                          try rw [show (a + 5) + (4) + 1 = a + 10 by lib_nat] at h
                          try rw [show (a + 5) + (5) = a + 10 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 14)) (Zs K x (a + 16))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 15))))) := A1.Dn K O x hD (a + 5) (9) (a + 5) (a + 6) (a + 7) (a + 14) (a + 15) (a + 16) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 7) (1) (a + 7) (a + 8) (a + 9) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 12)) (Zs K x (a + 14))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 13))))) := A1.Dn K O x hD (a + 7) (5) (a + 7) (a + 8) (a + 9) (a + 12) (a + 13) (a + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t9 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 15))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 14)))))) := by
                          have h := A2.mk K O x hT (5) (a + 8) (0)
                          try rw [show (a + 8) + (0) + 1 + (5) = a + 14 by lib_nat] at h
                          try rw [show (a + 8) + (0) + 1 = a + 9 by lib_nat] at h
                          try rw [show (a + 8) + (5) = a + 13 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 10))) (K.neg (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 9) (1) (a + 9) (a + 10) (a + 11) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) (by lib_ring)
                      | succ w =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = a + w + 12 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + 7))) (Zs K x (a + 9))) (K.add (K.add (K.add (Zs K x (a + w + 10)) (Zs K x (a + w + 12))) (Zs K x (a + w + 14))) (Zs K x (a + w + 16)))) (K.neg (K.mul (K.add (K.add (K.add (Zs K x (a + w + 9)) (Zs K x (a + w + 11))) (Zs K x (a + w + 13))) (Zs K x (a + w + 15))) (K.add (  -- (+88 chars; full line in the Zenodo source)
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + w + 12))) (K.neg (K.mul (Zs K x (a + w + 9)) (Zs K x (a + 6)))))) := by
                          have h := A2.mk K O x hT (3) (a + 2) (w + 5)
                          try rw [show (a + 2) + (w + 5) + 1 + (3) = a + w + 11 by lib_nat] at h
                          try rw [show (a + 2) + (w + 5) + 1 = a + w + 8 by lib_nat] at h
                          try rw [show (a + 2) + (3) = a + 5 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 3)) (Zs K x (a + w + 16))) (K.neg (K.mul (Zs K x (a + w + 9)) (Zs K x (a + 10)))))) := by
                          have h := A2.mk K O x hT (7) (a + 2) (w + 5)
                          try rw [show (a + 2) + (w + 5) + 1 + (7) = a + w + 15 by lib_nat] at h
                          try rw [show (a + 2) + (w + 5) + 1 = a + w + 8 by lib_nat] at h
                          try rw [show (a + 2) + (7) = a + 9 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 9)) (Zs K x (a + w + 11))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + w + 10))))) := A1.Dn K O x hD (a + 3) (w + 6) (a + 3) (a + 4) (a + 5) (a + w + 9) (a + w + 10) (a + w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 13)) (Zs K x (a + w + 15))) (Zs K x (a + 4))) (K.neg (K.mul (K.add (Zs K x (a + 3)) (Zs K x (a + 5))) (Zs K x (a + w + 14))))) := A1.Dn K O x hD (a + 3) (w + 10) (a + 3) (a + 4) (a + 5) (a + w + 13) (a + w + 14) (a + w + 15) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 11)) (Zs K x (a + w + 13))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + w + 12))))) := A1.Dn K O x hD (a + 5) (w + 6) (a + 5) (a + 6) (a + 7) (a + w + 11) (a + w + 12) (a + w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t5 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 6)) (Zs K x (a + w + 17))) (K.neg (K.mul (Zs K x (a + w + 12)) (Zs K x (a + 11)))))) := by
                          have h := A2.mk K O x hT (5) (a + 5) (w + 5)
                          try rw [show (a + 5) + (w + 5) + 1 + (5) = a + w + 16 by lib_nat] at h
                          try rw [show (a + 5) + (w + 5) + 1 = a + w + 11 by lib_nat] at h
                          try rw [show (a + 5) + (5) = a + 10 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t6 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 15)) (Zs K x (a + w + 17))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + w + 16))))) := A1.Dn K O x hD (a + 5) (w + 10) (a + 5) (a + 6) (a + 7) (a + w + 15) (a + w + 16) (a + w + 17) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t7 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 9)) (Zs K x (a + w + 11))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + w + 10))))) := A1.Dn K O x hD (a + 7) (w + 2) (a + 7) (a + 8) (a + 9) (a + w + 9) (a + w + 10) (a + w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t8 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 13)) (Zs K x (a + w + 15))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + w + 14))))) := A1.Dn K O x hD (a + 7) (w + 6) (a + 7) (a + 8) (a + 9) (a + w + 13) (a + w + 14) (a + w + 15) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t9 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + w + 16))) (K.neg (K.mul (Zs K x (a + w + 15)) (Zs K x (a + 10)))))) := by
                          have h := A2.mk K O x hT (1) (a + 8) (w + 5)
                          try rw [show (a + 8) + (w + 5) + 1 + (1) = a + w + 15 by lib_nat] at h
                          try rw [show (a + 8) + (w + 5) + 1 = a + w + 14 by lib_nat] at h
                          try rw [show (a + 8) + (1) = a + 9 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t10 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 11)) (Zs K x (a + w + 13))) (Zs K x (a + 10))) (K.neg (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + w + 12))))) := A1.Dn K O x hD (a + 9) (w + 2) (a + 9) (a + 10) (a + 11) (a + w + 11) (a + w + 12) (a + w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) t5) t6) t7) t8) t9) t10) (by lib_ring)

include hx hT hD h1 h10 in
theorem sg13 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (fun i => x (i + 2)) (fun i => x (i + 3)) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4))))))
      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
        have h := A2.mk K O x hT (1) (2) (0)
        try rw [show (2) + (0) + 1 + (1) = 4 by lib_nat] at h
        try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
        try rw [show (2) + (1) = 3 by lib_nat] at h
        exact A2.nn_of_nonpos_neg K O _ h
      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (4))))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
          have h := A2.mk K O x hT (2) (2) (0)
          try rw [show (2) + (0) + 1 + (2) = 5 by lib_nat] at h
          try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
          try rw [show (2) + (2) = 4 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (4))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
            have h := A2.mk K O x hT (3) (2) (0)
            try rw [show (2) + (0) + 1 + (3) = 6 by lib_nat] at h
            try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
            try rw [show (2) + (3) = 5 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (4))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7)))))) := by
              have h := A2.mk K O x hT (4) (2) (0)
              try rw [show (2) + (0) + 1 + (4) = 7 by lib_nat] at h
              try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
              try rw [show (2) + (4) = 6 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (4))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (4)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (5) (2) (0)
                try rw [show (2) + (0) + 1 + (5) = 8 by lib_nat] at h
                try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                try rw [show (2) + (5) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              rw [show 0 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (4))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (4)))))) := by
                have h := A2.mk K O x hT (1) (2) (w + 5)
                try rw [show (2) + (w + 5) + 1 + (1) = w + 9 by lib_nat] at h
                try rw [show (2) + (w + 5) + 1 = w + 8 by lib_nat] at h
                try rw [show (2) + (1) = 3 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5))))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (6))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5)))))) := by
          have h := A2.mk K O x hT (1) (3) (0)
          try rw [show (3) + (0) + 1 + (1) = 5 by lib_nat] at h
          try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
          try rw [show (3) + (1) = 4 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (5))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
            have h := A2.mk K O x hT (2) (3) (0)
            try rw [show (3) + (0) + 1 + (2) = 6 by lib_nat] at h
            try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
            try rw [show (3) + (2) = 5 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (5))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
              have h := A2.mk K O x hT (3) (3) (0)
              try rw [show (3) + (0) + 1 + (3) = 7 by lib_nat] at h
              try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
              try rw [show (3) + (3) = 6 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (5))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (5)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (4) (3) (0)
                try rw [show (3) + (0) + 1 + (4) = 8 by lib_nat] at h
                try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                try rw [show (3) + (4) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (5))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (10))) (K.neg (K.mul (Zs K x (5)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (5) (3) (0)
                  try rw [show (3) + (0) + 1 + (5) = 9 by lib_nat] at h
                  try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                  try rw [show (3) + (5) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (5))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (5)))))) := by
                  have h := A2.mk K O x hT (1) (3) (w + 5)
                  try rw [show (3) + (w + 5) + 1 + (1) = w + 10 by lib_nat] at h
                  try rw [show (3) + (w + 5) + 1 = w + 9 by lib_nat] at h
                  try rw [show (3) + (1) = 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (7))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6)))))) := by
            have h := A2.mk K O x hT (1) (4) (0)
            try rw [show (4) + (0) + 1 + (1) = 6 by lib_nat] at h
            try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
            try rw [show (4) + (1) = 5 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (6))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
              have h := A2.mk K O x hT (2) (4) (0)
              try rw [show (4) + (0) + 1 + (2) = 7 by lib_nat] at h
              try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
              try rw [show (4) + (2) = 6 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (6))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (6)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (3) (4) (0)
                try rw [show (4) + (0) + 1 + (3) = 8 by lib_nat] at h
                try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                try rw [show (4) + (3) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (6))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (10))) (K.neg (K.mul (Zs K x (6)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (4) (4) (0)
                  try rw [show (4) + (0) + 1 + (4) = 9 by lib_nat] at h
                  try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                  try rw [show (4) + (4) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (11))) (K.neg (K.mul (Zs K x (10)) (Zs K x (6))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (11))) (K.neg (K.mul (Zs K x (6)) (Zs K x (10)))))) := by
                    have h := A2.mk K O x hT (5) (4) (0)
                    try rw [show (4) + (0) + 1 + (5) = 10 by lib_nat] at h
                    try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                    try rw [show (4) + (5) = 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (6))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (6)))))) := by
                    have h := A2.mk K O x hT (1) (4) (w + 5)
                    try rw [show (4) + (w + 5) + 1 + (1) = w + 11 by lib_nat] at h
                    try rw [show (4) + (w + 5) + 1 = w + 10 by lib_nat] at h
                    try rw [show (4) + (1) = 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (7))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (8))) (K.neg (K.mul (Zs K x (7)) (Zs K x (7)))))) := by
              have h := A2.mk K O x hT (1) (5) (0)
              try rw [show (5) + (0) + 1 + (1) = 7 by lib_nat] at h
              try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
              try rw [show (5) + (1) = 6 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (7))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (9))) (K.neg (K.mul (Zs K x (7)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (2) (5) (0)
                try rw [show (5) + (0) + 1 + (2) = 8 by lib_nat] at h
                try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                try rw [show (5) + (2) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (7))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (10))) (K.neg (K.mul (Zs K x (7)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (3) (5) (0)
                  try rw [show (5) + (0) + 1 + (3) = 9 by lib_nat] at h
                  try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                  try rw [show (5) + (3) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (11))) (K.neg (K.mul (Zs K x (10)) (Zs K x (7))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (11))) (K.neg (K.mul (Zs K x (7)) (Zs K x (10)))))) := by
                    have h := A2.mk K O x hT (4) (5) (0)
                    try rw [show (5) + (0) + 1 + (4) = 10 by lib_nat] at h
                    try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                    try rw [show (5) + (4) = 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (12))) (K.neg (K.mul (Zs K x (11)) (Zs K x (7))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (12))) (K.neg (K.mul (Zs K x (7)) (Zs K x (11)))))) := by
                      have h := A2.mk K O x hT (5) (5) (0)
                      try rw [show (5) + (0) + 1 + (5) = 11 by lib_nat] at h
                      try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                      try rw [show (5) + (5) = 10 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (w + 13))) (K.neg (K.mul (Zs K x (w + 12)) (Zs K x (7))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (w + 13))) (K.neg (K.mul (Zs K x (w + 12)) (Zs K x (7)))))) := by
                      have h := A2.mk K O x hT (1) (5) (w + 5)
                      try rw [show (5) + (w + 5) + 1 + (1) = w + 12 by lib_nat] at h
                      try rw [show (5) + (w + 5) + 1 = w + 11 by lib_nat] at h
                      try rw [show (5) + (1) = 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (8))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (9))) (K.neg (K.mul (Zs K x (8)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (1) (6) (0)
                try rw [show (6) + (0) + 1 + (1) = 8 by lib_nat] at h
                try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                try rw [show (6) + (1) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (8))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (10))) (K.neg (K.mul (Zs K x (8)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (2) (6) (0)
                  try rw [show (6) + (0) + 1 + (2) = 9 by lib_nat] at h
                  try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                  try rw [show (6) + (2) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (11))) (K.neg (K.mul (Zs K x (10)) (Zs K x (8))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (11))) (K.neg (K.mul (Zs K x (8)) (Zs K x (10)))))) := by
                    have h := A2.mk K O x hT (3) (6) (0)
                    try rw [show (6) + (0) + 1 + (3) = 10 by lib_nat] at h
                    try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                    try rw [show (6) + (3) = 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (12))) (K.neg (K.mul (Zs K x (11)) (Zs K x (8))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (12))) (K.neg (K.mul (Zs K x (8)) (Zs K x (11)))))) := by
                      have h := A2.mk K O x hT (4) (6) (0)
                      try rw [show (6) + (0) + 1 + (4) = 11 by lib_nat] at h
                      try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                      try rw [show (6) + (4) = 10 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (13))) (K.neg (K.mul (Zs K x (12)) (Zs K x (8))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (13))) (K.neg (K.mul (Zs K x (8)) (Zs K x (12)))))) := by
                        have h := A2.mk K O x hT (5) (6) (0)
                        try rw [show (6) + (0) + 1 + (5) = 12 by lib_nat] at h
                        try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                        try rw [show (6) + (5) = 11 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (w + 14))) (K.neg (K.mul (Zs K x (w + 13)) (Zs K x (8))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (w + 14))) (K.neg (K.mul (Zs K x (w + 13)) (Zs K x (8)))))) := by
                        have h := A2.mk K O x hT (1) (6) (w + 5)
                        try rw [show (6) + (w + 5) + 1 + (1) = w + 13 by lib_nat] at h
                        try rw [show (6) + (w + 5) + 1 = w + 12 by lib_nat] at h
                        try rw [show (6) + (1) = 7 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
          | succ i =>
            cases i with
            | zero =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (9))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (1) (7) (0)
                  try rw [show (7) + (0) + 1 + (1) = 9 by lib_nat] at h
                  try rw [show (7) + (0) + 1 = 8 by lib_nat] at h
                  try rw [show (7) + (1) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (11))) (K.neg (K.mul (Zs K x (10)) (Zs K x (9))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (11))) (K.neg (K.mul (Zs K x (9)) (Zs K x (10)))))) := by
                    have h := A2.mk K O x hT (2) (7) (0)
                    try rw [show (7) + (0) + 1 + (2) = 10 by lib_nat] at h
                    try rw [show (7) + (0) + 1 = 8 by lib_nat] at h
                    try rw [show (7) + (2) = 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (12))) (K.neg (K.mul (Zs K x (11)) (Zs K x (9))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (12))) (K.neg (K.mul (Zs K x (9)) (Zs K x (11)))))) := by
                      have h := A2.mk K O x hT (3) (7) (0)
                      try rw [show (7) + (0) + 1 + (3) = 11 by lib_nat] at h
                      try rw [show (7) + (0) + 1 = 8 by lib_nat] at h
                      try rw [show (7) + (3) = 10 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (13))) (K.neg (K.mul (Zs K x (12)) (Zs K x (9))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (13))) (K.neg (K.mul (Zs K x (9)) (Zs K x (12)))))) := by
                        have h := A2.mk K O x hT (4) (7) (0)
                        try rw [show (7) + (0) + 1 + (4) = 12 by lib_nat] at h
                        try rw [show (7) + (0) + 1 = 8 by lib_nat] at h
                        try rw [show (7) + (4) = 11 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (14))) (K.neg (K.mul (Zs K x (13)) (Zs K x (9))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (14))) (K.neg (K.mul (Zs K x (9)) (Zs K x (13)))))) := by
                          have h := A2.mk K O x hT (5) (7) (0)
                          try rw [show (7) + (0) + 1 + (5) = 13 by lib_nat] at h
                          try rw [show (7) + (0) + 1 = 8 by lib_nat] at h
                          try rw [show (7) + (5) = 12 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                      | succ w =>
                        rw [show 0 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (w + 15))) (K.neg (K.mul (Zs K x (w + 14)) (Zs K x (9))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (w + 15))) (K.neg (K.mul (Zs K x (w + 14)) (Zs K x (9)))))) := by
                          have h := A2.mk K O x hT (1) (7) (w + 5)
                          try rw [show (7) + (w + 5) + 1 + (1) = w + 14 by lib_nat] at h
                          try rw [show (7) + (w + 5) + 1 = w + 13 by lib_nat] at h
                          try rw [show (7) + (1) = 8 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
            | succ a =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 10))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 11))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 10)))))) := by
                  have h := A2.mk K O x hT (1) (a + 8) (0)
                  try rw [show (a + 8) + (0) + 1 + (1) = a + 10 by lib_nat] at h
                  try rw [show (a + 8) + (0) + 1 = a + 9 by lib_nat] at h
                  try rw [show (a + 8) + (1) = a + 9 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 11)) (Zs K x (a + 10))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 11)))))) := by
                    have h := A2.mk K O x hT (2) (a + 8) (0)
                    try rw [show (a + 8) + (0) + 1 + (2) = a + 11 by lib_nat] at h
                    try rw [show (a + 8) + (0) + 1 = a + 9 by lib_nat] at h
                    try rw [show (a + 8) + (2) = a + 10 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 13))) (K.neg (K.mul (Zs K x (a + 12)) (Zs K x (a + 10))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 13))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 12)))))) := by
                      have h := A2.mk K O x hT (3) (a + 8) (0)
                      try rw [show (a + 8) + (0) + 1 + (3) = a + 12 by lib_nat] at h
                      try rw [show (a + 8) + (0) + 1 = a + 9 by lib_nat] at h
                      try rw [show (a + 8) + (3) = a + 11 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 14))) (K.neg (K.mul (Zs K x (a + 13)) (Zs K x (a + 10))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 14))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 13)))))) := by
                        have h := A2.mk K O x hT (4) (a + 8) (0)
                        try rw [show (a + 8) + (0) + 1 + (4) = a + 13 by lib_nat] at h
                        try rw [show (a + 8) + (0) + 1 = a + 9 by lib_nat] at h
                        try rw [show (a + 8) + (4) = a + 12 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1 + 1) + 1 = a + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 15))) (K.neg (K.mul (Zs K x (a + 14)) (Zs K x (a + 10))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 15))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 14)))))) := by
                          have h := A2.mk K O x hT (5) (a + 8) (0)
                          try rw [show (a + 8) + (0) + 1 + (5) = a + 14 by lib_nat] at h
                          try rw [show (a + 8) + (0) + 1 = a + 9 by lib_nat] at h
                          try rw [show (a + 8) + (5) = a + 13 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
                      | succ w =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = a + w + 12 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + w + 16))) (K.neg (K.mul (Zs K x (a + w + 15)) (Zs K x (a + 10))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + w + 16))) (K.neg (K.mul (Zs K x (a + w + 15)) (Zs K x (a + 10)))))) := by
                          have h := A2.mk K O x hT (1) (a + 8) (w + 5)
                          try rw [show (a + 8) + (w + 5) + 1 + (1) = a + w + 15 by lib_nat] at h
                          try rw [show (a + 8) + (w + 5) + 1 = a + w + 14 by lib_nat] at h
                          try rw [show (a + 8) + (1) = a + 9 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)

include hx hT hD h1 h10 in
theorem sg14 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (pv1 K (fun i => x (i + 1))) (fun i => x (i + 3)) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))))
      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (4)))))) := by
        have h := A2.mk K O x hT (2) (1) (1)
        try rw [show (1) + (1) + 1 + (2) = 5 by lib_nat] at h
        try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
        try rw [show (1) + (2) = 3 by lib_nat] at h
        exact A2.nn_of_nonpos_neg K O _ h
      have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
      have t2 : O.le K.zero (K.mul (Zs K x (1)) (Zs K x (5))) := O.mul_nonneg _ _ (hx (0)) (hx (4))
      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (4))))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (6))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
          have h := A2.mk K O x hT (2) (2) (0)
          try rw [show (2) + (0) + 1 + (2) = 5 by lib_nat] at h
          try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
          try rw [show (2) + (2) = 4 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        have t1 : O.le K.zero (K.mul (Zs K x (3)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (2)) (hx (3))
        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
            have h := A2.mk K O x hT (3) (2) (0)
            try rw [show (2) + (0) + 1 + (3) = 6 by lib_nat] at h
            try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
            try rw [show (2) + (3) = 5 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          have t1 : O.le K.zero (K.mul (Zs K x (4)) (Zs K x (4))) := O.mul_nonneg _ _ (hx (3)) (hx (3))
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
              have h := A2.mk K O x hT (4) (0) (2)
              try rw [show (0) + (2) + 1 + (4) = 7 by lib_nat] at h
              try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
              try rw [show (0) + (4) = 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (9))))) := A1.Dn K O x hD (0) (8) (0) (1) (2) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (10))) (K.neg (K.mul (Zs K x (9)) (Zs K x (2)))))) := by
              have h := A2.mk K O x hT (1) (0) (7)
              try rw [show (0) + (7) + 1 + (1) = 9 by lib_nat] at h
              try rw [show (0) + (7) + 1 = 8 by lib_nat] at h
              try rw [show (0) + (1) = 1 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            have t3 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (4)) (Zs K x (7)))))) := by
              have h := A2.mk K O x hT (4) (2) (0)
              try rw [show (2) + (0) + 1 + (4) = 7 by lib_nat] at h
              try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
              try rw [show (2) + (4) = 6 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (9))) (K.neg (K.mul (Zs K x (4)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT (5) (0) (2)
                try rw [show (0) + (2) + 1 + (5) = 8 by lib_nat] at h
                try rw [show (0) + (2) + 1 = 3 by lib_nat] at h
                try rw [show (0) + (5) = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (10))))) := A1.Dn K O x hD (0) (9) (0) (1) (2) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (11))) (K.neg (K.mul (Zs K x (10)) (Zs K x (2)))))) := by
                have h := A2.mk K O x hT (1) (0) (8)
                try rw [show (0) + (8) + 1 + (1) = 10 by lib_nat] at h
                try rw [show (0) + (8) + 1 = 9 by lib_nat] at h
                try rw [show (0) + (1) = 1 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t3 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (4)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (5) (2) (0)
                try rw [show (2) + (0) + 1 + (5) = 8 by lib_nat] at h
                try rw [show (2) + (0) + 1 = 3 by lib_nat] at h
                try rw [show (2) + (5) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
            | succ w =>
              rw [show 0 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 10))) (K.neg (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (4))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 7)) (Zs K x (4)))))) := by
                have h := A2.mk K O x hT (3) (0) (w + 5)
                try rw [show (0) + (w + 5) + 1 + (3) = w + 9 by lib_nat] at h
                try rw [show (0) + (w + 5) + 1 = w + 6 by lib_nat] at h
                try rw [show (0) + (3) = 3 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 11))))) := A1.Dn K O x hD (0) (w + 10) (0) (1) (2) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (1)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (2)))))) := by
                have h := A2.mk K O x hT (1) (0) (w + 9)
                try rw [show (0) + (w + 9) + 1 + (1) = w + 11 by lib_nat] at h
                try rw [show (0) + (w + 9) + 1 = w + 10 by lib_nat] at h
                try rw [show (0) + (1) = 1 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t3 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 10))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (4)))))) := by
                have h := A2.mk K O x hT (1) (2) (w + 5)
                try rw [show (2) + (w + 5) + 1 + (1) = w + 9 by lib_nat] at h
                try rw [show (2) + (w + 5) + 1 = w + 8 by lib_nat] at h
                try rw [show (2) + (1) = 3 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))))
        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (7))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5)))))) := by
          have h := A2.mk K O x hT (2) (2) (1)
          try rw [show (2) + (1) + 1 + (2) = 6 by lib_nat] at h
          try rw [show (2) + (1) + 1 = 4 by lib_nat] at h
          try rw [show (2) + (2) = 4 by lib_nat] at h
          exact A2.nn_of_nonpos_neg K O _ h
        have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (5))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (7))) (K.neg (K.mul (Zs K x (4)) (Zs K x (5)))))) := by
            have h := A2.mk K O x hT (3) (1) (1)
            try rw [show (1) + (1) + 1 + (3) = 6 by lib_nat] at h
            try rw [show (1) + (1) + 1 = 3 by lib_nat] at h
            try rw [show (1) + (3) = 4 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (7))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
            have h := A2.mk K O x hT (2) (3) (0)
            try rw [show (3) + (0) + 1 + (2) = 6 by lib_nat] at h
            try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
            try rw [show (3) + (2) = 5 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (5)))))) := by
              have h := A2.mk K O x hT (3) (1) (2)
              try rw [show (1) + (2) + 1 + (3) = 7 by lib_nat] at h
              try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
              try rw [show (1) + (3) = 4 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
              have h := A2.mk K O x hT (3) (3) (0)
              try rw [show (3) + (0) + 1 + (3) = 7 by lib_nat] at h
              try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
              try rw [show (3) + (3) = 6 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (9))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (9))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT (4) (1) (2)
                try rw [show (1) + (2) + 1 + (4) = 8 by lib_nat] at h
                try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
                try rw [show (1) + (4) = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (5)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (4) (3) (0)
                try rw [show (3) + (0) + 1 + (4) = 8 by lib_nat] at h
                try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                try rw [show (3) + (4) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (10))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (10))) (K.neg (K.mul (Zs K x (5)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT (5) (1) (2)
                  try rw [show (1) + (2) + 1 + (5) = 9 by lib_nat] at h
                  try rw [show (1) + (2) + 1 = 4 by lib_nat] at h
                  try rw [show (1) + (5) = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (10))) (K.neg (K.mul (Zs K x (5)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (5) (3) (0)
                  try rw [show (3) + (0) + 1 + (5) = 9 by lib_nat] at h
                  try rw [show (3) + (0) + 1 = 4 by lib_nat] at h
                  try rw [show (3) + (5) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 11))) (K.neg (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (5))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (2)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 8)) (Zs K x (5)))))) := by
                  have h := A2.mk K O x hT (3) (1) (w + 5)
                  try rw [show (1) + (w + 5) + 1 + (3) = w + 10 by lib_nat] at h
                  try rw [show (1) + (w + 5) + 1 = w + 7 by lib_nat] at h
                  try rw [show (1) + (3) = 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 11))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (5)))))) := by
                  have h := A2.mk K O x hT (1) (3) (w + 5)
                  try rw [show (3) + (w + 5) + 1 + (1) = w + 10 by lib_nat] at h
                  try rw [show (3) + (w + 5) + 1 = w + 9 by lib_nat] at h
                  try rw [show (3) + (1) = 4 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))))
          have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (8))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6)))))) := by
            have h := A2.mk K O x hT (2) (3) (1)
            try rw [show (3) + (1) + 1 + (2) = 7 by lib_nat] at h
            try rw [show (3) + (1) + 1 = 5 by lib_nat] at h
            try rw [show (3) + (2) = 5 by lib_nat] at h
            exact A2.nn_of_nonpos_neg K O _ h
          have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (6))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (8))) (K.neg (K.mul (Zs K x (5)) (Zs K x (6)))))) := by
              have h := A2.mk K O x hT (3) (2) (1)
              try rw [show (2) + (1) + 1 + (3) = 7 by lib_nat] at h
              try rw [show (2) + (1) + 1 = 4 by lib_nat] at h
              try rw [show (2) + (3) = 5 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (8))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
              have h := A2.mk K O x hT (2) (4) (0)
              try rw [show (4) + (0) + 1 + (2) = 7 by lib_nat] at h
              try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
              try rw [show (4) + (2) = 6 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (6))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (9))) (K.neg (K.mul (Zs K x (6)) (Zs K x (6)))))) := by
                have h := A2.mk K O x hT (3) (2) (2)
                try rw [show (2) + (2) + 1 + (3) = 8 by lib_nat] at h
                try rw [show (2) + (2) + 1 = 5 by lib_nat] at h
                try rw [show (2) + (3) = 5 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (6)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (3) (4) (0)
                try rw [show (4) + (0) + 1 + (3) = 8 by lib_nat] at h
                try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                try rw [show (4) + (3) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (10))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (6))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (10))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT (4) (2) (2)
                  try rw [show (2) + (2) + 1 + (4) = 9 by lib_nat] at h
                  try rw [show (2) + (2) + 1 = 5 by lib_nat] at h
                  try rw [show (2) + (4) = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (10))) (K.neg (K.mul (Zs K x (6)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (4) (4) (0)
                  try rw [show (4) + (0) + 1 + (4) = 9 by lib_nat] at h
                  try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                  try rw [show (4) + (4) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (11))) (K.neg (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (6))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (11))) (K.neg (K.mul (Zs K x (6)) (Zs K x (8)))))) := by
                    have h := A2.mk K O x hT (5) (2) (2)
                    try rw [show (2) + (2) + 1 + (5) = 10 by lib_nat] at h
                    try rw [show (2) + (2) + 1 = 5 by lib_nat] at h
                    try rw [show (2) + (5) = 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (11))) (K.neg (K.mul (Zs K x (6)) (Zs K x (10)))))) := by
                    have h := A2.mk K O x hT (5) (4) (0)
                    try rw [show (4) + (0) + 1 + (5) = 10 by lib_nat] at h
                    try rw [show (4) + (0) + 1 = 5 by lib_nat] at h
                    try rw [show (4) + (5) = 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 12))) (K.neg (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (6))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 9)) (Zs K x (6)))))) := by
                    have h := A2.mk K O x hT (3) (2) (w + 5)
                    try rw [show (2) + (w + 5) + 1 + (3) = w + 11 by lib_nat] at h
                    try rw [show (2) + (w + 5) + 1 = w + 8 by lib_nat] at h
                    try rw [show (2) + (3) = 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 12))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (6)))))) := by
                    have h := A2.mk K O x hT (1) (4) (w + 5)
                    try rw [show (4) + (w + 5) + 1 + (1) = w + 11 by lib_nat] at h
                    try rw [show (4) + (w + 5) + 1 = w + 10 by lib_nat] at h
                    try rw [show (4) + (1) = 5 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (7))))))
            have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (9))) (K.neg (K.mul (Zs K x (7)) (Zs K x (7)))))) := by
              have h := A2.mk K O x hT (2) (4) (1)
              try rw [show (4) + (1) + 1 + (2) = 8 by lib_nat] at h
              try rw [show (4) + (1) + 1 = 6 by lib_nat] at h
              try rw [show (4) + (2) = 6 by lib_nat] at h
              exact A2.nn_of_nonpos_neg K O _ h
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (7))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (9))) (K.neg (K.mul (Zs K x (6)) (Zs K x (7)))))) := by
                have h := A2.mk K O x hT (3) (3) (1)
                try rw [show (3) + (1) + 1 + (3) = 8 by lib_nat] at h
                try rw [show (3) + (1) + 1 = 5 by lib_nat] at h
                try rw [show (3) + (3) = 6 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (9))) (K.neg (K.mul (Zs K x (7)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (2) (5) (0)
                try rw [show (5) + (0) + 1 + (2) = 8 by lib_nat] at h
                try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                try rw [show (5) + (2) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (10))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (7))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (10))) (K.neg (K.mul (Zs K x (7)) (Zs K x (7)))))) := by
                  have h := A2.mk K O x hT (3) (3) (2)
                  try rw [show (3) + (2) + 1 + (3) = 9 by lib_nat] at h
                  try rw [show (3) + (2) + 1 = 6 by lib_nat] at h
                  try rw [show (3) + (3) = 6 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (10))) (K.neg (K.mul (Zs K x (7)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (3) (5) (0)
                  try rw [show (5) + (0) + 1 + (3) = 9 by lib_nat] at h
                  try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                  try rw [show (5) + (3) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (11))) (K.neg (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (7))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (11))) (K.neg (K.mul (Zs K x (7)) (Zs K x (8)))))) := by
                    have h := A2.mk K O x hT (4) (3) (2)
                    try rw [show (3) + (2) + 1 + (4) = 10 by lib_nat] at h
                    try rw [show (3) + (2) + 1 = 6 by lib_nat] at h
                    try rw [show (3) + (4) = 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (11))) (K.neg (K.mul (Zs K x (7)) (Zs K x (10)))))) := by
                    have h := A2.mk K O x hT (4) (5) (0)
                    try rw [show (5) + (0) + 1 + (4) = 10 by lib_nat] at h
                    try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                    try rw [show (5) + (4) = 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (12))) (K.neg (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (7))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (12))) (K.neg (K.mul (Zs K x (7)) (Zs K x (9)))))) := by
                      have h := A2.mk K O x hT (5) (3) (2)
                      try rw [show (3) + (2) + 1 + (5) = 11 by lib_nat] at h
                      try rw [show (3) + (2) + 1 = 6 by lib_nat] at h
                      try rw [show (3) + (5) = 8 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (12))) (K.neg (K.mul (Zs K x (7)) (Zs K x (11)))))) := by
                      have h := A2.mk K O x hT (5) (5) (0)
                      try rw [show (5) + (0) + 1 + (5) = 11 by lib_nat] at h
                      try rw [show (5) + (0) + 1 = 6 by lib_nat] at h
                      try rw [show (5) + (5) = 10 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 13))) (K.neg (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (7))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (4)) (Zs K x (w + 13))) (K.neg (K.mul (Zs K x (w + 10)) (Zs K x (7)))))) := by
                      have h := A2.mk K O x hT (3) (3) (w + 5)
                      try rw [show (3) + (w + 5) + 1 + (3) = w + 12 by lib_nat] at h
                      try rw [show (3) + (w + 5) + 1 = w + 9 by lib_nat] at h
                      try rw [show (3) + (3) = 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (w + 13))) (K.neg (K.mul (Zs K x (w + 12)) (Zs K x (7)))))) := by
                      have h := A2.mk K O x hT (1) (5) (w + 5)
                      try rw [show (5) + (w + 5) + 1 + (1) = w + 12 by lib_nat] at h
                      try rw [show (5) + (w + 5) + 1 = w + 11 by lib_nat] at h
                      try rw [show (5) + (1) = 6 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (8))))))
              have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (10))) (K.neg (K.mul (Zs K x (8)) (Zs K x (8)))))) := by
                have h := A2.mk K O x hT (2) (5) (1)
                try rw [show (5) + (1) + 1 + (2) = 9 by lib_nat] at h
                try rw [show (5) + (1) + 1 = 7 by lib_nat] at h
                try rw [show (5) + (2) = 7 by lib_nat] at h
                exact A2.nn_of_nonpos_neg K O _ h
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))))) := A1.Dn K O x hD (5) (3) (5) (6) (7) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (10))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (8))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (10))) (K.neg (K.mul (Zs K x (7)) (Zs K x (8)))))) := by
                  have h := A2.mk K O x hT (3) (4) (1)
                  try rw [show (4) + (1) + 1 + (3) = 9 by lib_nat] at h
                  try rw [show (4) + (1) + 1 = 6 by lib_nat] at h
                  try rw [show (4) + (3) = 7 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (10))) (K.neg (K.mul (Zs K x (8)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (2) (6) (0)
                  try rw [show (6) + (0) + 1 + (2) = 9 by lib_nat] at h
                  try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                  try rw [show (6) + (2) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (11))) (K.neg (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (8))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (11))) (K.neg (K.mul (Zs K x (8)) (Zs K x (8)))))) := by
                    have h := A2.mk K O x hT (3) (4) (2)
                    try rw [show (4) + (2) + 1 + (3) = 10 by lib_nat] at h
                    try rw [show (4) + (2) + 1 = 7 by lib_nat] at h
                    try rw [show (4) + (3) = 7 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (11))) (K.neg (K.mul (Zs K x (8)) (Zs K x (10)))))) := by
                    have h := A2.mk K O x hT (3) (6) (0)
                    try rw [show (6) + (0) + 1 + (3) = 10 by lib_nat] at h
                    try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                    try rw [show (6) + (3) = 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (12))) (K.neg (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (8))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (12))) (K.neg (K.mul (Zs K x (8)) (Zs K x (9)))))) := by
                      have h := A2.mk K O x hT (4) (4) (2)
                      try rw [show (4) + (2) + 1 + (4) = 11 by lib_nat] at h
                      try rw [show (4) + (2) + 1 = 7 by lib_nat] at h
                      try rw [show (4) + (4) = 8 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (12))) (K.neg (K.mul (Zs K x (8)) (Zs K x (11)))))) := by
                      have h := A2.mk K O x hT (4) (6) (0)
                      try rw [show (6) + (0) + 1 + (4) = 11 by lib_nat] at h
                      try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                      try rw [show (6) + (4) = 10 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (13))) (K.neg (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (8))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (13))) (K.neg (K.mul (Zs K x (8)) (Zs K x (10)))))) := by
                        have h := A2.mk K O x hT (5) (4) (2)
                        try rw [show (4) + (2) + 1 + (5) = 12 by lib_nat] at h
                        try rw [show (4) + (2) + 1 = 7 by lib_nat] at h
                        try rw [show (4) + (5) = 9 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (13))) (K.neg (K.mul (Zs K x (8)) (Zs K x (12)))))) := by
                        have h := A2.mk K O x hT (5) (6) (0)
                        try rw [show (6) + (0) + 1 + (5) = 12 by lib_nat] at h
                        try rw [show (6) + (0) + 1 = 7 by lib_nat] at h
                        try rw [show (6) + (5) = 11 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                    | succ w =>
                      rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 14))) (K.neg (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (8))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (5)) (Zs K x (w + 14))) (K.neg (K.mul (Zs K x (w + 11)) (Zs K x (8)))))) := by
                        have h := A2.mk K O x hT (3) (4) (w + 5)
                        try rw [show (4) + (w + 5) + 1 + (3) = w + 13 by lib_nat] at h
                        try rw [show (4) + (w + 5) + 1 = w + 10 by lib_nat] at h
                        try rw [show (4) + (3) = 7 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (w + 14))) (K.neg (K.mul (Zs K x (w + 13)) (Zs K x (8)))))) := by
                        have h := A2.mk K O x hT (1) (6) (w + 5)
                        try rw [show (6) + (w + 5) + 1 + (1) = w + 13 by lib_nat] at h
                        try rw [show (6) + (w + 5) + 1 = w + 12 by lib_nat] at h
                        try rw [show (6) + (1) = 7 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
          | succ i =>
            cases i with
            | zero =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))) (K.neg (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (9))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (7)) (Zs K x (11))) (K.neg (K.mul (Zs K x (9)) (Zs K x (9)))))) := by
                  have h := A2.mk K O x hT (2) (6) (1)
                  try rw [show (6) + (1) + 1 + (2) = 10 by lib_nat] at h
                  try rw [show (6) + (1) + 1 = 8 by lib_nat] at h
                  try rw [show (6) + (2) = 8 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (7))) (K.neg (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))))) := A1.Dn K O x hD (6) (3) (6) (7) (8) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (11))) (K.neg (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (9))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (11))) (K.neg (K.mul (Zs K x (8)) (Zs K x (9)))))) := by
                    have h := A2.mk K O x hT (3) (5) (1)
                    try rw [show (5) + (1) + 1 + (3) = 10 by lib_nat] at h
                    try rw [show (5) + (1) + 1 = 7 by lib_nat] at h
                    try rw [show (5) + (3) = 8 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (11))) (K.neg (K.mul (Zs K x (9)) (Zs K x (10)))))) := by
                    have h := A2.mk K O x hT (2) (7) (0)
                    try rw [show (7) + (0) + 1 + (2) = 10 by lib_nat] at h
                    try rw [show (7) + (0) + 1 = 8 by lib_nat] at h
                    try rw [show (7) + (2) = 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (12))) (K.neg (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (9))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (12))) (K.neg (K.mul (Zs K x (9)) (Zs K x (9)))))) := by
                      have h := A2.mk K O x hT (3) (5) (2)
                      try rw [show (5) + (2) + 1 + (3) = 11 by lib_nat] at h
                      try rw [show (5) + (2) + 1 = 8 by lib_nat] at h
                      try rw [show (5) + (3) = 8 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (12))) (K.neg (K.mul (Zs K x (9)) (Zs K x (11)))))) := by
                      have h := A2.mk K O x hT (3) (7) (0)
                      try rw [show (7) + (0) + 1 + (3) = 11 by lib_nat] at h
                      try rw [show (7) + (0) + 1 = 8 by lib_nat] at h
                      try rw [show (7) + (3) = 10 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (13))) (K.neg (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (9))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (13))) (K.neg (K.mul (Zs K x (9)) (Zs K x (10)))))) := by
                        have h := A2.mk K O x hT (4) (5) (2)
                        try rw [show (5) + (2) + 1 + (4) = 12 by lib_nat] at h
                        try rw [show (5) + (2) + 1 = 8 by lib_nat] at h
                        try rw [show (5) + (4) = 9 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (13))) (K.neg (K.mul (Zs K x (9)) (Zs K x (12)))))) := by
                        have h := A2.mk K O x hT (4) (7) (0)
                        try rw [show (7) + (0) + 1 + (4) = 12 by lib_nat] at h
                        try rw [show (7) + (0) + 1 = 8 by lib_nat] at h
                        try rw [show (7) + (4) = 11 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (14))) (K.neg (K.mul (K.add (Zs K x (11)) (Zs K x (13))) (Zs K x (9))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (14))) (K.neg (K.mul (Zs K x (9)) (Zs K x (11)))))) := by
                          have h := A2.mk K O x hT (5) (5) (2)
                          try rw [show (5) + (2) + 1 + (5) = 13 by lib_nat] at h
                          try rw [show (5) + (2) + 1 = 8 by lib_nat] at h
                          try rw [show (5) + (5) = 10 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (14))) (K.neg (K.mul (Zs K x (9)) (Zs K x (13)))))) := by
                          have h := A2.mk K O x hT (5) (7) (0)
                          try rw [show (7) + (0) + 1 + (5) = 13 by lib_nat] at h
                          try rw [show (7) + (0) + 1 = 8 by lib_nat] at h
                          try rw [show (7) + (5) = 12 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                      | succ w =>
                        rw [show 0 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (w + 15))) (K.neg (K.mul (K.add (Zs K x (w + 12)) (Zs K x (w + 14))) (Zs K x (9))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (6)) (Zs K x (w + 15))) (K.neg (K.mul (Zs K x (w + 12)) (Zs K x (9)))))) := by
                          have h := A2.mk K O x hT (3) (5) (w + 5)
                          try rw [show (5) + (w + 5) + 1 + (3) = w + 14 by lib_nat] at h
                          try rw [show (5) + (w + 5) + 1 = w + 11 by lib_nat] at h
                          try rw [show (5) + (3) = 8 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (8)) (Zs K x (w + 15))) (K.neg (K.mul (Zs K x (w + 14)) (Zs K x (9)))))) := by
                          have h := A2.mk K O x hT (1) (7) (w + 5)
                          try rw [show (7) + (w + 5) + 1 + (1) = w + 14 by lib_nat] at h
                          try rw [show (7) + (w + 5) + 1 = w + 13 by lib_nat] at h
                          try rw [show (7) + (1) = 8 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
            | succ a =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 11))) (K.neg (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 10))))))
                have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 8)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 10)))))) := by
                  have h := A2.mk K O x hT (2) (a + 7) (1)
                  try rw [show (a + 7) + (1) + 1 + (2) = a + 11 by lib_nat] at h
                  try rw [show (a + 7) + (1) + 1 = a + 9 by lib_nat] at h
                  try rw [show (a + 7) + (2) = a + 9 by lib_nat] at h
                  exact A2.nn_of_nonpos_neg K O _ h
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 8))) (K.neg (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 7) (3) (a + 7) (a + 8) (a + 9) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 12))) (K.neg (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 10))))))
                  have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 9)) (Zs K x (a + 10)))))) := by
                    have h := A2.mk K O x hT (3) (a + 6) (1)
                    try rw [show (a + 6) + (1) + 1 + (3) = a + 11 by lib_nat] at h
                    try rw [show (a + 6) + (1) + 1 = a + 8 by lib_nat] at h
                    try rw [show (a + 6) + (3) = a + 9 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 12))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 11)))))) := by
                    have h := A2.mk K O x hT (2) (a + 8) (0)
                    try rw [show (a + 8) + (0) + 1 + (2) = a + 11 by lib_nat] at h
                    try rw [show (a + 8) + (0) + 1 = a + 9 by lib_nat] at h
                    try rw [show (a + 8) + (2) = a + 10 by lib_nat] at h
                    exact A2.nn_of_nonpos_neg K O _ h
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 13))) (K.neg (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 10))))))
                    have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 13))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 10)))))) := by
                      have h := A2.mk K O x hT (3) (a + 6) (2)
                      try rw [show (a + 6) + (2) + 1 + (3) = a + 12 by lib_nat] at h
                      try rw [show (a + 6) + (2) + 1 = a + 9 by lib_nat] at h
                      try rw [show (a + 6) + (3) = a + 9 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 13))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 12)))))) := by
                      have h := A2.mk K O x hT (3) (a + 8) (0)
                      try rw [show (a + 8) + (0) + 1 + (3) = a + 12 by lib_nat] at h
                      try rw [show (a + 8) + (0) + 1 = a + 9 by lib_nat] at h
                      try rw [show (a + 8) + (3) = a + 11 by lib_nat] at h
                      exact A2.nn_of_nonpos_neg K O _ h
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 14))) (K.neg (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 10))))))
                      have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 14))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 11)))))) := by
                        have h := A2.mk K O x hT (4) (a + 6) (2)
                        try rw [show (a + 6) + (2) + 1 + (4) = a + 13 by lib_nat] at h
                        try rw [show (a + 6) + (2) + 1 = a + 9 by lib_nat] at h
                        try rw [show (a + 6) + (4) = a + 10 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 14))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 13)))))) := by
                        have h := A2.mk K O x hT (4) (a + 8) (0)
                        try rw [show (a + 8) + (0) + 1 + (4) = a + 13 by lib_nat] at h
                        try rw [show (a + 8) + (0) + 1 = a + 9 by lib_nat] at h
                        try rw [show (a + 8) + (4) = a + 12 by lib_nat] at h
                        exact A2.nn_of_nonpos_neg K O _ h
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1 + 1) + 1 = a + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 15))) (K.neg (K.mul (K.add (Zs K x (a + 12)) (Zs K x (a + 14))) (Zs K x (a + 10))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + 15))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 12)))))) := by
                          have h := A2.mk K O x hT (5) (a + 6) (2)
                          try rw [show (a + 6) + (2) + 1 + (5) = a + 14 by lib_nat] at h
                          try rw [show (a + 6) + (2) + 1 = a + 9 by lib_nat] at h
                          try rw [show (a + 6) + (5) = a + 11 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + 15))) (K.neg (K.mul (Zs K x (a + 10)) (Zs K x (a + 14)))))) := by
                          have h := A2.mk K O x hT (5) (a + 8) (0)
                          try rw [show (a + 8) + (0) + 1 + (5) = a + 14 by lib_nat] at h
                          try rw [show (a + 8) + (0) + 1 = a + 9 by lib_nat] at h
                          try rw [show (a + 8) + (5) = a + 13 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
                      | succ w =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = a + w + 12 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + w + 16))) (K.neg (K.mul (K.add (Zs K x (a + w + 13)) (Zs K x (a + w + 15))) (Zs K x (a + 10))))))
                        have t0 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 7)) (Zs K x (a + w + 16))) (K.neg (K.mul (Zs K x (a + w + 13)) (Zs K x (a + 10)))))) := by
                          have h := A2.mk K O x hT (3) (a + 6) (w + 5)
                          try rw [show (a + 6) + (w + 5) + 1 + (3) = a + w + 15 by lib_nat] at h
                          try rw [show (a + 6) + (w + 5) + 1 = a + w + 12 by lib_nat] at h
                          try rw [show (a + 6) + (3) = a + 9 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        have t1 : O.le K.zero (K.neg (K.add (K.mul (Zs K x (a + 9)) (Zs K x (a + w + 16))) (K.neg (K.mul (Zs K x (a + w + 15)) (Zs K x (a + 10)))))) := by
                          have h := A2.mk K O x hT (1) (a + 8) (w + 5)
                          try rw [show (a + 8) + (w + 5) + 1 + (1) = a + w + 15 by lib_nat] at h
                          try rw [show (a + 8) + (w + 5) + 1 = a + w + 14 by lib_nat] at h
                          try rw [show (a + 8) + (1) = a + 9 by lib_nat] at h
                          exact A2.nn_of_nonpos_neg K O _ h
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)

include hx hT hD h1 h10 in
theorem sg15 (i w : Nat) : O.le K.zero (K.neg (Lagrange.minor K (Zs K (pv2 K x)) (Zs K (c1v K x)) i (i + w + 1))) := by
  unfold Lagrange.minor
  cases i with
  | zero =>
    cases w with
    | zero =>
      show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add K.zero (Zs K x (2)))) (K.neg (K.mul (Zs K x (3)) K.zero))))
      exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
    | succ w =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (1)) (Zs K x (3)))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) K.zero))))
        exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) K.zero))))
          exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) K.zero))))
            exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) K.zero))))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
            | succ w =>
              rw [show 0 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 6 by lib_nat]
              show O.le K.zero (K.neg (K.add (K.mul K.zero (K.add (Zs K x (w + 5)) (Zs K x (w + 7)))) (K.neg (K.mul (K.add (K.add (Zs K x (w + 4)) (Zs K x (w + 6))) (Zs K x (w + 8))) K.zero))))
              exact A1.nn_of_eq K O _ _ (O.le_refl K.zero) (by lib_ring)
  | succ i =>
    cases i with
    | zero =>
      cases w with
      | zero =>
        show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (1)) (Zs K x (3)))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (K.add K.zero (Zs K x (2)))))))
        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
        exact A1.nn_of_eq K O _ _ t0 (by lib_ring)
      | succ w =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (K.add K.zero (Zs K x (2)))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ t0 t1) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add K.zero (Zs K x (2)))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (K.add K.zero (Zs K x (2)))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (K.add K.zero (Zs K x (2)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
              | succ w =>
                rw [show 0 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (Zs K x (3)) (K.add (Zs K x (w + 6)) (Zs K x (w + 8)))) (K.neg (K.mul (K.add (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (w + 9))) (K.add K.zero (Zs K x (2)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 7))))) := A1.Dn K O x hD (0) (w + 6) (0) (1) (2) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 5)) (Zs K x (w + 7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 6))))) := A1.Dn K O x hD (1) (w + 4) (1) (2) (3) (w + 5) (w + 6) (w + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 8))))) := A1.Dn K O x hD (1) (w + 6) (1) (2) (3) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
    | succ i =>
      cases i with
      | zero =>
        cases w with
        | zero =>
          show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (K.add (Zs K x (2)) (Zs K x (4)))) (K.neg (K.mul (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (K.add (Zs K x (1)) (Zs K x (3)))))))
          have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (2))))) := A1.Dn K O x hD (0) (1) (0) (1) (2) (1) (2) (3) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
          exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
        | succ w =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (Zs K x (1)) (Zs K x (3)))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (3))))) := A1.Dn K O x hD (0) (2) (0) (1) (2) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (K.add (Zs K x (1)) (Zs K x (3)))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (4))))) := A1.Dn K O x hD (0) (3) (0) (1) (2) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (K.add (Zs K x (1)) (Zs K x (3)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (5))))) := A1.Dn K O x hD (0) (4) (0) (1) (2) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (7))))) := A1.Dn K O x hD (0) (6) (0) (1) (2) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (K.add (Zs K x (6)) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (K.add (Zs K x (1)) (Zs K x (3)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (6))))) := A1.Dn K O x hD (0) (5) (0) (1) (2) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (8))))) := A1.Dn K O x hD (0) (7) (0) (1) (2) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
                | succ w =>
                  rw [show 0 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (K.add (Zs K x (w + 7)) (Zs K x (w + 9)))) (K.neg (K.mul (K.add (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (w + 10))) (K.add (Zs K x (1)) (Zs K x (3)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 7))))) := A1.Dn K O x hD (0) (w + 6) (0) (1) (2) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (1))) (K.neg (K.mul (K.add K.zero (Zs K x (2))) (Zs K x (w + 9))))) := A1.Dn K O x hD (0) (w + 8) (0) (1) (2) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 8))))) := A1.Dn K O x hD (1) (w + 6) (1) (2) (3) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 6)) (Zs K x (w + 8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 7))))) := A1.Dn K O x hD (2) (w + 4) (2) (3) (4) (w + 6) (w + 7) (w + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
      | succ i =>
        cases i with
        | zero =>
          cases w with
          | zero =>
            show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (K.add (Zs K x (3)) (Zs K x (5)))) (K.neg (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (Zs K x (2)) (Zs K x (4)))))))
            have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (3))))) := A1.Dn K O x hD (1) (1) (1) (2) (3) (2) (3) (4) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
            exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
          | succ w =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (K.add (Zs K x (2)) (Zs K x (4)))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (4))))) := A1.Dn K O x hD (1) (2) (1) (2) (3) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (K.add (Zs K x (2)) (Zs K x (4)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))))) := A1.Dn K O x hD (1) (3) (1) (2) (3) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (K.add (Zs K x (6)) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (K.add (Zs K x (2)) (Zs K x (4)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (6))))) := A1.Dn K O x hD (1) (4) (1) (2) (3) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (8))))) := A1.Dn K O x hD (1) (6) (1) (2) (3) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (K.add (Zs K x (7)) (Zs K x (9)))) (K.neg (K.mul (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))) (K.add (Zs K x (2)) (Zs K x (4)))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (7))))) := A1.Dn K O x hD (1) (5) (1) (2) (3) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (9))))) := A1.Dn K O x hD (1) (7) (1) (2) (3) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
                  | succ w =>
                    rw [show 0 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (5))) (K.add (Zs K x (w + 8)) (Zs K x (w + 10)))) (K.neg (K.mul (K.add (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (w + 11))) (K.add (Zs K x (2)) (Zs K x (4)))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 8))))) := A1.Dn K O x hD (1) (w + 6) (1) (2) (3) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (2))) (K.neg (K.mul (K.add (Zs K x (1)) (Zs K x (3))) (Zs K x (w + 10))))) := A1.Dn K O x hD (1) (w + 8) (1) (2) (3) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 7)) (Zs K x (w + 9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 8))))) := A1.Dn K O x hD (3) (w + 4) (3) (4) (5) (w + 7) (w + 8) (w + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 10))))) := A1.Dn K O x hD (3) (w + 6) (3) (4) (5) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
        | succ i =>
          cases i with
          | zero =>
            cases w with
            | zero =>
              show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (Zs K x (4)) (Zs K x (6)))) (K.neg (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (K.add (Zs K x (3)) (Zs K x (5)))))))
              have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (4))))) := A1.Dn K O x hD (2) (1) (2) (3) (4) (3) (4) (5) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
              exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
            | succ w =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (K.add (Zs K x (3)) (Zs K x (5)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (5))))) := A1.Dn K O x hD (2) (2) (2) (3) (4) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (Zs K x (6)) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (K.add (Zs K x (3)) (Zs K x (5)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))))) := A1.Dn K O x hD (2) (3) (2) (3) (4) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (6))))) := A1.Dn K O x hD (4) (1) (4) (5) (6) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (Zs K x (7)) (Zs K x (9)))) (K.neg (K.mul (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))) (K.add (Zs K x (3)) (Zs K x (5)))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (7))))) := A1.Dn K O x hD (2) (4) (2) (3) (4) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (9))))) := A1.Dn K O x hD (2) (6) (2) (3) (4) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (Zs K x (8)) (Zs K x (10)))) (K.neg (K.mul (K.add (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (11))) (K.add (Zs K x (3)) (Zs K x (5)))))))
                      have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (8))))) := A1.Dn K O x hD (2) (5) (2) (3) (4) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (10))))) := A1.Dn K O x hD (2) (7) (2) (3) (4) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (10))))) := A1.Dn K O x hD (4) (5) (4) (5) (6) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
                    | succ w =>
                      rw [show 0 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (6))) (K.add (Zs K x (w + 9)) (Zs K x (w + 11)))) (K.neg (K.mul (K.add (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (w + 12))) (K.add (Zs K x (3)) (Zs K x (5)))))))
                      have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 9))))) := A1.Dn K O x hD (2) (w + 6) (2) (3) (4) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (3))) (K.neg (K.mul (K.add (Zs K x (2)) (Zs K x (4))) (Zs K x (w + 11))))) := A1.Dn K O x hD (2) (w + 8) (2) (3) (4) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 10))))) := A1.Dn K O x hD (3) (w + 6) (3) (4) (5) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 8)) (Zs K x (w + 10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 9))))) := A1.Dn K O x hD (4) (w + 4) (4) (5) (6) (w + 8) (w + 9) (w + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 11))))) := A1.Dn K O x hD (4) (w + 6) (4) (5) (6) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
          | succ i =>
            cases i with
            | zero =>
              cases w with
              | zero =>
                show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (K.add (Zs K x (5)) (Zs K x (7)))) (K.neg (K.mul (K.add (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))) (K.add (Zs K x (4)) (Zs K x (6)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (5))))) := A1.Dn K O x hD (3) (1) (3) (4) (5) (4) (5) (6) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (7))))) := A1.Dn K O x hD (5) (1) (5) (6) (7) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (K.add (Zs K x (6)) (Zs K x (8)))) (K.neg (K.mul (K.add (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))) (K.add (Zs K x (4)) (Zs K x (6)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (6))))) := A1.Dn K O x hD (3) (2) (3) (4) (5) (5) (6) (7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (7))))) := A1.Dn K O x hD (4) (2) (4) (5) (6) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (8))))) := A1.Dn K O x hD (5) (2) (5) (6) (7) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (K.add (Zs K x (7)) (Zs K x (9)))) (K.neg (K.mul (K.add (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (10))) (K.add (Zs K x (4)) (Zs K x (6)))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))))) := A1.Dn K O x hD (3) (3) (3) (4) (5) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (8))))) := A1.Dn K O x hD (4) (3) (4) (5) (6) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (6)) (Zs K x (8))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (7))))) := A1.Dn K O x hD (5) (1) (5) (6) (7) (6) (7) (8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))))) := A1.Dn K O x hD (5) (3) (5) (6) (7) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (K.add (Zs K x (8)) (Zs K x (10)))) (K.neg (K.mul (K.add (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (11))) (K.add (Zs K x (4)) (Zs K x (6)))))))
                      have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (8))))) := A1.Dn K O x hD (3) (4) (3) (4) (5) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (10))))) := A1.Dn K O x hD (3) (6) (3) (4) (5) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (9))))) := A1.Dn K O x hD (4) (4) (4) (5) (6) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (7)) (Zs K x (9))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (8))))) := A1.Dn K O x hD (5) (2) (5) (6) (7) (7) (8) (9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (10))))) := A1.Dn K O x hD (5) (4) (5) (6) (7) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (K.add (Zs K x (9)) (Zs K x (11)))) (K.neg (K.mul (K.add (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (12))) (K.add (Zs K x (4)) (Zs K x (6)))))))
                        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (9))))) := A1.Dn K O x hD (3) (5) (3) (4) (5) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (11))))) := A1.Dn K O x hD (3) (7) (3) (4) (5) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (9)) (Zs K x (11))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (10))))) := A1.Dn K O x hD (4) (5) (4) (5) (6) (9) (10) (11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (8)) (Zs K x (10))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (9))))) := A1.Dn K O x hD (5) (3) (5) (6) (7) (8) (9) (10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (10)) (Zs K x (12))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (11))))) := A1.Dn K O x hD (5) (5) (5) (6) (7) (10) (11) (12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
                      | succ w =>
                        rw [show 0 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = w + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (7))) (K.add (Zs K x (w + 10)) (Zs K x (w + 12)))) (K.neg (K.mul (K.add (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (w + 13))) (K.add (Zs K x (4)) (Zs K x (6)))))))
                        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 10))))) := A1.Dn K O x hD (3) (w + 6) (3) (4) (5) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (4))) (K.neg (K.mul (K.add (Zs K x (3)) (Zs K x (5))) (Zs K x (w + 12))))) := A1.Dn K O x hD (3) (w + 8) (3) (4) (5) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 10)) (Zs K x (w + 12))) (Zs K x (5))) (K.neg (K.mul (K.add (Zs K x (4)) (Zs K x (6))) (Zs K x (w + 11))))) := A1.Dn K O x hD (4) (w + 6) (4) (5) (6) (w + 10) (w + 11) (w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 9)) (Zs K x (w + 11))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 10))))) := A1.Dn K O x hD (5) (w + 4) (5) (6) (7) (w + 9) (w + 10) (w + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (w + 11)) (Zs K x (w + 13))) (Zs K x (6))) (K.neg (K.mul (K.add (Zs K x (5)) (Zs K x (7))) (Zs K x (w + 12))))) := A1.Dn K O x hD (5) (w + 6) (5) (6) (7) (w + 11) (w + 12) (w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
            | succ a =>
              cases w with
              | zero =>
                rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 = a + 7 by lib_nat]
                show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))) (K.add (Zs K x (a + 6)) (Zs K x (a + 8)))) (K.neg (K.mul (K.add (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9))) (K.add (Zs K x (a + 5)) (Zs K x (a + 7)))))))
                have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 6))))) := A1.Dn K O x hD (a + 4) (1) (a + 4) (a + 5) (a + 6) (a + 5) (a + 6) (a + 7) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 4) (3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 6) (1) (a + 6) (a + 7) (a + 8) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) (by lib_ring)
              | succ w =>
                cases w with
                | zero =>
                  rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1) + 1 = a + 8 by lib_nat]
                  show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))) (K.add (Zs K x (a + 7)) (Zs K x (a + 9)))) (K.neg (K.mul (K.add (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10))) (K.add (Zs K x (a + 5)) (Zs K x (a + 7)))))))
                  have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 7))))) := A1.Dn K O x hD (a + 4) (2) (a + 4) (a + 5) (a + 6) (a + 6) (a + 7) (a + 8) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 4) (4) (a + 4) (a + 5) (a + 6) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 5) (2) (a + 5) (a + 6) (a + 7) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 6) (2) (a + 6) (a + 7) (a + 8) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                  exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) (by lib_ring)
                | succ w =>
                  cases w with
                  | zero =>
                    rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1) + 1 = a + 9 by lib_nat]
                    show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))) (K.add (Zs K x (a + 8)) (Zs K x (a + 10)))) (K.neg (K.mul (K.add (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 11))) (K.add (Zs K x (a + 5)) (Zs K x (a + 7)))))))
                    have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 4) (3) (a + 4) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 4) (5) (a + 4) (a + 5) (a + 6) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 5) (3) (a + 5) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 7)) (Zs K x (a + 9))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 8))))) := A1.Dn K O x hD (a + 6) (1) (a + 6) (a + 7) (a + 8) (a + 7) (a + 8) (a + 9) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 6) (3) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                    exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
                  | succ w =>
                    cases w with
                    | zero =>
                      rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1) + 1 = a + 10 by lib_nat]
                      show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))) (K.add (Zs K x (a + 9)) (Zs K x (a + 11)))) (K.neg (K.mul (K.add (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 12))) (K.add (Zs K x (a + 5)) (Zs K x (a + 7)))))))
                      have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 4) (4) (a + 4) (a + 5) (a + 6) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 4) (6) (a + 4) (a + 5) (a + 6) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 5) (4) (a + 5) (a + 6) (a + 7) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 8)) (Zs K x (a + 10))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 9))))) := A1.Dn K O x hD (a + 6) (2) (a + 6) (a + 7) (a + 8) (a + 8) (a + 9) (a + 10) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 6) (4) (a + 6) (a + 7) (a + 8) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                      exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
                    | succ w =>
                      cases w with
                      | zero =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (0 + 1 + 1 + 1 + 1) + 1 = a + 11 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))) (K.add (Zs K x (a + 10)) (Zs K x (a + 12)))) (K.neg (K.mul (K.add (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 13))) (K.add (Zs K x (a + 5)) (Zs K x (a + 7)))))))
                        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 4) (5) (a + 4) (a + 5) (a + 6) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 4) (7) (a + 4) (a + 5) (a + 6) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 10)) (Zs K x (a + 12))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + 11))))) := A1.Dn K O x hD (a + 5) (5) (a + 5) (a + 6) (a + 7) (a + 10) (a + 11) (a + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 9)) (Zs K x (a + 11))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 10))))) := A1.Dn K O x hD (a + 6) (3) (a + 6) (a + 7) (a + 8) (a + 9) (a + 10) (a + 11) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + 11)) (Zs K x (a + 13))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + 12))))) := A1.Dn K O x hD (a + 6) (5) (a + 6) (a + 7) (a + 8) (a + 11) (a + 12) (a + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)
                      | succ w =>
                        rw [show a + 1 + 1 + 1 + 1 + 1 + 1 + (w + 1 + 1 + 1 + 1 + 1) + 1 = a + w + 12 by lib_nat]
                        show O.le K.zero (K.neg (K.add (K.mul (K.add (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + 8))) (K.add (Zs K x (a + w + 11)) (Zs K x (a + w + 13)))) (K.neg (K.mul (K.add (K.add (Zs K x (a + w + 10)) (Zs K x (a + w + 12))) (Zs K x (a + w + 14))) (K.add (Zs K x (a + 5)) (Zs K x (a + 7)))))))
                        have t0 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 10)) (Zs K x (a + w + 12))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + w + 11))))) := A1.Dn K O x hD (a + 4) (w + 6) (a + 4) (a + 5) (a + 6) (a + w + 10) (a + w + 11) (a + w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t1 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 12)) (Zs K x (a + w + 14))) (Zs K x (a + 5))) (K.neg (K.mul (K.add (Zs K x (a + 4)) (Zs K x (a + 6))) (Zs K x (a + w + 13))))) := A1.Dn K O x hD (a + 4) (w + 8) (a + 4) (a + 5) (a + 6) (a + w + 12) (a + w + 13) (a + w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t2 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 11)) (Zs K x (a + w + 13))) (Zs K x (a + 6))) (K.neg (K.mul (K.add (Zs K x (a + 5)) (Zs K x (a + 7))) (Zs K x (a + w + 12))))) := A1.Dn K O x hD (a + 5) (w + 6) (a + 5) (a + 6) (a + 7) (a + w + 11) (a + w + 12) (a + w + 13) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t3 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 10)) (Zs K x (a + w + 12))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + w + 11))))) := A1.Dn K O x hD (a + 6) (w + 4) (a + 6) (a + 7) (a + 8) (a + w + 10) (a + w + 11) (a + w + 12) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        have t4 : O.le K.zero (K.add (K.mul (K.add (Zs K x (a + w + 12)) (Zs K x (a + w + 14))) (Zs K x (a + 7))) (K.neg (K.mul (K.add (Zs K x (a + 6)) (Zs K x (a + 8))) (Zs K x (a + w + 13))))) := A1.Dn K O x hD (a + 6) (w + 6) (a + 6) (a + 7) (a + 8) (a + w + 12) (a + w + 13) (a + w + 14) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat) (by lib_nat)
                        exact A1.nn_of_eq K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ (A1.nn_add K O _ _ t0 t1) t2) t3) t4) (by lib_ring)

end signs

section final

variable (O : ORing K)

/-- **(A) at n = 3 for every length** (generated): a v-good X gives 25 c_3 c_5 ≤ 24 c_4² -/
theorem prod_lc (F : OField.OF K O) (h1 : O.le K.zero K.one) (h10 : K.one ≠ K.zero) (X : List R) (hXg : L1Full.Good K O X) (M : Nat) (hX : X.length = M + 2) :
    O.le (K.mul (LibRing.castN K 75) (K.mul (cgc K X X 3) (cgc K X X 5)))
      (K.mul (LibRing.castN K 72) (K.mul (cgc K X X 4) (cgc K X X 4))) := by
  have ⟨hb, hpos, hv, h0⟩ := hXg
  let x := co K X
  have hzY : ∀ t, M + 3 ≤ t → Zs K x t = K.zero := fun t ht => by
    cases t with
    | zero => exact absurd ht (Nat.not_succ_le_zero _)
    | succ t => exact HeatLR.co_out K X t (by rw [hX]; exact Nat.le_of_succ_le_succ ht)
  have hY : ∀ j, O.le K.zero (Zs K x j) := fun j => by cases j with
    | zero => exact O.le_refl _
    | succ j => exact hb j
  have hD : ∀ a k, O.le K.zero (Window.Dl K (Zs K x) a (a + k)) := fun a k =>
    Window.dl_nn_t K O F (Zs K x) hY (M + 3)
      (fun j hj => hpos j (by rw [hX]; exact Nat.lt_of_succ_lt_succ hj))
      hzY (CgWindow.VV_Zs K O x hv h0) a k
  have hT : ∀ a w, O.le K.zero (K.add (K.mul (Zs K x (a + 1)) (Zs K x (a + w))) (K.neg (K.mul (Zs K x a) (Zs K x (a + w + 1))))) := by
    intro a w
    rw [← Lagrange.tail_minor K (Zs K x) (M + 3) hzY a w (M + 3) (by lib_nat_le)]
    exact CauchyBinet2.sum_nn K O _ (fun i => by rw [show a + w + i = a + i + w by lib_nat]; exact hD (a + i) w) _
  have hxz : ∀ t, M + 1 + 1 ≤ t → x t = K.zero := A1C.hzX K X (M + 1) hX
  have cb0 := CauchyBinet2.cb_nonneg K O (Zs K (Zs K (Zs K x))) (Zs K (Zs K x)) (fun i => x (i + 1)) (fun i => x (i + 2)) (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => A1.prod_np K O _ _ (A1.nn_neg K O _ (sg0 K O x hb hT hD h1 h10 i w)) (A1.nn_neg K O _ (sg1 K O x hb hT hD h1 h10 i w))))
  have cn0 := SU2CharExp.cN_nn K O h1 16
  have cb1 := CauchyBinet2.cb_nonneg K O (Zs K (Zs K (Zs K x))) (fun i => x (i + 3)) x (fun i => x (i + 2)) (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => A1.prod_np K O _ _ (A1.nn_neg K O _ (sg2 K O x hb hT hD h1 h10 i w)) (A1.nn_neg K O _ (sg3 K O x hb hT hD h1 h10 i w))))
  have cn1 := SU2CharExp.cN_nn K O h1 8
  have cb2 := CauchyBinet2.cb_nonneg K O (Zs K (Zs K (Zs K x))) (Zs K (c1v K x)) (fun i => x (i + 1)) (fun i => x (i + 2)) (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => A1.prod_np K O _ _ (A1.nn_neg K O _ (sg4 K O x hb hT hD h1 h10 i w)) (A1.nn_neg K O _ (sg1 K O x hb hT hD h1 h10 i w))))
  have cn2 := SU2CharExp.cN_nn K O h1 24
  have cb3 := CauchyBinet2.cb_nonneg K O (Zs K (Zs K (Zs K x))) (pv2 K x) (fun i => x (i + 1)) (fun i => x (i + 2)) (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => A1.prod_np K O _ _ (A1.nn_neg K O _ (sg5 K O x hb hT hD h1 h10 i w)) (A1.nn_neg K O _ (sg1 K O x hb hT hD h1 h10 i w))))
  have cn3 := SU2CharExp.cN_nn K O h1 24
  have cb4 := CauchyBinet2.cb_nonneg K O (Zs K x) x (Zs K (pv4 K x)) (Zs K (pv3 K x)) (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => A1.prod_np K O _ _ (A1.nn_neg K O _ (sg6 K O x hb hT hD h1 h10 i w)) (A1.nn_neg K O _ (sg7 K O x hb hT hD h1 h10 i w))))
  have cn4 := SU2CharExp.cN_nn K O h1 36
  have cb5 := CauchyBinet2.cb_nonneg K O (Zs K x) (Zs K (c1v K x)) (fun i => x (i + 3)) (fun i => x (i + 2)) (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => O.mul_nonneg _ _ (sg8 K O x hb hT hD h1 h10 i w) (sg9 K O x hb hT hD h1 h10 i w)))
  have cn5 := SU2CharExp.cN_nn K O h1 32
  have cb6 := CauchyBinet2.cb_nonneg K O x (fun i => x (i + 1)) (Zs K (pv3 K x)) (Zs K (pv2 K x)) (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => A1.prod_np K O _ _ (A1.nn_neg K O _ (sg10 K O x hb hT hD h1 h10 i w)) (A1.nn_neg K O _ (sg11 K O x hb hT hD h1 h10 i w))))
  have cn6 := SU2CharExp.cN_nn K O h1 32
  have cb7 := CauchyBinet2.cb_nonneg K O x (fun i => x (i + 1)) (Zs K (pv3 K x)) (pv3 K x) (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => A1.prod_np K O _ _ (A1.nn_neg K O _ (sg10 K O x hb hT hD h1 h10 i w)) (A1.nn_neg K O _ (sg12 K O x hb hT hD h1 h10 i w))))
  have cn7 := SU2CharExp.cN_nn K O h1 4
  have cb8 := CauchyBinet2.cb_nonneg K O (fun i => x (i + 1)) (fun i => x (i + 2)) (fun i => x (i + 2)) (fun i => x (i + 3)) (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => A1.prod_np K O _ _ (A1.nn_neg K O _ (sg1 K O x hb hT hD h1 h10 i w)) (A1.nn_neg K O _ (sg13 K O x hb hT hD h1 h10 i w))))
  have cn8 := SU2CharExp.cN_nn K O h1 32
  have cb9 := CauchyBinet2.cb_nonneg K O (fun i => x (i + 1)) (fun i => x (i + 2)) (pv1 K (fun i => x (i + 1))) (fun i => x (i + 3)) (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => A1.prod_np K O _ _ (A1.nn_neg K O _ (sg1 K O x hb hT hD h1 h10 i w)) (A1.nn_neg K O _ (sg14 K O x hb hT hD h1 h10 i w))))
  have cn9 := SU2CharExp.cN_nn K O h1 20
  have cb10 := CauchyBinet2.cb_nonneg K O (fun i => x (i + 1)) (fun i => x (i + 2)) (Zs K (pv2 K x)) (Zs K (c1v K x)) (M + 1 + 1 + 8) (A1.split_lt _ (fun i w => A1.prod_np K O _ _ (A1.nn_neg K O _ (sg1 K O x hb hT hD h1 h10 i w)) (A1.nn_neg K O _ (sg15 K O x hb hT hD h1 h10 i w))))
  have cn10 := SU2CharExp.cN_nn K O h1 84
  have tot := (A1.nn_add K O _ _ (A1.pos_mul K O _ _ cn0 cb0) (A1.nn_add K O _ _ (A1.pos_mul K O _ _ cn1 cb1) (A1.nn_add K O _ _ (A1.pos_mul K O _ _ cn2 cb2) (A1.nn_add K O _ _ (A1.pos_mul K O _ _ cn3 cb3) (A1.nn_add K O _ _ (A1.pos_mul K O _ _ cn4 cb4) (A1.nn_add K O _ _ (A1.pos_mul K O _ _ cn5 cb5) (A1.nn_add K O _ _ (A1.pos_mul K O _ _ cn6 cb6) (A1.nn_add K O _ _ (A1.pos_mul K O _ _ cn7 cb7) (A  -- (+173 chars; full line in the Zenodo source)
  have id := ident K x (M + 1 + 1) hxz
  apply A1.le_of_sub_nn K O
  rw [A1C.cgc_ip K X (M + 1) 3 hX (pv3 K (co K X)) (psi3 K X) 8]
  rw [A1C.cgc_ip K X (M + 1) 4 hX (pv4 K (co K X)) (psi4 K X) 8]
  rw [A1C.cgc_ip K X (M + 1) 5 hX (pv5 K (co K X)) (psi5 K X) 8]
  show O.le K.zero _
  rw [id]; exact tot

end final

end GenA3

#print axioms GenA3.ident
#print axioms GenA3.prod_lc