first steps in the formalization of convex polyhedra in
play

First steps in the formalization of convex polyhedra in Coq Solvers - PowerPoint PPT Presentation

Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography First steps in the formalization of convex polyhedra in Coq Solvers Principles and Architectures Seminar, Rennes


  1. Diameter of a polyhedron diameter of the vertex- edge graph Example diameter of a 3D-cube 3 D n f maximum diameter of a n -dim. (compact) polyhedron with f facets Hirsch conjecture (1957) …disproved by Santos (2009) D n f f n D 43 86 86 43 1 Open problem Is there a polynomial upper bound on the diameter? Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in combinatorics Convex polyhedra have a rich combinatorial flavor via their faces: facets , …, edges, vertices The faces of a cube First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 5/38

  2. Diameter of a polyhedron diameter of the vertex- edge graph Example diameter of a 3D-cube 3 D n f maximum diameter of a n -dim. (compact) polyhedron with f facets Hirsch conjecture (1957) …disproved by Santos (2009) D n f f n D 43 86 86 43 1 Open problem Is there a polynomial upper bound on the diameter? Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in combinatorics Convex polyhedra have a rich combinatorial flavor via their faces: facets , …, edges, vertices The faces of a cube First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 5/38

  3. Diameter of a polyhedron diameter of the vertex- edge graph Example diameter of a 3D-cube 3 D n f maximum diameter of a n -dim. (compact) polyhedron with f facets Hirsch conjecture (1957) …disproved by Santos (2009) D n f f n D 43 86 86 43 1 Open problem Is there a polynomial upper bound on the diameter? Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in combinatorics Convex polyhedra have a rich combinatorial flavor via their faces: facets , …, edges, vertices The faces of a cube First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 5/38

  4. Diameter of a polyhedron diameter of the vertex- edge graph Example diameter of a 3D-cube 3 D n f maximum diameter of a n -dim. (compact) polyhedron with f facets Hirsch conjecture (1957) …disproved by Santos (2009) D n f f n D 43 86 86 43 1 Open problem Is there a polynomial upper bound on the diameter? Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in combinatorics Convex polyhedra have a rich combinatorial flavor via their faces: facets , …, edges, vertices The faces of a cube First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 5/38

  5. Diameter of a polyhedron diameter of the vertex- edge graph Example diameter of a 3D-cube 3 D n f maximum diameter of a n -dim. (compact) polyhedron with f facets Hirsch conjecture (1957) …disproved by Santos (2009) D n f f n D 43 86 86 43 1 Open problem Is there a polynomial upper bound on the diameter? Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in combinatorics Convex polyhedra have a rich combinatorial flavor via their faces: facets , …, edges, vertices The faces of a cube First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 5/38

  6. Diameter of a polyhedron diameter of the vertex- edge graph Example diameter of a 3D-cube 3 D n f maximum diameter of a n -dim. (compact) polyhedron with f facets Hirsch conjecture (1957) …disproved by Santos (2009) D n f f n D 43 86 86 43 1 Open problem Is there a polynomial upper bound on the diameter? Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in combinatorics Convex polyhedra have a rich combinatorial flavor via their faces: facets, …, edges , vertices The faces of a cube First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 5/38

  7. Diameter of a polyhedron diameter of the vertex- edge graph Example diameter of a 3D-cube 3 D n f maximum diameter of a n -dim. (compact) polyhedron with f facets Hirsch conjecture (1957) …disproved by Santos (2009) D n f f n D 43 86 86 43 1 Open problem Is there a polynomial upper bound on the diameter? Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in combinatorics Convex polyhedra have a rich combinatorial flavor via their faces: facets, …, edges, vertices The faces of a cube First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 5/38

  8. Example diameter of a 3D-cube 3 D n f maximum diameter of a n -dim. (compact) polyhedron with f facets Hirsch conjecture (1957) …disproved by Santos (2009) D n f f n D 43 86 86 43 1 Open problem Is there a polynomial upper bound on the diameter? Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in combinatorics Convex polyhedra have a rich combinatorial flavor via their faces: facets, …, edges, vertices The faces of a cube Diameter of a polyhedron = diameter of the vertex- edge graph First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 5/38

  9. Example diameter of a 3D-cube 3 D n f maximum diameter of a n -dim. (compact) polyhedron with f facets Hirsch conjecture (1957) …disproved by Santos (2009) D n f f n D 43 86 86 43 1 Open problem Is there a polynomial upper bound on the diameter? Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in combinatorics Convex polyhedra have a rich combinatorial flavor via their faces: facets, …, edges, vertices The faces of a cube Diameter of a polyhedron = diameter of the vertex- edge graph First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 5/38

  10. D n f maximum diameter of a n -dim. (compact) polyhedron with f facets Hirsch conjecture (1957) …disproved by Santos (2009) D n f f n D 43 86 86 43 1 Open problem Is there a polynomial upper bound on the diameter? Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in combinatorics Convex polyhedra have a rich combinatorial flavor via their faces: facets, …, edges, vertices The faces of a cube Diameter of a polyhedron = diameter of the vertex- edge graph Example diameter of a 3D-cube = 3 . First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 5/38

  11. Hirsch conjecture (1957) …disproved by Santos (2009) D n f f n D 43 86 86 43 1 Open problem Is there a polynomial upper bound on the diameter? Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in combinatorics Convex polyhedra have a rich combinatorial flavor via their faces: facets, …, edges, vertices The faces of a cube Diameter of a polyhedron = diameter of the vertex- edge graph Example diameter of a 3D-cube = 3 . D ( n , f ) : = maximum diameter of a n -dim. (compact) polyhedron with f facets First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 5/38

  12. …disproved by Santos (2009) D 43 86 86 43 1 Open problem Is there a polynomial upper bound on the diameter? Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in combinatorics Convex polyhedra have a rich combinatorial flavor via their faces: facets, …, edges, vertices The faces of a cube Diameter of a polyhedron = diameter of the vertex- edge graph Example diameter of a 3D-cube = 3 . D ( n , f ) : = maximum diameter of a n -dim. (compact) polyhedron with f facets Hirsch conjecture (1957) D ( n , f ) ≤ f − n First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 5/38

  13. Open problem Is there a polynomial upper bound on the diameter? Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in combinatorics Convex polyhedra have a rich combinatorial flavor via their faces: facets, …, edges, vertices The faces of a cube Diameter of a polyhedron = diameter of the vertex- edge graph Example diameter of a 3D-cube = 3 . D ( n , f ) : = maximum diameter of a n -dim. (compact) polyhedron with f facets Hirsch conjecture (1957) …disproved by Santos (2009) D ( n , f ) ≤ f − n D ( 43 , 86 ) ≥ 86 − 43 + 1 First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 5/38

  14. Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in combinatorics Convex polyhedra have a rich combinatorial flavor via their faces: facets, …, edges, vertices The faces of a cube Diameter of a polyhedron = diameter of the vertex- edge graph Example diameter of a 3D-cube = 3 . D ( n , f ) : = maximum diameter of a n -dim. (compact) polyhedron with f facets Hirsch conjecture (1957) …disproved by Santos (2009) D ( n , f ) ≤ f − n D ( 43 , 86 ) ≥ 86 − 43 + 1 Open problem Is there a polynomial upper bound on the diameter? First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 5/38

  15. polynomial time number of arithmetic operations bounded by a polynomial in the dimension of the problem, i.e. m n . because it can be solved in polynomial time !!! (Khachiyan, 1980) 9th Smale’s Problem (Smale, 1998) Can we solve linear programming in strongly polynomial time? Linear programming is widely used… Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in optimization Linear programming = optimizing a linear function over a polyhedron ⟨ c , x ⟩ minimize Ax ≥ b , x ∈ R n subject to where c ∈ R n , and ⟨ c , x ⟩ : = ∑ n i = 1 c i x i . First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 6/38

  16. polynomial time number of arithmetic operations bounded by a polynomial in the dimension of the problem, i.e. m n . because it can be solved in polynomial time !!! (Khachiyan, 1980) 9th Smale’s Problem (Smale, 1998) Can we solve linear programming in strongly polynomial time? Linear programming is widely used… Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in optimization Linear programming = optimizing a linear function over a polyhedron ⟨ c , x ⟩ minimize Ax ≥ b , x ∈ R n subject to where c ∈ R n , and ⟨ c , x ⟩ : = ∑ n i = 1 c i x i . Example x 2 minimize 3 x 1 + x 2 subject to x 1 + x 2 ≥ 4 − x 1 − 3 x 2 ≥ − 23 4 x 1 − x 2 ≥ 1 − 2 x 1 + x 2 ≥ − 11 x 2 ≥ 1 x 1 First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 6/38

  17. polynomial time number of arithmetic operations bounded by a polynomial in the dimension of the problem, i.e. m n . because it can be solved in polynomial time !!! (Khachiyan, 1980) 9th Smale’s Problem (Smale, 1998) Can we solve linear programming in strongly polynomial time? Linear programming is widely used… Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in optimization Linear programming = optimizing a linear function over a polyhedron ⟨ c , x ⟩ minimize Ax ≥ b , x ∈ R n subject to where c ∈ R n , and ⟨ c , x ⟩ : = ∑ n i = 1 c i x i . Example x 2 minimize 3 x 1 + x 2 subject to x 1 + x 2 ≥ 4 − x 1 − 3 x 2 ≥ − 23 4 x 1 − x 2 ≥ 1 − 2 x 1 + x 2 ≥ − 11 x 2 ≥ 1 x 1 First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 6/38

  18. polynomial time number of arithmetic operations bounded by a polynomial in the dimension of the problem, i.e. m n . because it can be solved in polynomial time !!! (Khachiyan, 1980) 9th Smale’s Problem (Smale, 1998) Can we solve linear programming in strongly polynomial time? Linear programming is widely used… Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in optimization Linear programming = optimizing a linear function over a polyhedron ⟨ c , x ⟩ minimize Ax ≥ b , x ∈ R n subject to where c ∈ R n , and ⟨ c , x ⟩ : = ∑ n i = 1 c i x i . Example x 2 minimize 3 x 1 + x 2 subject to x 1 + x 2 ≥ 4 − x 1 − 3 x 2 ≥ − 23 4 x 1 − x 2 ≥ 1 − 2 x 1 + x 2 ≥ − 11 x 2 ≥ 1 x 1 First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 6/38

  19. polynomial time number of arithmetic operations bounded by a polynomial in the dimension of the problem, i.e. m n . because it can be solved in polynomial time !!! (Khachiyan, 1980) 9th Smale’s Problem (Smale, 1998) Can we solve linear programming in strongly polynomial time? Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in optimization Linear programming = optimizing a linear function over a polyhedron ⟨ c , x ⟩ minimize Ax ≥ b , x ∈ R n subject to where c ∈ R n , and ⟨ c , x ⟩ : = ∑ n i = 1 c i x i . Linear programming is widely used… First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 6/38

  20. polynomial time number of arithmetic operations bounded by a polynomial in the dimension of the problem, i.e. m n . 9th Smale’s Problem (Smale, 1998) Can we solve linear programming in strongly polynomial time? Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in optimization Linear programming = optimizing a linear function over a polyhedron ⟨ c , x ⟩ minimize Ax ≥ b , x ∈ R n subject to where c ∈ R n , and ⟨ c , x ⟩ : = ∑ n i = 1 c i x i . Linear programming is widely used… because it can be solved in polynomial time !!! (Khachiyan, 1980) First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 6/38

  21. polynomial time number of arithmetic operations bounded by a polynomial in the dimension of the problem, i.e. m n . Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in optimization Linear programming = optimizing a linear function over a polyhedron ⟨ c , x ⟩ minimize Ax ≥ b , x ∈ R n subject to where c ∈ R n , and ⟨ c , x ⟩ : = ∑ n i = 1 c i x i . Linear programming is widely used… because it can be solved in polynomial time !!! (Khachiyan, 1980) 9th Smale’s Problem (Smale, 1998) Can we solve linear programming in strongly polynomial time? First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 6/38

  22. Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why convex polyhedra matter… in optimization Linear programming = optimizing a linear function over a polyhedron ⟨ c , x ⟩ minimize Ax ≥ b , x ∈ R n subject to where c ∈ R n , and ⟨ c , x ⟩ : = ∑ n i = 1 c i x i . Linear programming is widely used… because it can be solved in polynomial time !!! (Khachiyan, 1980) 9th Smale’s Problem (Smale, 1998) Can we solve linear programming in strongly polynomial time? • polynomial time • number of arithmetic operations bounded by a polynomial in the dimension of the problem, i.e. ∼ m × n . First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 6/38

  23. polyhedra are subject to many open problems provide rigorous proof of theorems relying on informal computations “formal experimental maths” Some reasons to formalize convex polyhedra in a proof assistant critical applications increase the level of trust in polyhedral computation Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why formalizing convex polyhedra? Pure maths discrete mathematics, combinatorics, algebraic geometry Applied maths optimization, operations research, control theory CS computational geometry, software verification, compilation and program optimization, constraint solving First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 7/38

  24. polyhedra are subject to many open problems provide rigorous proof of theorems relying on informal computations “formal experimental maths” Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why formalizing convex polyhedra? Pure maths discrete mathematics, combinatorics, algebraic geometry Applied maths optimization, operations research, control theory CS computational geometry, software verification, compilation and program optimization, constraint solving Some reasons to formalize convex polyhedra in a proof assistant • critical applications = ⇒ increase the level of trust in polyhedral computation First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 7/38

  25. provide rigorous proof of theorems relying on informal computations “formal experimental maths” Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why formalizing convex polyhedra? Pure maths discrete mathematics, combinatorics, algebraic geometry Applied maths optimization, operations research, control theory CS computational geometry, software verification, compilation and program optimization, constraint solving Some reasons to formalize convex polyhedra in a proof assistant • critical applications = ⇒ increase the level of trust in polyhedral computation • polyhedra are subject to many open problems First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 7/38

  26. Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why formalizing convex polyhedra? Pure maths discrete mathematics, combinatorics, algebraic geometry Applied maths optimization, operations research, control theory CS computational geometry, software verification, compilation and program optimization, constraint solving Some reasons to formalize convex polyhedra in a proof assistant • critical applications = ⇒ increase the level of trust in polyhedral computation • polyhedra are subject to many open problems • provide rigorous proof of theorems relying on informal computations = ⇒ “formal experimental maths” First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 7/38

  27. 2 Coq has the Mathematical Components library (Gonthier et al., 2016) 3 Challenge: the logic of Coq is intuitionistic, i.e. constructive Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why formalizing… in Coq? 1 Coq is known for its computational abilities + computing that a = b in Coq is a proof of a = b . First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 8/38

  28. 2 Coq has the Mathematical Components library (Gonthier et al., 2016) 3 Challenge: the logic of Coq is intuitionistic, i.e. constructive Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why formalizing… in Coq? 1 Coq is known for its computational abilities + computing that a = b in Coq is a proof of a = b . A computational motivation Counterexample of Matschke, Santos, and Weibel (2015) to Hirsch conjecture: a polytope in dimension 20, with 40 facets and… 36 425 vertices First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 8/38

  29. 3 Challenge: the logic of Coq is intuitionistic, i.e. constructive Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why formalizing… in Coq? 1 Coq is known for its computational abilities + computing that a = b in Coq is a proof of a = b . 2 Coq has the Mathematical Components library (Gonthier et al., 2016) MathComp library • large hierarchy of mathematical objets: linear algebra, finite groups, algebraic numbers, representation theory, etc • introduce proven methodologies for formalization of maths in Coq First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 8/38

  30. Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why formalizing… in Coq? 1 Coq is known for its computational abilities + computing that a = b in Coq is a proof of a = b . 2 Coq has the Mathematical Components library (Gonthier et al., 2016) 3 Challenge: the logic of Coq is intuitionistic, i.e. constructive First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 8/38

  31. no double negation elimination P P , no proof by contradiction to show x P x , you need to construct an x such that P x holds. Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why formalizing… in Coq? 1 Coq is known for its computational abilities + computing that a = b in Coq is a proof of a = b . 2 Coq has the Mathematical Components library (Gonthier et al., 2016) 3 Challenge: the logic of Coq is intuitionistic, i.e. constructive Constructive logic • no excluded middle law P ∨ ¬ P First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 8/38

  32. to show x P x , you need to construct an x such that P x holds. Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why formalizing… in Coq? 1 Coq is known for its computational abilities + computing that a = b in Coq is a proof of a = b . 2 Coq has the Mathematical Components library (Gonthier et al., 2016) 3 Challenge: the logic of Coq is intuitionistic, i.e. constructive Constructive logic • no excluded middle law P ∨ ¬ P • no double negation elimination ¬¬ P ⇒ P , no proof by contradiction First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 8/38

  33. Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Why formalizing… in Coq? 1 Coq is known for its computational abilities + computing that a = b in Coq is a proof of a = b . 2 Coq has the Mathematical Components library (Gonthier et al., 2016) 3 Challenge: the logic of Coq is intuitionistic, i.e. constructive Constructive logic • no excluded middle law P ∨ ¬ P • no double negation elimination ¬¬ P ⇒ P , no proof by contradiction • to show ∃ x . P ( x ) , you need to construct an x such that P ( x ) holds. First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 8/38

  34. this easily provides several essential results on polyhedra: Farkas, Minkowski, strong duality, etc Main characteristics It is carried out in an effective way: 1 relies on a complete formalization of the simplex method in Coq 2 basic properties of polyhedra (emptiness, boundedness, etc) are defined by means of Coq programs , calling the simplex method Outcome bypass the intuitionistic nature of Coq Implementation The development is gathered in the library Coq-Polyhedra : github.com/nhojem/Coq-Polyhedra  Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography This talk First steps of the formalization of the theory of convex polyhedra, in Coq. First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 9/38

  35. this easily provides several essential results on polyhedra: Farkas, Minkowski, strong duality, etc Outcome bypass the intuitionistic nature of Coq Implementation The development is gathered in the library Coq-Polyhedra :  github.com/nhojem/Coq-Polyhedra Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography This talk First steps of the formalization of the theory of convex polyhedra, in Coq. Main characteristics It is carried out in an effective way: 1 relies on a complete formalization of the simplex method in Coq 2 basic properties of polyhedra (emptiness, boundedness, etc) are defined by means of Coq programs , calling the simplex method First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 9/38

  36. this easily provides several essential results on polyhedra: Farkas, Minkowski, strong duality, etc Implementation The development is gathered in the library Coq-Polyhedra : github.com/nhojem/Coq-Polyhedra  Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography This talk First steps of the formalization of the theory of convex polyhedra, in Coq. Main characteristics It is carried out in an effective way: 1 relies on a complete formalization of the simplex method in Coq 2 basic properties of polyhedra (emptiness, boundedness, etc) are defined by means of Coq programs , calling the simplex method Outcome • bypass the intuitionistic nature of Coq First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 9/38

  37. Implementation The development is gathered in the library Coq-Polyhedra : github.com/nhojem/Coq-Polyhedra  Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography This talk First steps of the formalization of the theory of convex polyhedra, in Coq. Main characteristics It is carried out in an effective way: 1 relies on a complete formalization of the simplex method in Coq 2 basic properties of polyhedra (emptiness, boundedness, etc) are defined by means of Coq programs , calling the simplex method Outcome • bypass the intuitionistic nature of Coq • this easily provides several essential results on polyhedra: Farkas, Minkowski, strong duality, etc First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 9/38

  38.  github.com/nhojem/Coq-Polyhedra Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography This talk First steps of the formalization of the theory of convex polyhedra, in Coq. Main characteristics It is carried out in an effective way: 1 relies on a complete formalization of the simplex method in Coq 2 basic properties of polyhedra (emptiness, boundedness, etc) are defined by means of Coq programs , calling the simplex method Outcome • bypass the intuitionistic nature of Coq • this easily provides several essential results on polyhedra: Farkas, Minkowski, strong duality, etc Implementation The development is gathered in the library Coq-Polyhedra : First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 9/38

  39. Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Outline of the talk 1 The simplex method: base block of the theory of convex polyhedra 2 Formalization of the simplex method 3 Concluding remarks and perspectives First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 10/38

  40. Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Outline of the talk 1 The simplex method: base block of the theory of convex polyhedra 2 Formalization of the simplex method 3 Concluding remarks and perspectives First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 11/38

  41. Problems a polyhedron is empty, or non-empty, or what? the formula ~(empty A b) does not provide a point x s.t. A *m x >=m b Boolean algebra, i.e., the type bool := true | false n and b m m . Assume that A n How to define that the polyhedron x Ax b is empty? ~~ a a || b a && b true, false bool ~ A A \/ B A /\ B Prop Definition empty A b := ~ (exists x, A *m x >=m b) : Prop. True, False Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Overcoming the intuitionistic nature of Coq Formulas of Coq live in the sort Prop . conjunction disjunction negation First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 12/38

  42. Boolean algebra, i.e., the type bool := true | false Problems a polyhedron is empty, or non-empty, or what? the formula ~(empty A b) does not provide a point x s.t. A *m x >=m b A \/ B ~ A Definition empty A b := ~ (exists x, A *m x >=m b) : Prop. ~~ a a || b a && b true, false Prop True, False A /\ B bool Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Overcoming the intuitionistic nature of Coq Formulas of Coq live in the sort Prop . conjunction disjunction negation Assume that A ∈ R m × n and b ∈ R m . How to define that the polyhedron { x ∈ R n : Ax ≥ b } is empty? First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 12/38

  43. Boolean algebra, i.e., the type bool := true | false Problems a polyhedron is empty, or non-empty, or what? the formula ~(empty A b) does not provide a point x s.t. A *m x >=m b A \/ B ~ A Definition empty A b := ~ (exists x, A *m x >=m b) : Prop. ~~ a a || b a && b true, false Prop True, False A /\ B bool Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Overcoming the intuitionistic nature of Coq Formulas of Coq live in the sort Prop . conjunction disjunction negation Assume that A ∈ R m × n and b ∈ R m . How to define that the polyhedron { x ∈ R n : Ax ≥ b } is empty? First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 12/38

  44. Boolean algebra, i.e., the type bool := true | false A \/ B True, False Definition empty A b := ~ (exists x, A *m x >=m b) : Prop. ~~ a a || b a && b true, false bool ~ A A /\ B Prop Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Overcoming the intuitionistic nature of Coq Formulas of Coq live in the sort Prop . conjunction disjunction negation Assume that A ∈ R m × n and b ∈ R m . How to define that the polyhedron { x ∈ R n : Ax ≥ b } is empty? Problems • a polyhedron is empty, or non-empty, or what? • the formula ~(empty A b) does not provide a point x s.t. A *m x >=m b First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 12/38

  45. Remark bool behaves like the classical logic ! Boolean reflection methodology (Gonthier et al., 2016) reflect P b means that P : Prop and b : bool are equivalent: either P holds and b = true , or ~P holds and b = false . The Coq formula P can be manipulated like in classical logic! case analysis, etc True, False ~ A a && b A /\ B A \/ B Prop a || b ~~ a true, false bool Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Overcoming the intuitionistic nature of Coq (2) Formulas of Coq live in the sort Prop . + Boolean algebra, i.e., the type bool := true | false conjunction disjunction negation First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 13/38

  46. Boolean reflection methodology (Gonthier et al., 2016) reflect P b means that P : Prop and b : bool are equivalent: either P holds and b = true , or ~P holds and b = false . The Coq formula P can be manipulated like in classical logic! case analysis, etc A \/ B ~ A ~~ a a || b a && b true, false Prop True, False A /\ B bool Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Overcoming the intuitionistic nature of Coq (2) Formulas of Coq live in the sort Prop . + Boolean algebra, i.e., the type bool := true | false conjunction disjunction negation Remark bool behaves like the classical logic ! First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 13/38

  47. The Coq formula P can be manipulated like in classical logic! case analysis, etc A \/ B Prop ~~ a a || b a && b true, false bool ~ A A /\ B True, False Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Overcoming the intuitionistic nature of Coq (2) Formulas of Coq live in the sort Prop . + Boolean algebra, i.e., the type bool := true | false conjunction disjunction negation Remark bool behaves like the classical logic ! Boolean reflection methodology (Gonthier et al., 2016) reflect P b means that P : Prop and b : bool are equivalent: • either P holds and b = true , • or ~P holds and b = false . First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 13/38

  48. ~ A Prop ~~ a a || b a && b true, false bool A \/ B A /\ B True, False Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Overcoming the intuitionistic nature of Coq (2) Formulas of Coq live in the sort Prop . + Boolean algebra, i.e., the type bool := true | false conjunction disjunction negation Remark bool behaves like the classical logic ! Boolean reflection methodology (Gonthier et al., 2016) reflect P b means that P : Prop and b : bool are equivalent: • either P holds and b = true , • or ~P holds and b = false . = ⇒ The Coq formula P can be manipulated like in classical logic! case analysis, etc First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 13/38

  49. Remark Booleans are computed by functions written in the language of Coq! Solution Implement decision procedures for emptiness, boundedness, membership, etc one building block: the simplex method in Coq Definition empty A b := (...) : Prop. Theorem emptyPn : reflect (exists x, A *m x >=m b) (~~ empty A b). Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Overcoming the intuitionistic nature of Coq (3) Assume that A ∈ R m × n and b ∈ R m . How to define that the polyhedron { x ∈ R n : Ax ≥ b } is empty? First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 14/38

  50. Remark Booleans are computed by functions written in the language of Coq! Solution Implement decision procedures for emptiness, boundedness, membership, etc one building block: the simplex method in Coq Definition empty A b := (...) : bool. Theorem emptyPn : reflect (exists x, A *m x >=m b) (~~ empty A b). Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Overcoming the intuitionistic nature of Coq (3) Assume that A ∈ R m × n and b ∈ R m . How to define that the polyhedron { x ∈ R n : Ax ≥ b } is empty? First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 14/38

  51. Remark Booleans are computed by functions written in the language of Coq! Solution Implement decision procedures for emptiness, boundedness, membership, etc one building block: the simplex method in Coq Definition empty A b := (...) : bool. Theorem emptyPn : reflect (exists x, A *m x >=m b) (~~ empty A b). Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Overcoming the intuitionistic nature of Coq (3) Assume that A ∈ R m × n and b ∈ R m . How to define that the polyhedron { x ∈ R n : Ax ≥ b } is empty? First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 14/38

  52. Solution Implement decision procedures for emptiness, boundedness, membership, etc one building block: the simplex method in Coq Definition empty A b := (...) : bool. Theorem emptyPn : reflect (exists x, A *m x >=m b) (~~ empty A b). Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Overcoming the intuitionistic nature of Coq (3) Assume that A ∈ R m × n and b ∈ R m . How to define that the polyhedron { x ∈ R n : Ax ≥ b } is empty? Remark Booleans are computed by functions written in the language of Coq! First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 14/38

  53. Definition empty A b := (...) : bool. Theorem emptyPn : reflect (exists x, A *m x >=m b) (~~ empty A b). Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Overcoming the intuitionistic nature of Coq (3) Assume that A ∈ R m × n and b ∈ R m . How to define that the polyhedron { x ∈ R n : Ax ≥ b } is empty? Remark Booleans are computed by functions written in the language of Coq! Solution Implement decision procedures for emptiness, boundedness, membership, etc = ⇒ one building block: the simplex method in Coq First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 14/38

  54. Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method Linear programming minimize ⟨ c , x ⟩ Ax ≥ b , x ∈ R n subject to where A ∈ R m × n , b ∈ R n , c ∈ R n , and ⟨ c , x ⟩ : = ∑ n i = 1 c i x i . x 2 − c x 1 First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 15/38

  55. or determines if the LP is unbounded bases encode vertices reduced costs determine optimality pivoting switches from a vertex to another x 2 2 iterate over the vertex-edge graph while decreasing the objective function 3 up to finding an optimal vertex Three ingredients x 1 Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method (2) 1 starting from an initial vertex x 2 x 1 First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 16/38

  56. or determines if the LP is unbounded bases encode vertices reduced costs determine optimality pivoting switches from a vertex to another x 2 3 up to finding an optimal vertex Three ingredients x 1 Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method (2) 1 starting from an initial vertex x 2 2 iterate over the vertex-edge graph while decreasing the objective function x 1 First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 16/38

  57. or determines if the LP is unbounded bases encode vertices reduced costs determine optimality pivoting switches from a vertex to another x 2 3 up to finding an optimal vertex Three ingredients x 1 Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method (2) 1 starting from an initial vertex x 2 2 iterate over the vertex-edge graph while decreasing the objective function x 1 First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 16/38

  58. or determines if the LP is unbounded bases encode vertices reduced costs determine optimality pivoting switches from a vertex to another x 2 3 up to finding an optimal vertex Three ingredients x 1 Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method (2) 1 starting from an initial vertex x 2 2 iterate over the vertex-edge graph while decreasing the objective function x 1 First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 16/38

  59. or determines if the LP is unbounded bases encode vertices reduced costs determine optimality pivoting switches from a vertex to another x 2 3 up to finding an optimal vertex Three ingredients x 1 Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method (2) 1 starting from an initial vertex x 2 2 iterate over the vertex-edge graph while decreasing the objective function x 1 First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 16/38

  60. or determines if the LP is unbounded bases encode vertices reduced costs determine optimality pivoting switches from a vertex to another x 2 3 up to finding an optimal vertex Three ingredients x 1 Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method (2) 1 starting from an initial vertex x 2 2 iterate over the vertex-edge graph while decreasing the objective function x 1 First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 16/38

  61. or determines if the LP is unbounded bases encode vertices reduced costs determine optimality pivoting switches from a vertex to another x 2 Three ingredients x 1 Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method (2) 1 starting from an initial vertex x 2 2 iterate over the vertex-edge graph while decreasing the objective function 3 up to finding an optimal vertex x 1 First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 16/38

  62. or determines if the LP is unbounded x 2 bases encode vertices reduced costs determine optimality x 1 pivoting switches from a vertex to another Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method (2) 1 starting from an initial vertex x 2 2 iterate over the vertex-edge graph while decreasing the objective function 3 up to finding an optimal vertex Three ingredients x 1 First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 16/38

  63. or determines if the LP is unbounded x 2 reduced costs determine optimality x 1 pivoting switches from a vertex to another Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method (2) 1 starting from an initial vertex x 2 2 iterate over the vertex-edge graph while decreasing the objective function 3 up to finding an optimal vertex Three ingredients • bases encode vertices x 1 Definition A basis is a subset I ⊂ [ m ] of cardinality n such that the rows ( A i ) i ∈ I are linearly independent. The associated basic point is defined as: x I : = A − 1 b I . I First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 16/38

  64. or determines if the LP is unbounded x 2 x 1 pivoting switches from a vertex to another Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method (2) 1 starting from an initial vertex x 2 2 iterate over the vertex-edge graph while decreasing the objective function 3 up to finding an optimal vertex Three ingredients • bases encode vertices • reduced costs determine optimality x 1 Reduced cost vector The reduced cost vector at basis I is defined as u I : = A − T c I . I When non-negative , it provides a feasible element of the dual LP: A T u = c , u ≥ 0 , u ∈ R m maximize ⟨ b , u ⟩ subject to which satisfies ⟨ b , u I ⟩ = ⟨ c , x I ⟩ . First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 16/38

  65. x 2 x 1 or determines if the LP is unbounded Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method (2) 1 starting from an initial vertex x 2 2 iterate over the vertex-edge graph while decreasing the objective function 3 up to finding an optimal vertex Three ingredients • bases encode vertices • reduced costs determine optimality x 1 • pivoting switches from a vertex to another First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 16/38

  66. x 2 x 1 Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method (2) 1 starting from an initial vertex x 2 2 iterate over the vertex-edge graph while decreasing the objective function 3 up to finding an optimal vertex Three ingredients • bases encode vertices • reduced costs determine optimality x 1 • pivoting switches from a vertex to another or determines if the LP is unbounded First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 16/38

  67. or, equivalently, the following LP is unbounded: A T u m maximize b u subject to 0 u 0 u (1) Farkas Lemma n The polyhedron x Ax b is empty if, and only if, m such that A T d there exists d 0 and b d 0 Suppose that we have formalized the simplex method in Coq: We get Farkas Lemma for free: | Optimal_basis I => false | Unbounded d => true end. Theorem emptyP A b : reflect (exists d, A^T *m d = 0 /\ '[b,d] > 0) (empty A b). Definition empty A b := match simplex [A^T -A^T 1:%M] 0 (-b) with Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Emptiness as a Boolean predicate First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 17/38

  68. or, equivalently, the following LP is unbounded: A T u m maximize b u subject to 0 u 0 u (1) Suppose that we have formalized the simplex method in Coq: We get Farkas Lemma for free: match simplex [A^T -A^T 1:%M] 0 (-b) with | Unbounded d => true | Optimal_basis I => false end. Theorem emptyP A b : Definition empty A b := reflect (exists d, A^T *m d = 0 /\ '[b,d] > 0) (empty A b). Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Emptiness as a Boolean predicate Farkas Lemma The polyhedron { x ∈ R n : Ax ≥ b } is empty if, and only if, • there exists d ∈ R m such that A T d = 0 and ⟨ b , d ⟩ > 0 First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 17/38

  69. Suppose that we have formalized the simplex method in Coq: We get Farkas Lemma for free: Theorem emptyP A b : end. | Optimal_basis I => false | Unbounded d => true match simplex [A^T -A^T 1:%M] 0 (-b) with Definition empty A b := reflect (exists d, A^T *m d = 0 /\ '[b,d] > 0) (empty A b). Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Emptiness as a Boolean predicate Farkas Lemma The polyhedron { x ∈ R n : Ax ≥ b } is empty if, and only if, • there exists d ∈ R m such that A T d = 0 and ⟨ b , d ⟩ > 0 • or, equivalently, the following LP is unbounded: A T u = 0 , u ≥ 0 , u ∈ R m ⟨ b , u ⟩ maximize subject to (1) First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 17/38

  70. We get Farkas Lemma for free: end. | Optimal_basis I => false | Unbounded d => true match simplex [A^T -A^T 1:%M] 0 (-b) with Definition empty A b := Theorem emptyP A b : reflect (exists d, A^T *m d = 0 /\ '[b,d] > 0) (empty A b). Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Emptiness as a Boolean predicate Farkas Lemma The polyhedron { x ∈ R n : Ax ≥ b } is empty if, and only if, • there exists d ∈ R m such that A T d = 0 and ⟨ b , d ⟩ > 0 • or, equivalently, the following LP is unbounded: A T u = 0 , u ≥ 0 , u ∈ R m ⟨ b , u ⟩ maximize subject to (1) Suppose that we have formalized the simplex method in Coq: First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 17/38

  71. | Optimal_basis I => false end. | Unbounded d => true match simplex [A^T -A^T 1:%M] 0 (-b) with Definition empty A b := Theorem emptyP A b : reflect (exists d, A^T *m d = 0 /\ '[b,d] > 0) (empty A b). Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Emptiness as a Boolean predicate Farkas Lemma The polyhedron { x ∈ R n : Ax ≥ b } is empty if, and only if, • there exists d ∈ R m such that A T d = 0 and ⟨ b , d ⟩ > 0 • or, equivalently, the following LP is unbounded: A T u = 0 , u ≥ 0 , u ∈ R m ⟨ b , u ⟩ maximize subject to (1) Suppose that we have formalized the simplex method in Coq: We get Farkas Lemma for free: First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 17/38

  72. n minimize 0 subject to Ax b x the point x is built from reduced_cost I , as a feasible point of A T u m the dual of maximize b u subject to 0 u 0 u Proof sketch Follows from the correctness of the simplex method: if phase2 returns Optimal_basis I , then reduced_cost I >=m 0 Theorem emptyPn A b : reflect (exists x, A *m x >=m b) (~~ empty A b). end. | Optimal_basis I => false | Unbounded d => true match phase2 [A^T -A^T 1:%M] ... with Definition empty A b := Qed. Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Emptiness as a Boolean predicate (2) It remains to prove: First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 18/38

  73. n minimize 0 subject to Ax b x the point x is built from reduced_cost I , as a feasible point of A T u m the dual of maximize b u subject to 0 u 0 u end. | Optimal_basis I => false | Unbounded d => true match phase2 [A^T -A^T 1:%M] ... with Definition empty A b := Qed. Theorem emptyPn A b : reflect (exists x, A *m x >=m b) (~~ empty A b). Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Emptiness as a Boolean predicate (2) It remains to prove: Proof sketch Follows from the correctness of the simplex method: if phase2 returns Optimal_basis I , then reduced_cost I >=m 0 First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 18/38

  74. n minimize 0 subject to Ax b x end. Qed. Theorem emptyPn A b : reflect (exists x, A *m x >=m b) (~~ empty A b). | Optimal_basis I => false | Unbounded d => true match phase2 [A^T -A^T 1:%M] ... with Definition empty A b := Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Emptiness as a Boolean predicate (2) It remains to prove: Proof sketch Follows from the correctness of the simplex method: if phase2 returns Optimal_basis I , then reduced_cost I >=m 0 = ⇒ the point x is built from reduced_cost I , as a feasible point of A T u = 0 , u ≥ 0 , u ∈ R m the dual of maximize ⟨ b , u ⟩ subject to First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 18/38

  75. Definition empty A b := Qed. match phase2 [A^T -A^T 1:%M] ... with | Unbounded d => true | Optimal_basis I => false end. Theorem emptyPn A b : reflect (exists x, A *m x >=m b) (~~ empty A b). Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography Emptiness as a Boolean predicate (2) It remains to prove: Proof sketch Follows from the correctness of the simplex method: if phase2 returns Optimal_basis I , then reduced_cost I >=m 0 = ⇒ the point x is built from reduced_cost I , as a feasible point of A T u = 0 , u ≥ 0 , u ∈ R m the dual of maximize ⟨ b , u ⟩ subject to Ax ≥ b , x ∈ R n ≡ minimize 0 subject to First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 18/38

  76. Theorem (Strong duality) If both LP are feasible, there exists optimal solutions x and u of the primal and dual LP such that: c x b u Proof sketch The simplex returns an optimal basis I : point_of_basis I provides an optimal point of the primal; reduced_cost I >=m 0 provides an optimal point of the dual. Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method is a constructive Swiss knife Primal LP Dual LP ⟨ c , x ⟩ ⟨ b , u ⟩ minimize maximize Ax ≥ b , x ∈ R n A T u = c , u ≥ 0 , u ∈ R m subject to subject to First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 19/38

  77. Proof sketch The simplex returns an optimal basis I : point_of_basis I provides an optimal point of the primal; reduced_cost I >=m 0 provides an optimal point of the dual. Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method is a constructive Swiss knife Primal LP Dual LP ⟨ c , x ⟩ ⟨ b , u ⟩ minimize maximize Ax ≥ b , x ∈ R n A T u = c , u ≥ 0 , u ∈ R m subject to subject to Theorem (Strong duality) If both LP are feasible, there exists optimal solutions x ∗ and u ∗ of the primal and dual LP such that: ⟨ c , x ∗ ⟩ = ⟨ b , u ∗ ⟩ First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 19/38

  78. Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method is a constructive Swiss knife Primal LP Dual LP ⟨ c , x ⟩ ⟨ b , u ⟩ minimize maximize Ax ≥ b , x ∈ R n A T u = c , u ≥ 0 , u ∈ R m subject to subject to Theorem (Strong duality) If both LP are feasible, there exists optimal solutions x ∗ and u ∗ of the primal and dual LP such that: ⟨ c , x ∗ ⟩ = ⟨ b , u ∗ ⟩ Proof sketch The simplex returns an optimal basis I : • point_of_basis I provides an optimal point of the primal; • reduced_cost I >=m 0 provides an optimal point of the dual. First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 19/38

  79. Definition n belongs to the convex hull of the set V v 1 v p A point x if p p p i v i x where 0 1 i i 1 i 1 p membership amounts to the non-emptiness of a polyhedron in (parametrized by x and V ) let bx := [x -x 1 -1 0] in ~~ (empty Ax bx) : bool. (is_in_convex_hull x). Lemma is_in_convex_hullP (x:'cV_n) : [/\ (lambda >=m 0), '[e, lambda] = 1 & x = V *m lambda]) (exists lambda, let Ax := [V -V e^T -e^T 1%:M] in reflect Definition is_in_convex_hull (x:'cV_n) := Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method is a constructive Swiss knife (2) Other properties can be defined as Boolean predicate thanks to the simplex method: boundedness, membership to the convex hull, … First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 20/38

  80. p membership amounts to the non-emptiness of a polyhedron in (parametrized by x and V ) let bx := [x -x 1 -1 0] in Definition is_in_convex_hull (x:'cV_n) := let Ax := [V -V e^T -e^T 1%:M] in ~~ (empty Ax bx) : bool. Lemma is_in_convex_hullP (x:'cV_n) : reflect (exists lambda, [/\ (lambda >=m 0), '[e, lambda] = 1 & x = V *m lambda]) (is_in_convex_hull x). Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method is a constructive Swiss knife (2) Other properties can be defined as Boolean predicate thanks to the simplex method: boundedness, membership to the convex hull , … Definition A point x ∈ R n belongs to the convex hull of the set V = { v 1 , . . . , v p } if p p ∃ λ ∈ R p , λ i v i x = ∑ where λ ≥ 0 , ∑ λ i = 1 . i = 1 i = 1 First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 20/38

  81. let Ax := [V -V e^T -e^T 1%:M] in Definition is_in_convex_hull (x:'cV_n) := ~~ (empty Ax bx) : bool. Lemma is_in_convex_hullP (x:'cV_n) : reflect (exists lambda, [/\ (lambda >=m 0), '[e, lambda] = 1 & x = V *m lambda]) (is_in_convex_hull x). Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method is a constructive Swiss knife (2) Other properties can be defined as Boolean predicate thanks to the simplex method: boundedness, membership to the convex hull , … Definition A point x ∈ R n belongs to the convex hull of the set V = { v 1 , . . . , v p } if p p ∃ λ ∈ R p , λ i v i x = ∑ where λ ≥ 0 , ∑ λ i = 1 . i = 1 i = 1 ⇒ membership amounts to the non-emptiness of a polyhedron in λ ∈ R p = (parametrized by x and V ) let bx := [x -x 1 -1 0] in First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 20/38

  82. let Ax := [V -V e^T -e^T 1%:M] in Definition is_in_convex_hull (x:'cV_n) := ~~ (empty Ax bx) : bool. Lemma is_in_convex_hullP (x:'cV_n) : reflect (exists lambda, [/\ (lambda >=m 0), '[e, lambda] = 1 & x = V *m lambda]) (is_in_convex_hull x). Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method is a constructive Swiss knife (2) Other properties can be defined as Boolean predicate thanks to the simplex method: boundedness, membership to the convex hull , … Definition A point x ∈ R n belongs to the convex hull of the set V = { v 1 , . . . , v p } if p p ∃ λ ∈ R p , λ i v i x = ∑ where λ ≥ 0 , ∑ λ i = 1 . i = 1 i = 1 ⇒ membership amounts to the non-emptiness of a polyhedron in λ ∈ R p = (parametrized by x and V ) let bx := [x -x 1 -1 0] in First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 20/38

  83. Proof sketch The normal vector c is built from the (Farkas) emptiness certificate d of the p . polyhedron over ~~ (is_in_convex_hull x). reflect (exists c, forall i, '[c, col i V] > '[c, x]) Theorem separation x : Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method is a constructive Swiss knife (3) x 2 Theorem (Separation result) v 4 The point x does not belong to the convex hull of V iff there exists c ∈ R n such that v 3 x ⟨ c , v i ⟩ > ⟨ c , x ⟩ , i = 1 , . . . , p v 5 x 1 v 2 v 1 First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 21/38

  84. reflect (exists c, forall i, '[c, col i V] > '[c, x]) ~~ (is_in_convex_hull x). Theorem separation x : Introduction The simplex method: base block of convex polyhedra Formalization of the simplex method Conclusion Bibliography The simplex method is a constructive Swiss knife (3) x 2 Theorem (Separation result) v 4 The point x does not belong to the convex hull of V iff there exists c ∈ R n such that v 3 x ⟨ c , v i ⟩ > ⟨ c , x ⟩ , i = 1 , . . . , p v 5 x 1 v 2 v 1 Proof sketch The normal vector c is built from the (Farkas) emptiness certificate d of the polyhedron over λ ∈ R p . First steps in the formalization of convex polyhedra in Coq | Xavier Allamigeon, Ricardo D. Katz | 21/38

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend