File size: 3,579 Bytes
06e4298
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Mathematical Discourse Dependency Graph",
  "description": "Schema for axiomatic dependency structures across mathematical subjects",
  "type": "object",
  "required": ["schemaVersion", "discourse", "nodes", "edges"],
  "properties": {
    "schemaVersion": { "type": "string", "const": "1.0" },
    "discourse": {
      "type": "object",
      "required": ["id", "name", "subject"],
      "properties": {
        "id": { "type": "string", "pattern": "^[a-z0-9-]+$" },
        "name": { "type": "string" },
        "subject": {
          "type": "string",
          "enum": ["geometry", "arithmetic", "algebra", "analysis", "number_theory", "foundations", "other"]
        },
        "variant": { "type": "string" },
        "description": { "type": "string" },
        "structure": { "type": "object" }
      }
    },
    "metadata": {
      "type": "object",
      "properties": {
        "created": { "type": "string", "format": "date" },
        "lastUpdated": { "type": "string", "format": "date" },
        "version": { "type": "string" },
        "license": { "type": "string" },
        "authors": { "type": "array", "items": { "type": "string" } },
        "methodology": { "type": "string" },
        "citation": { "type": "string" },
        "keywords": { "type": "array", "items": { "type": "string" } }
      }
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id"],
        "properties": {
          "id": { "type": "string" },
          "type": { "type": "string", "enum": ["primary", "secondary", "digital", "commentary"] },
          "authors": { "type": "string" },
          "title": { "type": "string" },
          "year": { "type": ["string", "integer"] },
          "edition": { "type": "string" },
          "publisher": { "type": "string" },
          "url": { "type": "string", "format": "uri" },
          "doi": { "type": "string" },
          "notes": { "type": "string" }
        }
      }
    },
    "nodes": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id", "type", "label"],
        "properties": {
          "id": { "type": "string" },
          "type": {
            "type": "string",
            "enum": ["axiom", "postulate", "commonNotion", "definition", "proposition", "theorem", "lemma", "corollary"]
          },
          "label": { "type": "string" },
          "shortLabel": { "type": "string" },
          "book": { "type": "integer" },
          "chapter": { "type": "integer" },
          "number": { "type": "integer" },
          "colorClass": { "type": "string" },
          "sourceRef": { "type": "string", "description": "Reference to sources[].id + location (e.g., 'euclid-heath, Book I, Prop 1')" },
          "notes": { "type": "string" },
          "keywords": { "type": "array", "items": { "type": "string" } },
          "relatedNodes": { "type": "array", "items": { "type": "string" }, "description": "IDs of conceptually related nodes" }
        }
      }
    },
    "edges": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["from", "to"],
        "properties": {
          "from": { "type": "string" },
          "to": { "type": "string" }
        }
      }
    },
    "colorScheme": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "fill": { "type": "string" },
          "stroke": { "type": "string" }
        }
      }
    }
  }
}