"Conda is an open-source package management system and environment management system that runs on Windows, macOS, and Linux. Conda quickly installs, runs, and updates packages and their dependencies. Conda easily creates, saves, loads, and switches between environments on your local computer. It was created for Python programs but it can package and distribute software for any language."
This means: You can install and temporarily use one or several alternative Python installations and their packages without interfering with your existing system in any way. Everything is kept together in one directory (which can be easily deleted when not wanted anymore).
Get the latest Miniconda installer for your OS.
Follow the installation instructions for your OS here.
Caveat: By default, the Conda installers modify your shell profiles on Unix systems (I do not know about Windows).
With the bash installer, this can be avoided by not adimitting "conda init" when asked
interactively. Note that "conda init
" can be called explicitly anytime.
With the graphical installer, there is a "Customize" button at the bottom of the "Installation Type"
page, which allows to remove a corresponding checkmark.
Here is the code that got inserted into .bash_profile
for me (on Mac
OS):
# >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$('/Users/sturm/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__conda_setup" else if [ -f "/Users/sturm/miniconda3/etc/profile.d/conda.sh" ]; then . "/Users/sturm/miniconda3/etc/profile.d/conda.sh" else export PATH="/Users/sturm/miniconda3/bin:$PATH" fi fi unset __conda_setup # <<< conda initialize <<<
When the installation has finished, update conda:
conda update -n base -c defaults conda
conda create --name qeActivate your environment:
conda activate qe
The active environment can be checked as follows:
conda env list
The activation of the environment applies to the current shell. If you work only with qe, you
might want to add "conda activate qe
" to your profiles.
Surprisingly little is needed; make sure that your active environment is "qe":
conda install pip mypy pytest sympy jupyter
Download logic1-0.1.1-py3-none-any.whl
and
make sure that your active environment is "qe":
pip install logic1-0.1.1-py3-none-any.whl
This will also install Pyeda as a dependency.
Lorenz had found a bug in Logic1 0.1 originally posted here as
logic1-0.1-py3-none-any.whl
. The truth value F
printed as T
.
To upgrade to the fixed version 0.1.1 above use:
pip install --force-reinstall logic1-0.1.1-py3-none-any.whl
Write a recursive simplifier for the ordered field of real numbers over the language of rings:
T
, F
:Eq(f, 0) & T
becomesEq(f, 0)
,Eq(f, 0) & F
becomesF
, etc.
Ex(x, Eq(y, 0))
becomesEq(y, 0)
, etc.
~ (Eq(a, 0) & Lt(b, 0)
becomesNe(a, 0) | Ge(b, 0)
, etc.
Le(4, 5)
becomesT
, etc.
Eq(f, g)
becomesEq(f - g, 0)
, etc.
Lt(-8 * x + 6, 0)
becomesGt(4 * x + 3, 0)
, etc.
Lt(f, 0) | Eq(f, 0)
becomesLe(f, 0)
,Lt(f, 0) & Eq(f, 0)
becomesF
, etc.
SymPy should provide sorting of polynomials, also consider relations.
Use doctests, check code coverage, develop test data (share with others).
There is not much simplification exepected in the following benchmarks. However, the CPU time should stay below 100 ms for each of the two examples. In the last exercise session we had observed unexpected timings in the range of seconds. It might be SymPy. We still have to understand this. Please check your implementations and report back.
Notice the magic command %timeit
in the jupyter notebook files.
Download your preferred archive format. It will unpack as a directory named "qe":
Here is the notebook from the exercise session on 2023-04-26:
Implement QE for the class Sets.
The following is the notebook that we had discussed originally:
The following notebook (added 2023-05-31) covers the computations in Section 5.2 of the lecture notes:Implement QE for Divisible ordered Abelian groups (Fourier–Motzkin Elimination)
From the lecture notes: