File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,37 +15,19 @@ open Cslib.Automata
1515inductive Floor where
1616| one
1717| two
18- deriving DecidableEq
19-
20- def Floor.fintype : Fintype Floor := {
21- elems := {.one, .two}
22- complete floor := by grind [Floor]
23- }
24-
25- theorem Floor.finite : Finite Floor := Floor.fintype.finite
18+ deriving DecidableEq, Fintype
2619
2720inductive Direction where
2821| up
2922| down
30- deriving DecidableEq
31-
32- def Direction.fintype : Fintype Direction := {
33- elems := {.up, .down}
34- complete dir := by grind [Direction]
35- }
23+ deriving DecidableEq, Fintype
3624
37- theorem Direction.finite : Finite Direction := Direction.fintype.finite
38-
39- def tr (floor : Floor) (dir : Direction) : Floor :=
40- match floor, dir with
25+ def elevator : DA Floor Direction where
26+ tr
4127 | .one, .up => .two
4228 | .one, .down => .one
4329 | .two, .up => .two
4430 | .two, .down => .one
45-
46- def elevator : DA Floor Direction := {
47- tr := tr
4831 start := .one
49- }
5032
5133end CslibTests
You can’t perform that action at this time.
0 commit comments