-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcoq-minirubik.opam
74 lines (52 loc) · 2.09 KB
/
coq-minirubik.opam
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# This file was generated from `meta.yml`, please do not edit manually.
# Follow the instructions on https://github.com/coq-community/templates to regenerate.
opam-version: "2.0"
maintainer: "[email protected]"
version: "dev"
homepage: "https://github.com/thery/minirubik"
dev-repo: "git+https://github.com/thery/minirubik.git"
bug-reports: "https://github.com/thery/minirubik/issues"
license: "MIT"
synopsis: "A certified solver for the Rubik 2x2"
description: """
This is a certified solver for the Rubik 2x2
The formalisation is explained in the file [paper.pdf](https://github.com/thery/minirubik/blob/master/paper.pdf),
A position of the cube is encoded by the constructor
``State`` that takes 7 cubes (`C1`, `C2`, `C3`, `C4`, `C5`, `C6`, `C7`)
and their respective orientation (`O1`, `O2`, `O3`).
For example, the initial configuration is
``State C1 C2 C3 C4 C5 C6 C7 O1 O1 O1 O1 O1 O1 O1``
Swapping two adjacent corners gives:
``State C2 C1 C3 C4 C5 C6 C7 O1 O1 O1 O1 O1 O1 O1``
Swapping two opposite corners gives
``State C7 C2 C3 C4 C5 C6 C1 O1 O1 O1 O1 O1 O1 O1``
There are 3 positive moves that corresponds to the right face, the back face and the down face.
Each move can be applied once (`Right`, `Back`, `Down`),
twice (`Right2`, `Back2`, `Down2`) or three times
(`Rightm1`, `Backm1`, `Downm1`) and is still considered
as a single move.
For example, applying the move `Right` to the initial
configuration gives
``State C2 C5 C3 C1 C4 C6 C7 O2 O3 O1 O3 O2 O1 O1``
The ``solve`` function takes a position and returns
a list of minimal length of the moves to return to
the initial position.
For example, solving
``State C2 C1 C3 C4 C5 C6 C7 O1 O1 O1 O1 O1 O1 O1``
returns a list of length 11
``Right :: Backm1 :: Down2 :: Rightm1 :: Back
:: Rightm1 :: Backm1 :: Right :: Down2 :: Right :: Back :: nil``
Other examples are given in the file [Example.v](https://github.com/thery/minirubik/blob/master/Example.v)"""
build: [make "-j%{jobs}%"]
install: [make "install"]
depends: [
"coq" {(>= "8.20")}
"coq-bignums"
]
tags: [
"keyword:mini rubik"
"logpath:minirubik"
]
authors: [
"Laurent Théry"
]