{"id":16313528,"url":"https://github.com/thery/minirubik","last_synced_at":"2025-10-25T16:31:48.137Z","repository":{"id":81086547,"uuid":"175809038","full_name":"thery/minirubik","owner":"thery","description":"Solving the mini Rubik (2x2) in Coq","archived":false,"fork":false,"pushed_at":"2024-12-18T13:22:56.000Z","size":169,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-31T09:05:18.968Z","etag":null,"topics":["2x2x2","coq","formalization","rubik-cube","theorem-proving"],"latest_commit_sha":null,"homepage":null,"language":"Coq","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thery.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-03-15T11:37:57.000Z","updated_at":"2024-12-18T13:23:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"65ea522d-fa8b-425e-83a4-eceb4e84b69e","html_url":"https://github.com/thery/minirubik","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thery%2Fminirubik","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thery%2Fminirubik/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thery%2Fminirubik/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thery%2Fminirubik/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thery","download_url":"https://codeload.github.com/thery/minirubik/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238183444,"owners_count":19430119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2x2x2","coq","formalization","rubik-cube","theorem-proving"],"created_at":"2024-10-10T21:51:28.689Z","updated_at":"2025-10-25T16:31:48.132Z","avatar_url":"https://github.com/thery.png","language":"Coq","funding_links":[],"categories":["Projects"],"sub_categories":["Puzzles and Games"],"readme":"\u003c!---\nThis file was generated from `meta.yml`, please do not edit manually.\nFollow the instructions on https://github.com/coq-community/templates to regenerate.\n---\u003e\n# minirubik\n\n[![Docker CI][docker-action-shield]][docker-action-link]\n\n[docker-action-shield]: https://github.com/thery/minirubik/actions/workflows/docker-action.yml/badge.svg?branch=master\n[docker-action-link]: https://github.com/thery/minirubik/actions/workflows/docker-action.yml\n\n\n\n\nThis is a certified solver for the Rubik 2x2\n\nThe formalisation is explained in the file [paper.pdf](https://github.com/thery/minirubik/blob/master/paper.pdf),\n\nA position of the cube is encoded by the constructor\n``State`` that takes 7 cubes (`C1`, `C2`, `C3`, `C4`, `C5`, `C6`, `C7`)\nand their respective orientation (`O1`, `O2`, `O3`).\n\nFor example, the initial configuration is\n\n``State C1 C2 C3 C4 C5 C6 C7 O1 O1 O1 O1 O1 O1 O1``\n\nSwapping two adjacent corners gives:\n\n``State C2 C1 C3 C4 C5 C6 C7 O1 O1 O1 O1 O1 O1 O1``\n\nSwapping two opposite corners gives\n\n``State C7 C2 C3 C4 C5 C6 C1 O1 O1 O1 O1 O1 O1 O1``\n\nThere are 3 positive moves that corresponds to the right face, the back face and the down face.\nEach move can be applied once (`Right`, `Back`, `Down`),\ntwice (`Right2`, `Back2`, `Down2`) or three times\n(`Rightm1`, `Backm1`, `Downm1`) and is still considered\nas a single move.\n\nFor example, applying the move `Right` to the initial\nconfiguration gives\n\n``State C2 C5 C3 C1 C4 C6 C7 O2 O3 O1 O3 O2 O1 O1``\n\nThe ``solve`` function takes a position and returns\na list of minimal length of the moves to return to\nthe initial position.\n\nFor example, solving\n\n``State C2 C1 C3 C4 C5 C6 C7 O1 O1 O1 O1 O1 O1 O1``\n\nreturns a list of length 11\n\n``Right :: Backm1 :: Down2 :: Rightm1 :: Back\n:: Rightm1 :: Backm1 :: Right :: Down2 :: Right :: Back :: nil``\n\nOther examples are given in the file [Example.v](https://github.com/thery/minirubik/blob/master/Example.v)\n\n## Meta\n\n- Author(s):\n  - Laurent Théry\n- License: [MIT License](LICENSE)\n- Compatible Rocq/Coq versions: 9.0 or later\n- Additional dependencies:\n  - [BigNums](https://github.com/coq/bignums)\n- Rocq/Coq namespace: `minirubik`\n- Related publication(s): none\n\n## Building and installation instructions\n\nTo build and install manually, do:\n\n``` shell\ngit clone https://github.com/thery/minirubik.git\ncd minirubik\nmake   # or make -j \u003cnumber-of-cores-on-your-machine\u003e \nmake install\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthery%2Fminirubik","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthery%2Fminirubik","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthery%2Fminirubik/lists"}