anita


Nameanita JSON
Version 0.1.11 PyPI version JSON
download
home_pagehttps://github.com/daviromero/anita
SummaryANITA is a proof assistant for teaching analytic tableaux to computer science students. ANITA allows students to write their proofs and automatically checks whether the proofs are correct and, if not, displays any errors found.
upload_time2023-07-30 13:52:16
maintainer
docs_urlNone
authorDavi Romero de Vasconcelos
requires_python
licenseMIT
keywords analytic tableaux teaching logic educational software
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Analytic Tableau Proof Assistant (ANITA)

The ANITA is a tool written in Python that can be used as a desktop application, or in a [web platform](https://sistemas.quixada.ufc.br/anita/en/). There is a [Jupyter Notebook](https://colab.research.google.com/github/daviromero/logic4py/blob/main/src/book/Cap%C3%ADtulo%2013%20-%20Tableau%20Anal%C3%ADtico%20da%20L%C3%B3gica%20de%20Primeira-Ordem.ipynb) (in Portuguese) that presents the Analytic Tableaux and ANITA concepts. The main idea is that the students can write their proofs as similar as possible to what is available in the textbooks and to what the students would usually write on paper. ANITA allows the students to automatically check whether a proof in the analytic tableaux is valid. If the proof is not correct, ANITA will display the errors of the proof. So, the students may make mistakes and learn from the errors. The web interface is very easy-to-use and has: 
- An area for editing the proof in plain text. The students should write a proof in Fitch-style (see [AT Rules](https://github.com/daviromero/anita/blob/main/AT-Rules.pdf)).
- A message area to display whether the proof is valid, the countermodel, or the errors on the proof.
- And the following links: 
  - Check, to check the correctness of the proof; 
  - Manual, to view a document with the inference rules and examples; 
  - LaTeX, to generate the LaTeX code of the trees from a valid proof. Use the `qtree` package in your LaTeX code; 
  - LaTeX in Overleaf, to open the proof source code directly in [Overleaf](http://overleaf.com/) that is a collaborative platform for editing LaTeX

To facilitate the writing of the proofs, we made the following conventions in ANITA:
- The Atoms are written in capital letters (e.g. `A, B,  H(x)`);
- Variables are written with the first letter in lowercase, followed by letters and numbers (e.g. `x, x0, xP0`);
- Formulas with $\forall x$ and $\exists x$ are represented by $Ax$ and $Ex$ ('A' and 'E' followed by the variable x). For instance, `Ax(H(x)->M(x))` represents $\forall x~(H(x)\rightarrow M(x))$.
- Table below shows the equivalence of logic symbols and those used in ANITA.
- The order of precedence of quantifiers and logical connectives is defined by $\lnot,\forall,\exists,\wedge,\vee,\rightarrow$ with right alignment. For example:
  - Formula `~A&B -> C` represents formula $(((\lnot A)\land B)\rightarrow C)$;
  - The theorem `~A|B |- A->C` represents $((\lnot A)\vee B)\vdash (A\rightarrow B)$.
- Each inference rule will be named by its respective connective and the truth value of the signed formula. For example, `&T` represents the conjunction rule when the formula is true. Optionally, the rule name can be omitted.
- The justifications for the premises and the conclusion use the reserved words `pre` and `conclusion`, respectively.

| Symbol |  $\lnot$ | $\land$ | $\lor$ | $\rightarrow$ | $\forall x$ | $\exists x$ | $\bot$ | branch | $\vdash$ |
| :---:  |  :---:  | :---: | :---:  | :---:  | :---:  | :---:  | :---:  | :---:  | :---: |
| LaTeX  |  $\backslash\textrm{lnot}$ | $\backslash\textrm{land}$ | $\backslash\textrm{lor}$ | $\backslash\textrm{rightarrow}$ | $\backslash\textrm{forall x}$ | $\backslash\textrm{exists x}$ | $\backslash\textrm{bot}$ | $[.~]$ | $\backslash\textrm{vdash}$ |
| ANITA |  ~  | \& | $\mid$ | -> | Ax | Ex | @  | { } | \|- |

![](https://raw.githubusercontent.com/daviromero/anita/main/ANITA-EXAMPLE.png)

## License
ANITA is available by [**MIT License**](https://github.com/daviromero/anita/blob/main/license.txt).

## Requirements:
- You must install [rply 0.7.8 package](https://pypi.org/project/rply/)
- ipywidgets

## Install

To install ANITA from Github, run the following command:
```bash
pip install git+https://github.com/daviromero/anita.git
```

To install ANITA from PyPi repository, run the following command:
```bash
pip install anita
```

## ANITA
You can run ANITA with the command line: 
```bash
python -m anita -l "en" -i [input_file] 
```
## ANITA in Jupyter Nootebook
You can run ANITA in Jupyter Nootebook: 
```bash
from anita.anita_en_gui import anita
anita()

```
## ANITA in Voila
You can run ANITA in a [Voilà](https://voila.readthedocs.io/) 
```bash
voila anita_en.ipynb
```
## ANITA in your code
You can import ANITA in your code (basic usage)
```bash
from anita.anita_en_fo import check_proof

print(check_proof('''1. T A|B		pre
2. T A->C		pre
3. T B->C		pre
4. F C			conclusion
5. {	T A		1
6.	{	F A	    2
7.		@	    5,6
	}
8.	{	T C	    2
9.		@	    8,4
	}
   }
10.{	T B		1
11.	{	F B	    3
12.		@	    10,11
	}
13.	{	T C 	3
14.		@	    13,4
	}
   }
'''))
```

## A Portuguese Version
We have a portuguese version. In the portuguese ANITA syntax, use `conclusao` instead of `conclusion`.

- Run ANITA with
```bash
python -m anita -i [input_file] 
```
- Jupyter Nootebook with
```bash
from anita.anita_pt_gui import anita
anita()
```
- Voilà with
```bash
voila anita_pt.ipynb
```
- You can import ANITA in your code (basic usage)
```bash
from anita.anita_pt_fo import check_proof

print(check_proof('''1. T A|B		pre
2. T A->C		pre
3. T B->C		pre
4. F C			conclusao
5. {	T A		1
6.	{	F A	    2
7.		@	    5,6
	}
8.	{	T C	    2
9.		@	    8,4
	}
   }
10.{	T B		1
11.	{	F B	    3
12.		@	    10,11
	}
13.	{	T C 	3
14.		@	    13,4
	}
   }
'''))
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/daviromero/anita",
    "name": "anita",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Analytic Tableaux,Teaching Logic,Educational Software",
    "author": "Davi Romero de Vasconcelos",
    "author_email": "daviromero@ufc.br",
    "download_url": "https://files.pythonhosted.org/packages/39/8c/d9faab1dcbe4babf538f230271979a18ece815465e121afc502b44300971/anita-0.1.11.tar.gz",
    "platform": null,
    "description": "# Analytic Tableau Proof Assistant (ANITA)\r\n\r\nThe ANITA is a tool written in Python that can be used as a desktop application, or in a [web platform](https://sistemas.quixada.ufc.br/anita/en/). There is a [Jupyter Notebook](https://colab.research.google.com/github/daviromero/logic4py/blob/main/src/book/Cap%C3%ADtulo%2013%20-%20Tableau%20Anal%C3%ADtico%20da%20L%C3%B3gica%20de%20Primeira-Ordem.ipynb) (in Portuguese) that presents the Analytic Tableaux and ANITA concepts. The main idea is that the students can write their proofs as similar as possible to what is available in the textbooks and to what the students would usually write on paper. ANITA allows the students to automatically check whether a proof in the analytic tableaux is valid. If the proof is not correct, ANITA will display the errors of the proof. So, the students may make mistakes and learn from the errors. The web interface is very easy-to-use and has: \r\n- An area for editing the proof in plain text. The students should write a proof in Fitch-style (see [AT Rules](https://github.com/daviromero/anita/blob/main/AT-Rules.pdf)).\r\n- A message area to display whether the proof is valid, the countermodel, or the errors on the proof.\r\n- And the following links: \r\n  - Check, to check the correctness of the proof; \r\n  - Manual, to view a document with the inference rules and examples; \r\n  - LaTeX, to generate the LaTeX code of the trees from a valid proof. Use the `qtree` package in your LaTeX code; \r\n  - LaTeX in Overleaf, to open the proof source code directly in [Overleaf](http://overleaf.com/) that is a collaborative platform for editing LaTeX\r\n\r\nTo facilitate the writing of the proofs, we made the following conventions in ANITA:\r\n- The Atoms are written in capital letters (e.g. `A, B,  H(x)`);\r\n- Variables are written with the first letter in lowercase, followed by letters and numbers (e.g. `x, x0, xP0`);\r\n- Formulas with $\\forall x$ and $\\exists x$ are represented by $Ax$ and $Ex$ ('A' and 'E' followed by the variable x). For instance, `Ax(H(x)->M(x))` represents $\\forall x~(H(x)\\rightarrow M(x))$.\r\n- Table below shows the equivalence of logic symbols and those used in ANITA.\r\n- The order of precedence of quantifiers and logical connectives is defined by $\\lnot,\\forall,\\exists,\\wedge,\\vee,\\rightarrow$ with right alignment. For example:\r\n  - Formula `~A&B -> C` represents formula $(((\\lnot A)\\land B)\\rightarrow C)$;\r\n  - The theorem `~A|B |- A->C` represents $((\\lnot A)\\vee B)\\vdash (A\\rightarrow B)$.\r\n- Each inference rule will be named by its respective connective and the truth value of the signed formula. For example, `&T` represents the conjunction rule when the formula is true. Optionally, the rule name can be omitted.\r\n- The justifications for the premises and the conclusion use the reserved words `pre` and `conclusion`, respectively.\r\n\r\n| Symbol |  $\\lnot$ | $\\land$ | $\\lor$ | $\\rightarrow$ | $\\forall x$ | $\\exists x$ | $\\bot$ | branch | $\\vdash$ |\r\n| :---:  |  :---:  | :---: | :---:  | :---:  | :---:  | :---:  | :---:  | :---:  | :---: |\r\n| LaTeX  |  $\\backslash\\textrm{lnot}$ | $\\backslash\\textrm{land}$ | $\\backslash\\textrm{lor}$ | $\\backslash\\textrm{rightarrow}$ | $\\backslash\\textrm{forall x}$ | $\\backslash\\textrm{exists x}$ | $\\backslash\\textrm{bot}$ | $[.~]$ | $\\backslash\\textrm{vdash}$ |\r\n| ANITA |  ~  | \\& | $\\mid$ | -> | Ax | Ex | @  | { } | \\|- |\r\n\r\n![](https://raw.githubusercontent.com/daviromero/anita/main/ANITA-EXAMPLE.png)\r\n\r\n## License\r\nANITA is available by [**MIT License**](https://github.com/daviromero/anita/blob/main/license.txt).\r\n\r\n## Requirements:\r\n- You must install [rply 0.7.8 package](https://pypi.org/project/rply/)\r\n- ipywidgets\r\n\r\n## Install\r\n\r\nTo install ANITA from Github, run the following command:\r\n```bash\r\npip install git+https://github.com/daviromero/anita.git\r\n```\r\n\r\nTo install ANITA from PyPi repository, run the following command:\r\n```bash\r\npip install anita\r\n```\r\n\r\n## ANITA\r\nYou can run ANITA with the command line: \r\n```bash\r\npython -m anita -l \"en\" -i [input_file] \r\n```\r\n## ANITA in Jupyter Nootebook\r\nYou can run ANITA in Jupyter Nootebook: \r\n```bash\r\nfrom anita.anita_en_gui import anita\r\nanita()\r\n\r\n```\r\n## ANITA in Voila\r\nYou can run ANITA in a [Voil\u00c3\u00a0](https://voila.readthedocs.io/) \r\n```bash\r\nvoila anita_en.ipynb\r\n```\r\n## ANITA in your code\r\nYou can import ANITA in your code (basic usage)\r\n```bash\r\nfrom anita.anita_en_fo import check_proof\r\n\r\nprint(check_proof('''1. T A|B\t\tpre\r\n2. T A->C\t\tpre\r\n3. T B->C\t\tpre\r\n4. F C\t\t\tconclusion\r\n5. {\tT A\t\t1\r\n6.\t{\tF A\t    2\r\n7.\t\t@\t    5,6\r\n\t}\r\n8.\t{\tT C\t    2\r\n9.\t\t@\t    8,4\r\n\t}\r\n   }\r\n10.{\tT B\t\t1\r\n11.\t{\tF B\t    3\r\n12.\t\t@\t    10,11\r\n\t}\r\n13.\t{\tT C \t3\r\n14.\t\t@\t    13,4\r\n\t}\r\n   }\r\n'''))\r\n```\r\n\r\n## A Portuguese Version\r\nWe have a portuguese version. In the portuguese ANITA syntax, use `conclusao` instead of `conclusion`.\r\n\r\n- Run ANITA with\r\n```bash\r\npython -m anita -i [input_file] \r\n```\r\n- Jupyter Nootebook with\r\n```bash\r\nfrom anita.anita_pt_gui import anita\r\nanita()\r\n```\r\n- Voil\u00c3\u00a0 with\r\n```bash\r\nvoila anita_pt.ipynb\r\n```\r\n- You can import ANITA in your code (basic usage)\r\n```bash\r\nfrom anita.anita_pt_fo import check_proof\r\n\r\nprint(check_proof('''1. T A|B\t\tpre\r\n2. T A->C\t\tpre\r\n3. T B->C\t\tpre\r\n4. F C\t\t\tconclusao\r\n5. {\tT A\t\t1\r\n6.\t{\tF A\t    2\r\n7.\t\t@\t    5,6\r\n\t}\r\n8.\t{\tT C\t    2\r\n9.\t\t@\t    8,4\r\n\t}\r\n   }\r\n10.{\tT B\t\t1\r\n11.\t{\tF B\t    3\r\n12.\t\t@\t    10,11\r\n\t}\r\n13.\t{\tT C \t3\r\n14.\t\t@\t    13,4\r\n\t}\r\n   }\r\n'''))\r\n```\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "ANITA is a proof assistant for teaching analytic tableaux to computer science students. ANITA allows students to write their proofs and automatically checks whether the proofs are correct and, if not, displays any errors found.",
    "version": "0.1.11",
    "project_urls": {
        "Homepage": "https://github.com/daviromero/anita"
    },
    "split_keywords": [
        "analytic tableaux",
        "teaching logic",
        "educational software"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "398cd9faab1dcbe4babf538f230271979a18ece815465e121afc502b44300971",
                "md5": "197589ca5e71ec03fd9f212cf5107e56",
                "sha256": "f5e590f4dec211bac1e7a7e9b409362f9a91c16e4426ade91287fedaa922150d"
            },
            "downloads": -1,
            "filename": "anita-0.1.11.tar.gz",
            "has_sig": false,
            "md5_digest": "197589ca5e71ec03fd9f212cf5107e56",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 45835,
            "upload_time": "2023-07-30T13:52:16",
            "upload_time_iso_8601": "2023-07-30T13:52:16.915312Z",
            "url": "https://files.pythonhosted.org/packages/39/8c/d9faab1dcbe4babf538f230271979a18ece815465e121afc502b44300971/anita-0.1.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-30 13:52:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "daviromero",
    "github_project": "anita",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "anita"
}
        
Elapsed time: 0.09154s