File size: 1,217 Bytes
63a8a7c | 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 | import Lean.Data.Json.FromToJson
namespace SovereignCorpus.Bridge
open Lean
structure ProblemMeta where
source : String
timestamp : String
operatorSig : String
maxSteps : Nat
allowedTactics : List String
deriving Repr, Inhabited, Lean.FromJson, Lean.ToJson
structure GraniteProblem where
id : String
statement : String
context : List String
tacticHint : Option String
meta : ProblemMeta
deriving Repr, Inhabited, Lean.FromJson, Lean.ToJson
inductive ResponseStatus where
| proposed
| corrected
| failed
deriving Repr, Inhabited, Lean.FromJson, Lean.ToJson
inductive DiagnosticSeverity where
| info
| warning
| error
deriving Repr, Inhabited, Lean.FromJson, Lean.ToJson
structure Span where
startLine : Nat
startCol : Nat
endLine : Nat
endCol : Nat
deriving Repr, Inhabited, Lean.FromJson, Lean.ToJson
structure Diagnostic where
severity : DiagnosticSeverity
message : String
span : Option Span
deriving Repr, Inhabited, Lean.FromJson, Lean.ToJson
structure GraniteResponse where
problemId : String
status : ResponseStatus
proofScript : String
diagnostics : List Diagnostic
deriving Repr, Inhabited, Lean.FromJson, Lean.ToJson
end SovereignCorpus.Bridge
|