The only solution I can find is to do a square root approximation, but this doesn't work symbolically so I can't use it for proving.
How do I get symbolic square root and logarithm functions in SBV?
280 Views Asked by Reed Oei At
1
There are 1 best solutions below
Related Questions in HASKELL
- Typeclass projections as inheritance
- How to generate all possible matrices given a number n in Haskell
- Is there a way to get `cabal` to detect changes to non-Haskell source files?
- How to have fixed options using Option.Applicative in haskell?
- How can I create a thread in Haskell that will restart if it gets killed due to any reason?
- Automatic Jacobian matrix in Haskell
- Haskell writing to named pipe unexpectedly fails with `openFile: does not exist (No such device or address)`
- Why does Enum require to implement toEnum and fromEnum, if that's not enough for types larger than Int?
- Non-exhaustive patterns in function compress
- How to get terms names of GADT in Template Haskell?
- Implementing eval() function with Happy parser generator
- How to count the occurences of every element in a list in Haskell fast?
- In Haskell, what does `Con Int` mean?
- Extract a Maybe from a heterogeneous collection
- Haskell, Stack, importing module shows error "Module not found"
Related Questions in SYMBOLIC-MATH
- Convert Cell Array of Symbolic Functions to Double Array of Symbolic Functions MATLAB
- Best way of finding KKT points for a Sympy polynomial
- Create Symbolic Function from Double Vector MATLAB
- how do we represent the expression x+y'+z' in into one which can be represented using only NANDs (i.e. negations of products)
- Inversion of trunk dielectric constant from dihedral scattering mechanism ratio (alpha) using Symbolic math toolbox
- Calculate commutator with abstract sum using Cadabra
- sympy diff without resubstituting?
- How to create multi-dimensional and slice variable in sympy
- Sympy: Integral(0, (R, b, r)) not simplifying to zero when stemming from the Leibniz rule
- Matlab bug with root and conj
- Sympy simplify equation more
- Defining operators associated with a given HilbertSpace object in sympy
- Symbolic manipulation of equation with substitutions given relations between variables in Sympy
- Difficult with symbolic integration in Sympy
- Expressing a symbolic variable in terms of other specific variables
Related Questions in PROOF
- How to extract a variable from an exist clause
- Cryptography Notion - Diffie-Hellmann
- Proof by reductio ad absurdum in Isabelle
- I have a problem in Isabelle related to 'Clash of types' that I am unable to solve. Could someone help me?
- Does sequencing an infinite list of IO actions by definition result in a never-ending action? Or is there a way to bail out?
- How to improve a LH=RH chain proof
- How to prove that nat_to_bin combines bin_to_nat b = normalize b in Coq
- Is this the best loop variant for the following code which takes in a sorted array of integers and determines if theres are ints x,y that equal k
- Sledgehammer output with vampire
- Agda Recursion on Proof
- What is the simplest AVL tree structure to demonstrate a complete right rotation?
- Agda Unresolved Metas
- lean4 prove that the set of prime numbers has at least two distinct elements
- Josephus Problem - Is there a position with 0 chance of surviving, regardless of any skip interval?
- Does this DFA satisfy the complement of the given language?
Related Questions in SBV
- Unknown when working sequence of type StringSort
- Writing to a symbolic number of spots in a symbolic array
- PyExZ3 does not find all feasible paths of a program
- Implementing the x86 PDEP/PEXT instructions efficiently in SMTlib
- No output from Z3/SMT solver for weight balancing problem with nested quantifiers
- I'm considering learning Clingo but would like to see if it could solve this logic problem of my own devising
- Using SBV to show satisfiability of predicates containing byte strings in Haskell
- Are linear problems on rational numbers decidable in Z3?
- Proving a simple list function applied four times is the identity
- What pattern is suitable for expressing Null value in a SBV formula
- How to avoid the IO monad when solving arithmetic problems in SBV
- Trivial Rationals problems without variables in SBV Solver in Haskell
- Conditions on list comprehension using Haskell and SBV
- Parallel solving in SBV with Z3
- Get a random satisfiable solution (or multiple solutions) when running runSMT
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
SBV already supports square-root for the floating-point types:
Single precision:
Double precision:
Note that you need to provide a rounding-mode, in the above I used
sRNEwhich stands forround-nearest-towards-evenwhich is the default rounding-mode used in Haskell. SBV supports all 5 IEEE rounding modes, if needed.You can also use reals (arbitrary-precision algebraic real numbers):
In this case, you get an algebraic equation, and an approximation of the real-result. (Note in the above that
x*x == 4.2is the same as5*x^2 = 21). Both forms are available from the programmatic API.There's no single function for integer-square-roots; nor for logarithms. These latter ones can be expressed using quantifiers, but SMT solvers are unlikely to produce good results for them since they will involve both non-linear arithmetic and quantification.
Note in general that neither SBV nor SMT solvers are good for "simplifying" symbolic expressions. You will always get a concrete answer for your query: If you ask for
sqrt 50, you will get7.07106(in the correct type/precision), instead of things like5 * sqrt 2, for instance.