GiNaCRA:A C++ Library for Real Algebraic Computations Work-In-Progress Presentation NFM 2011 Contribution
Ulrich Loup Erika Abrah´am´
AlgoSyn
February 2011 AlgoSyn GiNaCRA:A C++ Library for Real Algebraic Computations
Naming
GiNaC C++ library for symbolic computations
GiNaCRA – GiNaC Real Algebra package http://ginacra.sourceforge.net/
RealAlgebra E.g. ∃x, y ( x42y − 2y 4 < 1 ∨ y − x ≥ 0 ) ∧ x2 − y > 0
Ulrich Loup 2/ 17 AlgoSyn GiNaCRA:A C++ Library for Real Algebraic Computations
Outline
Introduction
Features and Functioning
Outlook
Ulrich Loup 3/ 17 The quadratic case (Virtual substitution solver) √ 2 −b± b2−4ac ax + bx − c = 0 ⇐⇒ x ∈ { 2a }, a, b, c ∈ Z. I Real solutions: rationals with square roots
Arbitrary degree polynomials (I-RiSC) Pk i i=0 ci x = 0, k ∈ N, ci ∈ Z, 0 ≤ i ≤ k, ck 6= 0. I Real solutions: real algebraic numbers
AlgoSyn GiNaCRA:A C++ Library for Real Algebraic Computations
Number representations in exact solving over the reals Linear real arithmetic (Yices/Z3, OpenSMT,...) a ax − b = 0 ⇐⇒ x = b , a, b ∈ Z.
I Real solutions: rational numbers
Introduction Ulrich Loup 4/ 17 Arbitrary degree polynomials (I-RiSC) Pk i i=0 ci x = 0, k ∈ N, ci ∈ Z, 0 ≤ i ≤ k, ck 6= 0. I Real solutions: real algebraic numbers
AlgoSyn GiNaCRA:A C++ Library for Real Algebraic Computations
Number representations in exact solving over the reals Linear real arithmetic (Yices/Z3, OpenSMT,...) a ax − b = 0 ⇐⇒ x = b , a, b ∈ Z.
I Real solutions: rational numbers
The quadratic case (Virtual substitution solver) √ 2 −b± b2−4ac ax + bx − c = 0 ⇐⇒ x ∈ { 2a }, a, b, c ∈ Z. I Real solutions: rationals with square roots
Introduction Ulrich Loup 4/ 17 AlgoSyn GiNaCRA:A C++ Library for Real Algebraic Computations
Number representations in exact solving over the reals Linear real arithmetic (Yices/Z3, OpenSMT,...) a ax − b = 0 ⇐⇒ x = b , a, b ∈ Z.
I Real solutions: rational numbers
The quadratic case (Virtual substitution solver) √ 2 −b± b2−4ac ax + bx − c = 0 ⇐⇒ x ∈ { 2a }, a, b, c ∈ Z. I Real solutions: rationals with square roots
Arbitrary degree polynomials (I-RiSC) Pk i i=0 ci x = 0, k ∈ N, ci ∈ Z, 0 ≤ i ≤ k, ck 6= 0. I Real solutions: real algebraic numbers
Introduction Ulrich Loup 4/ 17 AlgoSyn GiNaCRA:A C++ Library for Real Algebraic Computations
Where is exact solving for real algebra desired?
Verification of, e.g., I probabilistic programs ( Friedrich Gretz’s topic) or I hybrid systems. ;
Synthesis of, e.g., I parameters for hybrid systems.
Nonlinear optimization in, e.g., I designing a railway infrastructure ( Jacob Sp¨onemann’stopic). ... ;
Introduction Ulrich Loup 5/ 17 AlgoSyn GiNaCRA:A C++ Library for Real Algebraic Computations
State of the art
C++ libraries implementing real root computations Libreduce (based on Reduce), CoCoALib (based on CoCoA), Givaro, SYNAPS
Software implementing algebraic number arithmetic Singular, KANT, PARI/GP
Software implementing polynomial arithmetic GiNaC, Maple, MATLAB, Mathematica,...
Introduction Ulrich Loup 6/ 17 Features and Functioning AlgoSyn GiNaCRA:A C++ Library for Real Algebraic Computations
Representing a real algebraic number Interval representation