1 (* ========================================================================== *)
2 (* FLYSPECK - BOOK FORMALIZATION *)
4 (* Chapter: Nonlinear *)
5 (* Author: Thomas C. Hales *)
7 (* ========================================================================== *)
10 replace 0.696 -> 0.616 systematically in estimates.
11 (2013-05-05, changed 0.696->0.616 in 7697147739 and 4680581274)
15 (* New test inequalities from May 2011. Redo all the tameTableD calculations,
16 together with associated nontriangular ad hoc LP estimates.
19 tameTableD[6,0] has dropped to 0.712.
20 // old values: 0.7578, 0.723, ...
23 tameTableD[4,1] = 0.616. This is AD HOC tauB5h in head.mod
24 tameTableD[5,0] = 0.4819. This is (standard) tau5 in head.mod
25 tau >= 0.616, diags >= sqrt8. This is AD HOC tau5h 9620775909-5 in head.mod
26 // old values: 0.696->0.616, 0.6548->0.616.
29 tau >= 0.477, diags >= sqrt8, 1edge [2.52,sqrt8]. This is AD HOC tauB4h 9620775909 in head.mod:
30 tau >= 0.467 diags >= 3. This is AD HOC 9563139965D in body.mod
31 + standard B-series quad inequalities.
36 (* This file does *not* treat the standard quad LP cases:
37 ["3862621143";"4240815464";"6944699408";"7043724150"]
38 which are proved by usual quad methods *)
40 module Main_estimate_ineq = struct
42 let mk_tplate = Ineq.mk_tplate ;;
43 let all_forall = Sphere.all_forall;;
45 let skip = Ineq.skip;;
46 let addtex = Ineq.addtex;;
49 addtex(Section,"Main Estimate","Definitions");
62 doc = "replacement for 22065952723 A1";
63 tags=[Main_estimate;Flypaper["UPONLFY"];Tex];
64 ineq = all_forall `ineq
66 (&1 , x1, &1 + sol0/ pi);
67 (&1 , x2, &1 + sol0/ pi);
68 (&1 , x3, &1 + sol0/ pi);
69 ((&2 / h0) pow 2, x4, #15.53);
70 ((&2 / h0) pow 2, x5, &4 pow 2);
71 ((&2 / h0) pow 2, x6, &4 pow 2)
73 (num1 x1 x2 x3 x4 x5 x6 > &0 \/
74 num1 x1 x2 x3 x4 x5 x6 < &0 \/
75 dnum1 x1 x2 x3 x4 x5 x6 < &0)`;
81 doc = "If minor diag >= 3, then 3/1.26 > 2.38 and we can contract.
82 15.53: arc[2,2,2.52]2 < arc[2,2,Sqrt[15.53]].
84 c2 upper bound changed from 15.53 to 16.0 on May 23.";
85 tags=[Main_estimate;Cfsqp;Tex;Flypaper["UPONLFY"];];
86 ineq = all_forall `ineq
88 (&1 , e1, &1 + sol0/ pi);
89 (&1 , e2, &1 + sol0/ pi);
90 (&1 , e3, &1 + sol0/ pi);
91 ((&2 / h0) pow 2, a2, (&2 * h0) pow 2);
92 ((&2/ h0) pow 2, b2, #3.01 pow 2);
93 (#2.38 pow 2, c2,#16.0)
95 ((num1 e1 e2 e3 a2 b2 c2 ) > &0) `;
101 doc = "In a pentagon with one long edge, we can contract the long edge to 2.52,
102 or even to 2, using 2 diags.
103 The constant 2.38 < 3.01/h0.";
104 tags=[Main_estimate;Cfsqp;Tex;Flypaper["UPONLFY"];];
105 ineq = all_forall `ineq
107 (&1 , e1, &1 + sol0/ pi);
108 (&1 , e2, &1 + sol0/ pi);
109 (&1 , e3, &1 + sol0/ pi);
110 ((&2 / h0) pow 2, a2, #3.01 pow 2);
111 (#2.38 pow 2, b2, #15.53);
112 (#2.38 pow 2, c2, #15.53)
114 ((num1 e1 e2 e3 a2 b2 c2 > &0) ) `;
121 doc = "useful dimension reduction for quads. quadrilateral test";
123 ineq = all_forall `ineq
125 (&1 , e1, &1 + sol0/ pi);
126 (&1 , e2, &1 + sol0/ pi);
127 (&1 , e3, &1 + sol0/ pi);
128 ((&2 / h0) pow 2, a2, (&2 * h0) pow 2);
129 ((&2/ h0) pow 2, b2, (&2 * h0) pow 2);
130 ((#2.9/ h0) pow 2, c2,(#4.0) pow 2)
132 ((num1 e1 e2 e3 a2 b2 c2 ) > &0) `;
138 doc="Used to maintain nonreflexivity when making num1-deformations.
139 The big angle on a skinny triangle (ear) is obtuse.
140 Case where 2 opposite edges equal 2.";
141 tags=[Flypaper["UPONLFY"];Main_estimate;Cfsqp;Xconvert;Tex];
142 ineq = all_forall `ineq [
150 (delta4_y y1 y2 y3 y4 y5 y6 < &0)`;
156 doc="Used to maintain nonreflexivity when making num1-deformations.
157 The big angle on a skinny triangle (ear) is obtuse.
158 Case where two adjacent edges equal 2 along y2 y3 y4";
159 tags=[Flypaper["UPONLFY"];Main_estimate;Cfsqp;Xconvert;Tex];
160 ineq = all_forall `ineq [
168 (delta4_y y1 y2 y3 y4 y5 y6 < &0)`;
174 doc="Used to maintain nonreflexivity when making num1-deformations.
175 The big angle on a skinny triangle (ear) is obtuse.
176 Case where two adjacent edges equal 2 along face y1 y2 y6.
178 tags=[Flypaper["UPONLFY"];Main_estimate;Cfsqp;Xconvert;Tex];
179 ineq = all_forall `ineq [
187 (delta4_y y1 y2 y3 y4 y5 y6 < &0)`;
195 doc="Used to justify matan approx in skinny triangles (ears).
196 This says that the skinny angle is acute.
197 y4 upper bound comes from the triangle inequality.
198 Revision a: May 20, 2012: changed lower bound on y5 from 3.01 to 3.0.
199 Note: this inequality is a consequence of 'JNTEFVP 1' and could be eliminated.";
200 tags=[Flypaper["TNNOPSI"];Main_estimate;Cfsqp;Xconvert;Tex];
201 ineq = all_forall `ineq [
206 (#3.0,y5, &2 * #2.52);
209 (delta4_y y1 y2 y3 y4 y5 y6 > &0)`;
215 doc="Used in some quad calculations to show that a node
216 is not straight (both halves are acute).
218 tags=[Flypaper["TNNOPSI"];Main_estimate;Cfsqp;Xconvert;Tex];
219 ineq = all_forall `ineq [
224 (#3.01,y5, &2 * #2.52);
227 ((delta4_y y1 y2 y3 y4 y5 y6 > &0) \/ (delta_y y1 y2 y3 y4 y5 y6 < &0))`;
232 addtex (Section,"Main Estimate","Local Fan/Main Estimate/Appendix/Terminal Pent");;
238 doc="ear dih ineq when delta < 20.
239 Local-fan/Main-estimate/Terminal-pent/both-ears-under-20.
240 Adaptation of 9459075374.
241 (EAR) A bound on the delta of an ear in a pent,
242 The disjunct (dih_y y1 y2 y3 y4 y5 y6 < #0.3205 = (1.75-1.109)/2) has been 'linearized'.
243 Tan[0.3205]^2 = (>=) 0.110186
244 In more detail, this calc shows that delta > 20 or dih < 0.3205
245 By 4887115291, we know that the combined angle at the crowded node of a pent is
246 at least 1.75. If both ears have delta < 20, then combined angle
247 is at least 1.109 + 2 * 0.3205 = 1.75, so a cross diag <= 3.01.
248 Hence wlog one of the two ears has delta >= 20.
249 Added 2013-06-25. Replaces 3405144397 which has invalid domain constraints on y2,y5
251 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Xconvert;Tex;Penalty(50.0,500.0);];
252 ineq = all_forall `ineq [
260 (let tan2lower = #0.110186 in
261 (delta_y y1 y2 y3 y4 y5 y6 > &20) \/
262 (&4 * x1_delta_y y1 y2 y3 y4 y5 y6 < tan2lower * delta4_squared_y y1 y2 y3 y4 y5 y6)
270 doc="old name: angles pent*
271 Local-fan/Main-estimate/Terminal-pent/both-ears-under-20.
273 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
274 ineq = all_forall `ineq [
282 ( #1.75 < dih_y y1 y2 y3 y4 y5 y6
289 doc="old name: test A*
290 Local-fan/Main-estimate/Terminal-pent/both-ears-under-20.
292 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
293 ineq = Sphere.all_forall `ineq [
302 (dih_y y1 y2 y3 y4 y5 y6 < #1.109)
310 Local-fan/Main-estimate/terminal-pent/ear-tau-approximation
311 tau_residual. This restricts delta to [0,C]";
312 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0);Cfsqp_branch 2];
313 ineq = all_forall `ineq [
322 (delta_y y1 y2 y3 y4 y5 y6 < &0) \/
323 (delta_y y1 y2 y3 y4 y5 y6 > &80) \/
324 (y_of_x tau_residual_x y1 y2 y3 y4 y5 y6 > #0.012 + #0.07 * (#2.52 - y1) + #0.01 * (#2.52 * &2 - y2 - y3 ))
332 Local-fan/Main-estimate/terminal-pent/ear-tau-approximation
333 tau_residual. This restricts delta above C";
334 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
335 ineq = all_forall `ineq [
344 (taum y1 y2 y3 y4 y5 y6 > y_of_x taud_x y1 y2 y3 y4 y5 y6) \/
345 (delta_y y1 y2 y3 y4 y5 y6 < &80)
353 doc="old name: local max v4*, WNLKGOQ, 1671775772 (with #0.12->#0.1) 8146670324
354 better local max test.
355 This is the numerator of the 2nd derivative of the function taud.
357 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
358 ineq = all_forall `ineq [
366 (y_of_x taud_D1_num_x y1 y2 y3 y4 y5 y6 > &0 \/
367 y_of_x taud_D1_num_x y1 y2 y3 y4 y5 y6 < &0 \/
368 y_of_x taud_D2_num_x y1 y2 y3 y4 y5 y6 < &0 \/
369 y_of_x taud_x y1 y2 y3 y4 y5 y6 > #0.12 \/
370 delta_y y1 y2 y3 y4 y5 y6 < &20)`;
377 doc="When delta <= 20, delta is monotonic decreasing in y1.
378 Hence smallest y1 on the comain delta <= 20 occurs when delta =20.
379 This gives a lower bound flat_term (y1 @ del20) <= taud on the domain delta <= 20.";
380 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Tex;Xconvert;Penalty(500.0,5000.0)];
381 ineq = all_forall `ineq [
390 y_of_x delta_x1 y1 y2 y3 y4 y5 y6 < &0 \/
391 delta_y y1 y2 y3 y4 y5 y6 > &20
398 doc="old name: local max v4*
399 better local max test.
400 This is the numerator of the 2nd derivative of the function taud.";
401 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
402 ineq = all_forall `ineq [
411 y_of_x taud_D2_num_x y1 y2 y3 y4 y5 y6 < &0 \/
412 delta_y y1 y2 y3 y4 y5 y6 > &20 \/
413 delta_y y1 y2 y3 y4 y5 y6 < &0
420 doc=" 'A' piece lower bound for terminal pent.";
421 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
422 ineq = all_forall `ineq [
430 (taum y1 y2 y3 y4 y5 y6 > #0.541
438 local fan/main estimate/terminal pent
439 LHS(135,taum>=0.12) RHS(126,y1=2,delta>20)
441 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
442 ineq = all_forall `ineq [
451 (taum y1 y2 y3 y4 y5 y6 +
452 y_of_x (mud_126_x_v1 (&2) (&2) (&2)) y1 y2 y3 y4 y5 y6 - sol0 +
463 local fan/main estimate/terminal pent
464 LHS(135,taum>=0.12) RHS(126,delta=0 (reduced from 20))
466 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
467 ineq = all_forall `ineq [
477 ((taum y1 y2 y3 y4 y5 y6 +
478 y_of_x (flat_term2_126_x d (&4) (&4)) y1 y2 y3 y4 y5 y6 +
481 y_of_x (delta_126_x (&4 * h0 * h0) (&4) (&4)) y1 y2 y3 y4 y5 y6 > d ))
489 local fan/main estimate/terminal pent
490 LHS(135,y1=2) RHS(126,y1=2)
492 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
493 ineq = all_forall `ineq [
502 (taum y1 y2 y3 y4 y5 y6 +
503 y_of_x (mud_126_x_v1 (&2) (&2) (&2)) y1 y2 y3 y4 y5 y6 - sol0 +
504 y_of_x (mud_135_x_v1 (&2) (&2) (&2)) y1 y2 y3 y4 y5 y6 - sol0
515 local fan/main estimate/terminal pent
516 LHS(135,y1=2) RHS(126,y1=2.52), extra implicit assumption delta > 20.
517 mu sqrt(delta) >= 0.012 sqrt(&20) > 0.053.
519 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0);Deprecated];
520 ineq = all_forall `ineq [
529 (taum y1 y2 y3 y4 y5 y6 +
530 y_of_x (mud_135_x_v1 (&2) (&2) (&2)) y1 y2 y3 y4 y5 y6 - sol0
541 local fan/main estimate/terminal pent
542 LHS(135,y1=2) RHS(126,y1=2.52), extra assumption deltaRHS < 20.
544 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
545 ineq = all_forall `ineq [
554 y_of_x (delta_126_x (&4 * h0 * h0) (&4) (&4)) y1 y2 y3 y4 y5 y6 > &20 \/
555 (taum y1 y2 y3 y4 y5 y6 +
556 y_of_x (mud_135_x_v1 (&2) (&2) (&2)) y1 y2 y3 y4 y5 y6 - sol0
565 local fan/main estimate/terminal pent
566 LHS(135,y1=2) RHS(126,delta <= 20 (reduce to delta=0 or previous case))
568 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
569 ineq = all_forall `ineq [
579 ((taum y1 y2 y3 y4 y5 y6 +
580 y_of_x (flat_term2_126_x d (&4) (&4)) y1 y2 y3 y4 y5 y6 +
581 y_of_x (mud_135_x_v1 (&2) (&2) (&2)) y1 y2 y3 y4 y5 y6 - sol0
583 y_of_x (delta_126_x (&4 * h0 * h0) (&4) (&4)) y1 y2 y3 y4 y5 y6 > d ))
591 local fan/main estimate/terminal pent
592 LHS(135,y1=2.52) RHS(126,y1=2.52)
593 wlog. LHS delta on ears is >= 20,
594 mu sqrt(delta) >= 0.012 sqrt(&20) > 0.053.
595 If RHS delta >= 20. get 0.541 + 2 (0.053) > 0.616.
596 so wlog. RHS delta on ear is <= 20.
598 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
599 ineq = all_forall `ineq [
609 ((taum y1 y2 y3 y4 y5 y6 +
612 y_of_x (delta_126_x (&4 * h0 * h0) (&4) (&4)) y1 y2 y3 y4 y5 y6 > d ))
620 local fan/main estimate/terminal pent
621 LHS(135,y1=2.52,delta=>20) RHS(126,delta=0)
623 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
624 ineq = all_forall `ineq [
632 (taum y1 y2 y3 y4 y5 y6 +
633 y_of_x (flat_term2_126_x (&0) (&4) (&4)) y1 y2 y3 y4 y5 y6 +
634 y_of_x (mud_135_x_v1 (&2 * h0) (&2) (&2)) y1 y2 y3 y4 y5 y6
636 y_of_x (delta_135_x (&4 * h0 * h0) (&4) (&4)) y1 y2 y3 y4 y5 y6 < &20 \/
637 y_of_x (delta_126_x (&4 * h0 * h0) (&4) (&4)) y1 y2 y3 y4 y5 y6 > &0 // \/
638 // y_of_x (delta_126_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 < &0
646 local fan/main estimate/terminal pent
647 LHS(135,delta=20) RHS(126,y1=2.52,delta<=20)
650 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
651 ineq = all_forall `ineq [
659 (taum y1 y2 y3 y4 y5 y6 +
660 y_of_x (flat_term2_135_x (&20) (&4) (&4)) y1 y2 y3 y4 y5 y6 +
661 (#0.012 + #0.01 * (#2.52 * &2 - y1 - y3 )) * #4.47 +
664 // removed 2013-05-26 y_of_x (delta_135_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 < &20 \/
665 y_of_x (delta_135_x (&4 * h0 * h0) (&4) (&4)) y1 y2 y3 y4 y5 y6 > &20 \/
666 y_of_x (delta_126_x (&4 * h0 * h0) (&4) (&4)) y1 y2 y3 y4 y5 y6 < &0 \/
667 y_of_x (delta_126_x (&4 * h0 * h0) (&4) (&4)) y1 y2 y3 y4 y5 y6 > &20
675 local fan/main estimate/terminal pent
676 LHS(135,delta=20) RHS(126,y1=2.52,delta>20)
679 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
680 ineq = all_forall `ineq [
688 (taum y1 y2 y3 y4 y5 y6 +
689 y_of_x (flat_term2_135_x (&20) (&4) (&4)) y1 y2 y3 y4 y5 y6 +
690 (#0.012 + #0.01 * (#2.52 * &2 - y1 - y3 )) * #4.47 +
691 y_of_x (mud_126_x_v1 (&2 * h0) (&2) (&2)) y1 y2 y3 y4 y5 y6
693 // removed 2013-05-26: y_of_x (delta_135_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 < &20 \/
694 y_of_x (delta_135_x (&4 * h0 * h0) (&4) (&4)) y1 y2 y3 y4 y5 y6 > &20 \/
695 y_of_x (delta_126_x (&4 * h0 * h0) (&4) (&4)) y1 y2 y3 y4 y5 y6 < &20
704 local fan/main estimate/terminal pent
705 LHS(135,delta=20) RHS(126,delta=0)
707 0.705 comes by combining mu_y and flat_term2_x terms.
709 tags=[Main_estimate;Flypaper ["XFZFSWT"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
710 ineq = all_forall `ineq [
718 (taum y1 y2 y3 y4 y5 y6 +
719 #0.705 * y_of_x (flat_term2_135_x (&20) (&4) (&4)) y1 y2 y3 y4 y5 y6 +
720 (#0.012 + #0.01 * (#2.52 * &2 - y1 - y3 )) * #4.47 +
721 y_of_x (flat_term2_126_x (&0) (&4) (&4)) y1 y2 y3 y4 y5 y6
723 y_of_x (delta_135_x (&4 * h0 * h0) (&4) (&4)) y1 y2 y3 y4 y5 y6 > &20 \/
724 y_of_x (delta_126_x (&4 * h0 * h0) (&4) (&4)) y1 y2 y3 y4 y5 y6 > &0
729 addtex (Section,"Main Estimate","Local Fan/Main Estimate/Appendix/Terminal Hex");;
731 (* START OF HEX SECTION *)
736 doc="upper bound on minor diagonal is 3.915 when top edges are 2.
737 The bound on y4 comes from the triangle inequality.
738 This could be proved directly with monotonicity and delta, without interval arith.";
739 tags=[Flypaper["UPONLFY"];Main_estimate;Cfsqp;Xconvert;Tex];
740 ineq = all_forall `ineq [
749 delta_y y1 y2 y3 y4 y5 y6 < &0
756 doc="local fan/main estimate/terminal hex.
757 This is used to remove the eulerA_x hypothesis.";
758 tags=[Main_estimate;Flypaper ["LIAULBV"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
759 ineq = all_forall `ineq [
767 ( y_of_x delta_x4 y1 y2 y3 y4 y5 y6 < &0 \/
768 y_of_x eulerA_x y1 y2 y3 y4 y5 y6 > &0)
775 idv="test-hex-numerical";
777 This is the numerator of the 2nd derivative of the function taud.";
778 tags=[Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0);Deprecated];
779 ineq = all_forall `ineq [
787 (((y_of_x taud_D1_num_x y1 y2 y3 y4 y5 y6) pow 2 > &0) \/
788 (y_of_x taud_D2_num_x y1 y2 y3 y4 y5 y6 < &0 \/
789 taum y1 y2 y3 y4 y5 y6 > #0.0 \/ // can adjust this later.
790 delta_y y1 y2 y3 y4 y5 y6 < &15))`;
796 doc="local fan/main estimate/appendix/terminal hex
797 2nd derivative test for taud.
798 old version 4910585280. This uses taud.";
799 tags=[Main_estimate;Flypaper ["LIAULBV"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
800 ineq = all_forall `ineq [
808 (y_of_x taud_D1_num_x y1 y2 y3 y4 y5 y6 > &0 \/
809 y_of_x taud_D1_num_x y1 y2 y3 y4 y5 y6 < &0 \/
810 (y_of_x taud_D2_num_x y1 y2 y3 y4 y5 y6 < &0 \/
811 y_of_x taud_x y1 y2 y3 y4 y5 y6 > &0 \/
812 delta_y y1 y2 y3 y4 y5 y6 < &15))`;
819 doc="local fan/main estimate/appendix/terminal hex.
820 2nd derivative test for taud.";
821 tags=[Main_estimate;Flypaper ["LIAULBV"];Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
822 ineq = all_forall `ineq [
831 (y_of_x taud_D2_num_x y1 y2 y3 y4 y5 y6 < &0 \/
832 delta_y y1 y2 y3 y4 y5 y6 < &0) \/
833 delta_y y1 y2 y3 y4 y5 y6 > &15
838 let template_hex = `\ d234 d126 d135 c234 c126 c135 s45 s56 . ineq
847 (taum y1 y2 y3 y4 y5 y6 +
852 y_of_x eulerA_x y1 y2 y3 y4 y5 y6 < &0 \/
860 let mk_ineq_hex i234 i126 i135 =
861 let nth = List.nth in
862 let d234 = nth [` y_of_x (flat_term2_234_x (&0) (&4) (&4)) y1 y2 y3 y4 y5 y6 `;
864 `y_of_x (mud_234_x_v1 (&2) (&2) (&2)) y1 y2 y3 y4 y5 y6 - sol0`;
865 `y_of_x (mudLs_234_x (&4) (&10) (&2) (&2) (&2)) y1 y2 y3 y4 y5 y6 - sol0`;
867 let d126 = nth [` y_of_x (flat_term2_126_x (&0) (&4) (&4)) y1 y2 y3 y4 y5 y6 `;
869 `y_of_x (mud_126_x_v1 (&2) (&2) (&2)) y1 y2 y3 y4 y5 y6 - sol0`;
870 `y_of_x (mudLs_126_x (&4) (&10) (&2) (&2) (&2)) y1 y2 y3 y4 y5 y6 - sol0`;
872 let d135 = nth [` y_of_x (flat_term2_135_x (&0) (&4) (&4)) y1 y2 y3 y4 y5 y6 `;
874 `y_of_x (mud_135_x_v1 (&2) (&2) (&2)) y1 y2 y3 y4 y5 y6 - sol0`;
875 `y_of_x (mudLs_135_x (&4) (&10) (&2) (&2) (&2)) y1 y2 y3 y4 y5 y6 - sol0`;
877 let c234 = nth [`y_of_x (delta_234_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 < &0 \/
878 y_of_x (delta_234_x (#2.52 pow 2) (&4) (&4)) y1 y2 y3 y4 y5 y6 > &0`;
880 `y_of_x (delta_234_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 < &100`;
881 `y_of_x (delta_234_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 < &16 \/
882 y_of_x (delta_234_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 > &100`;
883 `y_of_x (delta_234_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 < &0 \/
884 y_of_x (delta_234_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 > &16`;] i234 in
885 let c126 = nth [`y_of_x (delta_126_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 < &0 \/
886 y_of_x (delta_126_x (#2.52 pow 2) (&4) (&4)) y1 y2 y3 y4 y5 y6 > &0`;
888 `y_of_x (delta_126_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 < &100`;
889 `y_of_x (delta_126_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 < &16 \/
890 y_of_x (delta_126_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 > &100`;
891 `y_of_x (delta_126_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 < &0 \/
892 y_of_x (delta_126_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 > &16`;] i126 in
893 let c135 = nth [`y_of_x (delta_135_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 < &0 \/
894 y_of_x (delta_135_x (#2.52 pow 2) (&4) (&4)) y1 y2 y3 y4 y5 y6 > &0`;
896 `y_of_x (delta_135_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 < &100`;
897 `y_of_x (delta_135_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 < &16 \/
898 y_of_x (delta_135_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 > &100`;
899 `y_of_x (delta_135_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 < &0 \/
900 y_of_x (delta_135_x (&4) (&4) (&4)) y1 y2 y3 y4 y5 y6 > &16`;] i135 in
901 let s45 = if (i234= i126) then `y6 < y4` else `F` in
902 let s56 = if (i126= i135) then `y5 < y6` else `F` in
903 rhs(concl(REWRITE_CONV[] (Ineq.mk_tplate template_hex [d234;d126;d135;c234;c126;c135;s45;s56])));;
905 (* s45 correction svn 3246, 2013-05-28 *)
907 let make_hex_ear i234 i126 i135 =
909 idv = Printf.sprintf "7550003505 %d %d %d" i234 i126 i135;
910 ineq = mk_ineq_hex i234 i126 i135;
911 doc = "local fan/main estimate/terminal hex/body
912 cases: (0) delta=0; (1) taud>0; (2) y=2, 0<=delta<=16; (3) y=2, 16<=delta<=100; (4) y=2, 100<delta.";
913 tags=[Main_estimate;Flypaper ["LIAULBV"];Cfsqp;Xconvert;Penalty(50.0,500.0)];
920 add (make_hex_ear i1 i2 i3) done done done;;
923 (* HEXAGONS, SKINNY TRIANGLES *)
924 (* Now for the outer skinny triangle (ear) estimates used in hexagon triangulation *)
928 doc="This reduces OWZLKVY to the case when delta_y < 200. Added 2013-4-18";
929 tags = [Cfsqp;Tablelp;Main_estimate;Xconvert;Tex];
930 ineq = all_forall `ineq
939 delta_y y1 y2 y3 y4 y5 y6 < &200 \/ taum y1 y2 y3 y4 y5 y6 > &0 )`;
944 doc="In OWZLKVY the angle at y1 is obtuse. Added 2013-4-18.";
945 tags = [Cfsqp;Tablelp;Xconvert;Main_estimate;Tex;Cfsqp_branch 1];
946 ineq = all_forall `ineq
955 delta_y y1 y2 y3 y4 y5 y6 > &200 \/ y_of_x delta_x4 y1 y2 y3 y4 y5 y6 < &0 ) `;
960 doc="In OWZLKVY the angle at y2,y3 is acute. Added 2013-4-18.";
961 tags = [Cfsqp;Tablelp;Xconvert;Main_estimate;Tex];
962 ineq = all_forall `ineq
970 (y_of_x delta_x4 y1 y2 y3 y4 y5 y6 > &0)`;
975 doc="Used in the proof of OWZLKVY to show that sol>=0. Added 2013-04-17.";
976 tags = [Cfsqp;Tablelp;Xconvert;Main_estimate;Tex];
977 ineq = all_forall `ineq
985 (y_of_x eulerA_x y1 y2 y3 y4 y5 y6 > &0)`;
992 This is part of the proof of Lemma OWZLKVY in flypaper.pdf.
993 In the book this is called 'some analytic function f' and
994 doesn't give the idv of the calculation.
996 skinny triangle (ear) residual is positive, when y1=2.52,
997 We have tau = tau_residual * sqrt(delta), by definition.
998 This domain falls within the preconditions of the residual function because of
999 4559601669 and 2485876245
1000 Domain generalized June 3 (2011?): y3 upperbound -> 2.52.
1002 tags=[Flypaper["SAUZWSD"];Main_estimate;Cfsqp;Xconvert;Tex;Penalty(500.0,5000.0)];
1003 ineq = all_forall `ineq [
1012 (y_of_x tau_residual_x y1 y2 y3 y4 y5 y6 > &0) \/
1013 (delta_y y1 y2 y3 y4 y5 y6 < &0)
1018 addtex(Section,"Main Estimate","quadrilaterals");;
1020 (* Here are some estimates for quad cases that were added late:
1026 idv="6184614449"; (* was "test gamma1"; *)
1028 tags=[Main_estimate;Cfsqp;Tex;Xconvert];
1029 ineq = Sphere.all_forall `ineq
1037 ((delta4_y y1 y2 y3 y4 y5 y6 < &0) ) `;
1042 idv= "2073661826"; (* "test gamma"; *)
1044 tags=[Main_estimate;Cfsqp;Tex;Xconvert];
1045 ineq = Sphere.all_forall `ineq
1053 ((delta4_y y1 y2 y3 y4 y5 y6 < &0) ) `;
1058 idv="1348932091"; (* was "testB"; *)
1060 tags=[Main_estimate;Cfsqp;Tex;Xconvert];
1061 ineq = Sphere.all_forall `ineq
1069 ((dih_y y1 y2 y3 y4 y5 y6 < #1.4) ) `;
1074 idv="1348932091 delta";
1076 tags=[Main_estimate;Cfsqp;Tex;Xconvert];
1077 ineq = Sphere.all_forall `ineq
1085 ((delta_y y1 y2 y3 y4 y5 y6 > &0) ) `;
1090 idv= "5557288534"; (* was "testC"; *)
1092 tags=[Main_estimate;Cfsqp;Tex;Xconvert];
1093 ineq = Sphere.all_forall `ineq
1101 ((dih_y y1 y2 y3 y4 y5 y6 < #1.7) ) `;
1106 idv= "5557288534 delta";
1108 tags=[Main_estimate;Cfsqp;Tex;Xconvert];
1109 ineq = Sphere.all_forall `ineq
1117 ((delta_y y1 y2 y3 y4 y5 y6 > &0) ) `;
1124 doc = "Justify dih linearization in 8405387449";
1125 tags=[Main_estimate;Cfsqp;Tex;Xconvert];
1126 ineq = Sphere.all_forall `ineq
1134 ((delta4_y y1 y2 y3 y4 y5 y6 > &0) ) `;
1141 (EAR) A bound on the dih of an ear in a quad,
1142 The disjunct (dih_y y1 y2 y3 y4 y5 y6 < #1.1 has been 'linearized'.
1143 Tan[1.1]^2 = (>=) 3.86
1144 In more detail, this calc shows that delta < 0 or dih < 1.1
1146 tags=[Main_estimate;Cfsqp;Tex;Xconvert;];
1147 ineq = Sphere.all_forall `ineq [
1154 (let tan2lower = #3.86 in
1155 ((&4 * x1_delta_y y1 y2 y3 y4 y5 y6 < tan2lower * delta4_squared_y y1 y2 y3 y4 y5 y6) \/
1156 delta_y y1 y2 y3 y4 y5 y6 < &0))`;
1161 idv="5550839403"; (* was "test E"; *)
1163 tags=[Main_estimate;Cfsqp;Tex;Xconvert];
1164 ineq = Sphere.all_forall `ineq
1172 ((dih_y y1 y2 y3 y4 y5 y6 < #2.0) ) `;
1178 idv="5550839403 delta";
1180 tags=[Main_estimate;Cfsqp;Tex;Xconvert];
1181 ineq = Sphere.all_forall `ineq
1189 ((delta_y y1 y2 y3 y4 y5 y6 > &0) ) `;
1194 addtex (Section,"Main Estimate","Ad hoc quadrilaterals");;
1198 Let's start with the ad hoc inequality: 9563139965D. (>= 0.467 )
1199 By top edge contraction arguments, we may assume that
1200 (0) all top edges have length 2, or
1201 (1) both diagonals have length 3 (by contracting in different ways).
1202 The first case (0) is impossible by geomeric considerations:
1203 edges=2 ==> some diagonal <= sqrt8.
1204 So both diagonals have length 3.
1205 This has been completely solved in a series 9563139965D in ineq.hl.
1210 "Next the ad hoc LP inequality in head.mod :
1211 tauB4h 9620775909. tau >= 0.477, quad, diags >= sqrt8, one edge [2.52,sqrt8].
1212 This comes from a pentagon that has a 'flat quarter'.
1214 Case 1: a diagonal < 3.01. Here we make no deformations. We cut
1215 the quad into two triangles.
1217 Case 2: both diags > 3.01. In this case we bound the shorter diagonal.
1218 Solve[Delta[x, 2, 2, x, 2, sqrt8] == 0, x] // N gives x <= 3.108
1226 Now third ad hoc LP inequality: Quad 0.696.
1227 tau5h 9620775909-5 std5 INTER std56flatfree, tau >= 0.696, pent, diags >= sqrt8,
1228 It drops to a quad case if some diag of pent has length <= 3.01 and a slice is made.
1229 Contract top edges of quad until 3 have length 2.
1230 Extremize the other long edge to 3.01 or sqrt8.
1231 Short diag: Solve[Delta[x,2,2,x,2,3.01]==0,x]//N, gives x <= 3.166
1237 doc="quad case both diags > 3.01, y9 long.
1238 4559601669 gives the gratuitous delta4_y disjunct.
1239 May 23, changed delta4 constant from -11.2 to 0.
1240 2013-05-05, 0.696 -> 0.616.";
1241 tags=[Flypaper["FHOLLLW"];Main_estimate;Cfsqp;Quad_cluster 10000.0 (* was 0.001 *);
1242 Xconvert;Tex;Penalty(50.0,5000.0)];
1243 ineq = all_forall `ineq [
1254 ( tauq y1 y2 y3 y4 y5 y6 y7 y8 y9 > #0.513) \/
1255 (delta_y y1 y2 y3 y4 y5 y6 < &10) \/
1256 delta4_y y1 y2 y3 y4 y5 y6 > &0 \/
1257 ( enclosed y1 y5 y6 y4 y2 y3 y7 y8 y9 < #3.01 ))`;
1262 idv="4680581274 delta issue";
1263 doc="quad case both diags > 3.01, y9 long.
1264 This justifies the assumption the disjunct delta < 10 in the inequality.
1265 4559601669 gives the gratuitous delta4_y disjunct.
1266 May 23, changed delta4 constant from -11.2 to 0.";
1267 tags=[Flypaper["FHOLLLW"];Main_estimate;Cfsqp;Quad_cluster 10000.0 (* was 0.001 *);
1268 Xconvert;Tex;Penalty(50.0,5000.0)];
1269 ineq = all_forall `ineq [
1280 (delta_y y1 y2 y3 y4 y5 y6 > &10) \/
1281 delta4_y y1 y2 y3 y4 y5 y6 > &0 \/
1282 ( enclosed y1 y5 y6 y4 y2 y3 y7 y8 y9 < #3.01 ))`;
1287 idv="4680581274 delta top issue";
1288 doc="quad case top neg delta.
1289 Solve[Delta[x,2,2,x,2,3.01]==0,x] (*x < 3.166 *)
1291 tags=[Flypaper["FHOLLLW"];Main_estimate;Cfsqp;Xconvert];
1292 ineq = all_forall `ineq [
1299 (delta_y y1 y2 y3 y4 y5 y6 < &0)`;
1304 addtex (Section,"Main Estimate","Quadrilaterals (non ad hoc)");;
1310 doc=" Main estimate/quad case.
1311 This justifies the upper bound of 3.62 on shortest diagonal when top edges are 2,cstab,2,cstab.
1313 tags=[Flypaper["FHOLLLW"];Cfsqp;Main_estimate;Xconvert;Tex;Penalty(50.0,500.0)];
1314 ineq = all_forall `ineq [
1322 ( delta_y y1 y2 y3 y4 y5 y6 < &0)`;
1328 doc="Main estimate/quad/upper echelon.
1330 Triangulate quad with diagonal y4.
1331 Use if some diag, 3.01 <= diag <= 3.62.
1332 2013-06-13. Adapted from 9269152105. d and Lower bound on y4 changed ";
1333 tags=[Flypaper["FHOLLLW"];Main_estimate;Cfsqp;Xconvert;Tex;Penalty(50.0,500.0)];
1334 ineq = all_forall `ineq [
1343 ( taum y1 y2 y3 y4 y5 y6 > #0.2565 )
1347 (* now for the cases where the shorter diagonal does not separate long edges *)
1352 doc="tameTableD[2,2].
1353 Triangulate quad with diagonal y4.
1354 Case both diags > 3.01, y6, y9 long (2.52 and 3.01),
1355 short diagonal doesn't separate long edges.
1356 Triangulate by long diagonal (at least 3.41 for otherwise it drops into case
1357 where short diagonal separates long edges).
1358 Solve[Delta[x, 2, 2, 3.01, 2.52, 3.01] == 0, x] (* x < 3.634 *)
1360 tags=[Flypaper["FHOLLLW"];Main_estimate;Cfsqp;Quad_cluster 10000.0 (* was 0.001 *);
1361 Xconvert;Tex;Penalty(50.0,500.0)];
1362 ineq = all_forall `ineq [
1373 delta_y y1 y2 y3 y4 y5 y6 > &30 \/
1374 ( enclosed y1 y5 y6 y4 y2 y3 y7 y8 y9 < #3.01 ))`;
1379 addtex (Section,"Main Estimate","Triangles");;
1381 (* FIRST DEAL WITH AD HOC TRIANGLES *)
1385 If the sliced edge is between [sqrt8,3.01], the triangle (2,1) has tau < tame_table_d 2 1.
1386 Nevertheless tau > 0.11
1387 We must compensate by putting an extra penalty term (tame_table_d 2 1 - 0.11)
1388 in the other pieces.
1390 Ad hoc LP. The case.
1391 tauB4h 9620775909 apex4 tau >= 0.477, quad, diags >= sqrt8, one edge [2.52,sqrt8]
1392 This can break into a triangle (2,1) [2.52,sqrt8][sqrt8,3.01] and a triangle (1,2).
1393 In this case we run one extra triangle calc,
1394 replace tame_table_d entries with 0.477 - 0.11.
1396 tau5h 9620775909-5 std5 INTER std56flatfree, tau >= 0.696, pent, diags >= sqrt8,
1397 This will give an A-piece with [sqrt8,3.01][sqrt8,3.01]. need 0.696 - 2 0.11.
1399 9563139965D, dart4_diag3_b, tau >= 0.467, quad, diags >= 3.
1400 No triangle occurs here. No diagonal drawn.
1407 doc="skinny clipped triangle (ear) inequality
1408 In the application to tameTableD[4,1], we have y4=3.01, y6=2,
1409 It is slightly generalized for later use.";
1410 tags=[Flypaper["FHOLLLW"];Main_estimate;Cfsqp;Xconvert;Tex;Penalty(50.0,500.0)];
1411 ineq = all_forall `ineq [
1420 ( taum y1 y2 y3 y4 y5 y6 - #0.1 * (#3.01 - y4) > #0.11) \/
1421 (delta_y y1 y2 y3 y4 y5 y6 < &0)
1429 doc=" 0.477 estimate, clipped A-piece triangle.
1431 We reuse the other cut triangle (bound 0.11) from above.
1432 We have not done it here, but we could extremize edge y5, y6.";
1433 tags=[Flypaper["FHOLLLW"];Main_estimate;Cfsqp;Xconvert;Tex;Penalty(50.0,500.0)];
1434 ineq = all_forall `ineq [
1443 ( taum y1 y2 y3 y4 y5 y6 + #0.1 * (#3.01 - y4) > #0.477 - #0.11) \/
1444 (delta_y y1 y2 y3 y4 y5 y6 < &0)
1452 doc="pentagon case, clipped A-piece triangle. Added 2013-4-20";
1453 tags=[Flypaper["FHOLLLW"];Main_estimate;Cfsqp;Xconvert;Tex;Penalty(50.0,500.0)];
1454 ineq = all_forall `ineq [
1463 ( taum y1 y2 y3 y4 y5 y6 > tame_table_d 4 1 - &2 * #0.11) \/
1464 (delta_y y1 y2 y3 y4 y5 y6 < &0)
1471 doc="triangle 1,2, ad hoc 0.696 case LP";
1472 tags=[Flypaper["FHOLLLW"];Main_estimate;Cfsqp;Xconvert;Tex;Penalty(50.0,500.0)];
1473 ineq = all_forall `ineq [
1482 taum y1 y2 y3 y4 y5 y6 > #0.696 - &2 * #0.11
1488 addtex(Section,"Main Estimate","Triangle (non ad hoc)");;
1493 doc="main estimate/triangle 3 long edges. Added 2013-06-04.";
1494 tags=[Flypaper["FHOLLLW"];Main_estimate;Cfsqp;Xconvert;Tex;Penalty(50.0,500.0)];
1495 ineq = Sphere.all_forall `ineq [
1504 taum y1 y2 y3 y4 y5 y6 > #0.476
1511 doc="main estimate A piece. Added 2013-06-04";
1512 tags=[Flypaper["FHOLLLW"];Main_estimate;Cfsqp;Xconvert;Tex;Penalty(50.0,500.0)];
1513 ineq = Sphere.all_forall `ineq [
1522 taum y1 y2 y3 y4 y5 y6 > #0.2759
1529 doc="main estimate triangle short ear. Added 2013-06-04.";
1530 tags=[Flypaper["FHOLLLW"];Main_estimate;Cfsqp;Xconvert;Tex;Penalty(50.0,500.0)];
1531 ineq = Sphere.all_forall `ineq [
1540 taum y1 y2 y3 y4 y5 y6 > #0.103
1545 idv = "OMKYNLT 3336871894";
1546 tags = [Tex;Cfsqp;Eps 1.0e-8;Flypaper["OMKYNLT"];Main_estimate;Xconvert;Sharp];
1547 doc = "This is the nonnegativity of $\\tau$ on triangles. It is a sharp inequality.";
1548 ineq = all_forall `ineq
1557 ( taum y1 y2 y3 y4 y5 y6 >= #0.0)`;
1563 doc=" Main estimate/quad case.
1565 tags=[Flypaper["FHOLLLW"];Cfsqp;Main_estimate;Xconvert;Tex;Penalty(50.0,500.0)];
1566 ineq = all_forall `ineq [
1571 (&2 * h0,y5,&2 * h0);
1574 ( delta_y y1 y2 y3 y4 y5 y6 < &0)`;
1582 doc=" 0.513 estimate, A-piece triangle.
1583 One diagonal exactly 3.01. Added 2013-06-13. replaces 8748498390";
1584 tags=[Flypaper["FHOLLLW"];Cfsqp;Main_estimate;Xconvert;Tex;Penalty(50.0,500.0)];
1585 ineq = all_forall `ineq [
1593 ( taum y1 y2 y3 y4 y5 y6 + #0.12 * (y1 - &2) > #0.403 )`;
1600 doc=" 0.513 estimate. ear. Combine with 8748498390 along diagonal 3.01.
1602 tags=[Flypaper["FHOLLLW"];Cfsqp;Main_estimate;Xconvert;Tex;Penalty(50.0,500.0)];
1603 ineq = all_forall `ineq [
1611 ( taum y1 y2 y3 y4 y5 y6 > #0.11 + #0.12 * (y1 - &2) )`;
1617 doc="Used to show that angle not straight in (3,3) diagonal main estimate.
1619 tags=[Flypaper["FHOLLLW"];Main_estimate;Cfsqp;Xconvert;Tex;Penalty(50.0,500.0)];
1620 ineq = all_forall `ineq [
1628 ( delta_y y1 y2 y3 y4 y5 y6 > &0 )`;