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
- Cabal sandbox is using a global dependency. Could not resolve
- Haskell lens: let binding of Traversal'
- How can I parse fixed-length, non-delimited integers with attoparsec?
- Pipeline-like operation using TChan
- compile-time vs. run-time cost of Hamlet templates
- Date-time package in haskell - error in the current one, can't find an analog
- How does one debug infinite recursion in Haskell?
- Force GHC using local files
- List with random numbers in Haskell
- Changes in other elements based on listbox selections in threepenny-gui
- Multithreading and gtk2hs
- Operator section for applicative with <$> and <*>
- Unable to create a custom header to use it in "withManager"
- How do I reuse an intermediate value in chain of Haskell Either binds?
- Haskell, Tree problems
Related Questions in SYMBOLIC-MATH
- Multiply two variables in Matlab with vpa - high precision
- Use derivative of function directly as an anonymous function
- Symbolic Representation of Minimum
- Machine learning in Clojure
- Multifold integration with Matlab
- Sympy substitutions using strings subs('x', 'w') instead of symbols subs(x, w)
- inverse Laplace with Matlab
- Julia changing name in loop, using symbolic variables
- Use of (ilaplace) give different result through sym variable and directly
- MATLAB command simplify: use multiple or just one
- maxima CAS - how to substitute variable for an expression?
- How to show the result of a symbolic computation as a number?
- Set complicated assumptions on symbolic function
- SymPy and square roots of complex numbers
- Solving equations with maxima
Related Questions in PROOF
- Proving a recursive algorithm
- Agda: Simulate Coq's rewrite tactic
- Handling let in hypothesis
- unique minimum spanning tree sufficient and necessary conditions
- All pairs out of four
- Hamming distance of two integers mysql
- Dafny - Substring implementation
- How would you write ∀ y ∈ R+, ∃ z ∈ R, e^z = y in pseudocode?
- batch processing proof of the number of jobs' relationship with service time and waiting time
- Prove So (0 < m) -> (n ** m = S n)
- Proving lemma in Isabelle
- How to show that something increases relational expressive power?
- Open Type Level Proofs in Haskell/Idris
- How to prove that Greedy approaches will not work
- How to prove that "Total" is not recursive (decidable)
Related Questions in SBV
- Module works with Cabal but not with Stack
- Using SBV to show satisfiability of predicates containing byte strings in Haskell
- Encoding extended naturals in SBV
- find a string match as many regular expressions as possible in a regular expression set
- Using Z3 with parallelization from SBV
- Symbolic `show` for `SInt16`
- Are linear problems on rational numbers decidable in Z3?
- Optimisation with list solution: compiler error
- Exception from Z3 running minimize example for Data.SBV
- Turning Haskell Int values into Constants for SBV constraints
- How to avoid the IO monad when solving arithmetic problems in SBV
- What pattern is suitable for expressing Null value in a SBV formula
- Trivial Rationals problems without variables in SBV Solver in Haskell
- Implementing the x86 PDEP/PEXT instructions efficiently in SMTlib
- Conditions on list comprehension using Haskell and SBV
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 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.