Spaces:
Running
Running
Download tests/test_formulas/test_reidemeister.py from SZLHOLDINGS/a11oy: direct link, hf CLI and curl.
- Browser
- Download file 655 Bytes
-
https://huggingface.co/spaces/SZLHOLDINGS/a11oy/resolve/b592fa1207f5f00b0a525efcfb4e1364924243c6/tests/test_formulas/test_reidemeister.py
- Command line
-
hf download hf://spaces/SZLHOLDINGS/a11oy@b592fa1207f5f00b0a525efcfb4e1364924243c6/tests/test_formulas/test_reidemeister.py
-
curl -L -o test_reidemeister.py https://huggingface.co/spaces/SZLHOLDINGS/a11oy/resolve/b592fa1207f5f00b0a525efcfb4e1364924243c6/tests/test_formulas/test_reidemeister.py
655 Bytes
| # SPDX-License-Identifier: Apache-2.0 | |
| """Tests for a11oy.formulas.reidemeister (knot moves). thesis_v22.pdf §2.""" | |
| from a11oy.formulas import reidemeister as r | |
| def test_r2_poke_cancels(): | |
| assert r.reduced_word([1, -1]) == () | |
| def test_r1_kink_cancels(): | |
| assert r.reduced_word([2, 2]) == () | |
| def test_nested_reduction(): | |
| assert r.reduced_word([3, 1, -1, -3]) == () | |
| def test_unknot_detection(): | |
| out = r.is_unknot([1, -1, 2, 2]) | |
| assert out["value"] is True | |
| def test_distinct_words_not_certified(): | |
| out = r.equivalent([1, 2, 3], [1, 2]) | |
| assert out["equivalent"] is False | |
| assert out["citation"] == "thesis_v22.pdf §2" | |