---
# System prepended metadata

title: Semplificazione regole GPRuler

---

# Semplificazione regole GPRuler

((A | B) & C) (D & E)

(A & C) (D & E)

(A & C) & (D & E)

((A | B) & C) & (D & E)

------

(A & C) | (B & C) ,  (D & E)
((A & C) | (B & C)) & D & E

((A & C & D) | (B & C & D)) & E
(C & D) | (B & C & D & E)

------
------
**Sympy**

https://www.sympy.org/en/index.html

______
**Ambiente virtuale**

Ambiente:
- `python -m venv nome_env`
- `source nome_env/bin/activate`
- `pip install -r path_to/requirements.txt`

sympy:
- `pip freeze`
- `from simpy.logic import simplify_logic`
- `simplify_logic('a | b', deep=False, force=False)`



[istallare boost](https://www.boost.org/doc/libs/1_60_0/libs/python/doc/html/building/installing_boost_python_on_your_.html)

 `python3 setup.py build`
 `python3 setup.py install` 
 
 #### Per user config

```bash
axel https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2
tar --bzip2 -xf boost_1_76_0.tar.bz2
cd boost_1_76_0/
mkdir ~/boost
conda activate ENVIRONMENTtoBuildFor
./bootstrap.sh --prefix=~/boost
./b2 install
```

 
 -----
 -----
 # Regole
 
### Regola 1

#### previsione
((((YLR397C or YLR419W) or (((YKR059W or YLL008W) or (YLL066C or YLL067C)) or (YLR274W or YLR398C))) and (((YKR059W or YLL008W) or (YLL066C or YLL067C)) or (YLR274W or YLR398C)) and (((YKR059W or YLL008W) or (YLL066C or YLL067C)) or (YLR397C or YLR398C)) and (((YKR059W or YLL008W) or (YLL066C or YLL067C)) or (YLR274W or YLR419W)) or (((YGR271W or YGR296W) or YHR031C) or ((YHR169W or YIL126W) or (YIL143C or YIL177C))) and (((YGR271W or YGR296W) or YHR164C) or ((YHR169W or YIL126W) or (YIL143C or YIL177C))) and (YJL033W or YJL034W) and (YJL138C or YJL225C) and ((YJR035W or YJR121W) or YKL017C) and ((YJR035W or YJR121W) or YKL073W)) or ((((YNL209W or YNL339C) or (YNR038W or YOR046C)) or YOR204W) and (((YNL209W or YNL339C) or (YNR038W or YOR046C)) or YOR291W) and (((YNL209W or YNL339C) or (YNR038W or YOR046C)) or YOR396W) and (((YNL209W or YNL339C) or (YNR038W or YOR046C)) or YPL029W) and ((YPL119C or YPL235W) or (YPL283C or YPR019W)) and YPR204W))

#### corretta
YGL008C or YGL084C or YGR112W or YJL094C or YKL217W or YMR243C or YPL132W or YPR125W or (YEL024W and YKL016C and YPL078C) or (Q0085 and Q0105 and Q0250 and Q0275 and YEL024W and YOR065W) or (Q0045 and Q0085 and Q0105 and YHR051W and YKL016C and YLR395C and YPL078C) or (Q0045 and Q0085 and Q0105 and YDL067C and YHR051W and YKL016C and YLR295C and YPL078C) or (Q0080 and Q0085 and Q0105 and Q0130 and YEL024W and YKL016C and YLR295C and YOR065W) or (Q0045 and Q0080 and Q0085 and Q0105 and Q0130 and YDR298C and YKL016C and YLR295C and YOR065W) or (Q0045 and Q0085 and Q0105 and YGL187C and YHR051W and YKL016C and YLR295C and YLR395C and YOR065W) or (Q0045 and Q0080 and Q0085 and Q0105 and YDL067C and YGL187C and YHR051W and YKL016C and YLR295C and YOR065W) or (Q0045 and Q0085 and YBL099W and YBR039W and YDL004W and YJR121W and YKL016C and YLR295C and YPL078C and YPL271W) or (Q0080 and Q0085 and Q0130 and YBL099W and YBR039W and YDL004W and YDR298C and YJR121W and YKL016C and YLR295C and YPL078C and YPL271W) or (Q0085 and Q0105 and Q0250 and Q0275 and YDL067C and YGL187C and YGL191W and YHR051W and YIL111W and YLR038C and YLR395C and YMR256C and YNL052W and YOR065W) or (Q0045 and Q0085 and Q0105 and Q0130 and Q0250 and Q0275 and YGL187C and YGL191W and YHR051W and YIL111W and YLR038C and YLR395C and YMR256C and YNL052W and YOR065W)

### Regola 2
((YEL027W and YOR270C and Q0085 and Q0080 and YDL067C and Q0045 and YOR065W) or (Q0130 and YOR270C and Q0045 and YPL271W and YBL099W and YEL027W and YDR298C and Q0085 and Q0080 and YJR121W) or (Q0130 and YOR270C and YEL027W and YLR447C and Q0085 and Q0080 and YCL005W-A) or (Q0130 and YOR270C and YEL027W and Q0085 and Q0080 and YEL024W and YOR065W) or (YOR270C and YBR127C and YGR020C and YDL185W and YCL005W-A and YHR026W and YPL234C and YEL027W and YLR447C and Q0085 and YEL051W) or (YIL111W and YGL191W and YOR270C and YDL067C and YMR256C and YPL234C and YEL027W and Q0275 and Q0085 and YLR395C and YOR065W and YNL052W) or (YMR054W and Q0250 and Q0130 and YEL027W and Q0275 and YEL024W and YOR065W) or (YMR054W and YIL111W and Q0130 and YGL191W and YMR256C and Q0045 and YEL027W and Q0275 and YLR395C and YOR065W and YNL052W) or (YGL191W and YOR270C and Q0045 and YMR256C and Q0250 and YEL027W and Q0275 and Q0085 and YLR395C and YOR065W and YNL052W) or (YMR054W and YIL111W and YGL191W and YDL067C and YMR256C and Q0250 and YEL027W and Q0275 and YLR395C and YOR065W and YNL052W) or (YMR054W and YEL027W and YEL024W and YOR065W and YPL234C) or (YMR054W and YEL027W and Q0080 and YDL067C and YOR065W) or (YMR054W and YBR127C and YGR020C and YDL185W and YCL005W-A and YHR026W and YPL234C and YEL027W and YLR447C and YEL051W) or (YDR298C and YEL027W and YOR270C and YOR065W) or (YER072W and YOR270C) or (YIL111W and Q0045 and YOR065W and YPL234C)) or YBR187W or YKR093W or YGR289C or YDR456W or YHL047C or YGR112W or YDR276C or YML116W or YEL065W or YJL129C or YNL321W or YPL132W or YLL028W or YDL054C or YOL158C or YGL186C or YPR201W or YLR138W or YBR008C or YMR243C or YGL008C or YCR028C or YHL040C or YHR048W or YGL084C or YKL217W or YJL094C or YPR125W or YBL042C or YDL128W or YDR497C




(A & B) | C <-- (A | C) & (B | C)
A | (A & B)  <--> A 
A & (A | B) <--> A
A & A <--> A
A | A <--> A



(A & B)  | C  | D

(A & B) (C | D)

(A & B) | C

(A & B) | (C | D)