Loading [Contrib]/a11y/accessibility-menu.js
Download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
language Essence 1.3
 
given n : int(1..) $ The size of the gear (number of verts connected to centre)
 
letting V be domain int(0..2*n)       $ The vertices
letting E be domain int(0..3*n-1)     $ The edges
letting Colours be domain int(0..3*n) $ The colours
letting G be domain int(0..2*n-1)     $ The full outer circle
letting C be 2*n                      $ The centre
 
find colour : function(total,injective) V --> Colours
find edgeID : function(total,injective) E --> Colours
 
such that
  $ The gear is graceful
  forAll v : G .
    edgeID(v) = |colour(v) - colour((v+1)%(2*n))|,
 
  $ The connections to the centre are graceful
  forAll v : G , v % 2 = 0 .
    edgeID(v/2+2*n) = |colour(C) - colour(v)|