File: .lake/packages/proofwidgets/ProofWidgets/Data/Svg.lean

full_name: _private.«.lake».packages.proofwidgets.ProofWidgets.Data.Svg.0.Float.toInt
code: private def _root_.Float.toInt (x : Float) : Int 
goal: Int

full_name: _private.«.lake».packages.proofwidgets.ProofWidgets.Data.Svg.0.Int.toFloat
code: private def _root_.Int.toFloat (i : Int) : Float 
goal: Float

full_name: ProofWidgets.Svg.Frame.xSize
code: structure Frame where
  (xmin ymin : Float)
  (xSize : Float)
  (width height : Nat)
  deriving ToJson, FromJson
goal: Float

full_name: ProofWidgets.Svg.Frame.xmin
code: structure Frame where
  (xmin ymin : Float)
  (xSize : Float)
  (width height : Nat)
  deriving ToJson, FromJson
goal: Float

full_name: ProofWidgets.Svg.Frame.ymin
code: structure Frame where
  (xmin ymin : Float)
  (xSize : Float)
  (width height : Nat)
  deriving ToJson, FromJson
goal: Float

full_name: ProofWidgets.Svg.Frame
code: structure Frame where
  (xmin ymin : Float)
  (xSize : Float)
  (width height : Nat)
  deriving ToJson, FromJson
goal: Type

full_name: ProofWidgets.Svg.Frame.width
code: structure Frame where
  (xmin ymin : Float)
  (xSize : Float)
  (width height : Nat)
  deriving ToJson, FromJson
goal: Nat

full_name: ProofWidgets.Svg.Frame.height
code: structure Frame where
  (xmin ymin : Float)
  (xSize : Float)
  (width height : Nat)
  deriving ToJson, FromJson
goal: Nat

full_name: ProofWidgets.Svg.instToJsonFrame
code: ToJson
goal: Lean.ToJson ProofWidgets.Svg.Frame

full_name: ProofWidgets.Svg.instFromJsonFrame
code: FromJson
goal: Lean.FromJson ProofWidgets.Svg.Frame

full_name: ProofWidgets.Svg.Frame.ySize
code: def Frame.ySize (frame : Frame) : Float 
goal: Float

full_name: ProofWidgets.Svg.Frame.xmax
code: def Frame.xmax (frame : Frame) : Float 
goal: Float

full_name: ProofWidgets.Svg.Frame.ymax
code: def Frame.ymax (frame : Frame) : Float 
goal: Float

full_name: ProofWidgets.Svg.Frame.pixelSize
code: def Frame.pixelSize (frame : Frame) : Float 
goal: Float

full_name: ProofWidgets.Svg.Color.g
code: structure Color where
  (r := 0.0)
  (g := 0.0)
  (b := 0.0)
  deriving ToJson, FromJson
goal: Float

full_name: ProofWidgets.Svg.Color.r
code: structure Color where
  (r := 0.0)
  (g := 0.0)
  (b := 0.0)
  deriving ToJson, FromJson
goal: Float

full_name: ProofWidgets.Svg.Color
code: structure Color where
  (r := 0.0)
  (g := 0.0)
  (b := 0.0)
  deriving ToJson, FromJson
goal: Type

full_name: ProofWidgets.Svg.Color.b
code: structure Color where
  (r := 0.0)
  (g := 0.0)
  (b := 0.0)
  deriving ToJson, FromJson
goal: Float

full_name: ProofWidgets.Svg.instToJsonColor
code: ToJson
goal: Lean.ToJson ProofWidgets.Svg.Color

full_name: ProofWidgets.Svg.instFromJsonColor
code: FromJson
goal: Lean.FromJson ProofWidgets.Svg.Color

full_name: ProofWidgets.Svg.instCoeProdFloatColor
code: instance : Coe (Float×Float×Float) Color 
goal: Coe (Float × Float × Float) ProofWidgets.Svg.Color

full_name: ProofWidgets.Svg.Color.toStringRGB
code: /-- Returns string "rgb(r, g, b)" with `r,g,b ∈ [0,...,256)` -/
def Color.toStringRGB (c : Color) : String 
goal: String

full_name: ProofWidgets.Svg.Point
code: inductive Point (f : Frame) where
  | px   (i j : Int)
  | abs  (x y : Float)
  deriving Inhabited, ToJson, FromJson
goal: Type

full_name: ProofWidgets.Svg.Point.abs
code: inductive Point (f : Frame) where
  | px   (i j : Int)
  | abs  (x y : Float)
  deriving Inhabited, ToJson, FromJson
goal: ProofWidgets.Svg.Point f

full_name: ProofWidgets.Svg.instInhabitedPoint
code: inductive Point (f : Frame) where
  | px   (i j : Int)
  | abs  (x y : Float)
  deriving Inhabited, ToJson, FromJson
goal: {a : ProofWidgets.Svg.Frame} → Inhabited (ProofWidgets.Svg.Point a)

full_name: ProofWidgets.Svg.Point.px
code: inductive Point (f : Frame) where
  | px   (i j : Int)
  | abs  (x y : Float)
  deriving Inhabited, ToJson, FromJson
goal: ProofWidgets.Svg.Point f

full_name: ProofWidgets.Svg.instToJsonPoint
code: ToJson
goal: {f : ProofWidgets.Svg.Frame} → Lean.ToJson (ProofWidgets.Svg.Point f)

full_name: ProofWidgets.Svg.instFromJsonPoint
code: FromJson
goal: {f : ProofWidgets.Svg.Frame} → Lean.FromJson (ProofWidgets.Svg.Point f)

full_name: ProofWidgets.Svg.instCoeProdFloatPoint
code: instance (f) : Coe (Float×Float) (Point f) 
goal: Coe (Float × Float) (ProofWidgets.Svg.Point f)

full_name: ProofWidgets.Svg.instCoeProdIntPoint
code: instance (f) : Coe (Int×Int) (Point f) 
goal: Coe (Int × Int) (ProofWidgets.Svg.Point f)

full_name: ProofWidgets.Svg.Point.toPixels
code: def Point.toPixels {f : Frame} (p : Point f) : Int × Int 
goal: Int × Int

full_name: ProofWidgets.Svg.Point.toAbsolute
code: def Point.toAbsolute {f : Frame} (p : Point f) : Float × Float 
goal: Float × Float

full_name: ProofWidgets.Svg.Size
code: inductive Size (f : Frame) where
  | px   (size : Nat)   : Size f
  | abs  (size : Float) : Size f
  deriving ToJson, FromJson
goal: Type

full_name: ProofWidgets.Svg.Size.abs
code: inductive Size (f : Frame) where
  | px   (size : Nat)   : Size f
  | abs  (size : Float) : Size f
  deriving ToJson, FromJson
goal: ProofWidgets.Svg.Size f

full_name: ProofWidgets.Svg.Size.px
code: inductive Size (f : Frame) where
  | px   (size : Nat)   : Size f
  | abs  (size : Float) : Size f
  deriving ToJson, FromJson
goal: ProofWidgets.Svg.Size f

full_name: ProofWidgets.Svg.instToJsonSize
code: ToJson
goal: {f : ProofWidgets.Svg.Frame} → Lean.ToJson (ProofWidgets.Svg.Size f)

full_name: ProofWidgets.Svg.instFromJsonSize
code: FromJson
goal: {f : ProofWidgets.Svg.Frame} → Lean.FromJson (ProofWidgets.Svg.Size f)

full_name: ProofWidgets.Svg.Size.toPixels
code: def Size.toPixels {f : Frame} (s : Size f) : Nat 
goal: Nat

full_name: ProofWidgets.Svg.Shape.polygon
code: inductive Shape (f : Frame) where
  | line     (src trg : Point f)
  | circle   (center : Point f) (radius : Size f)
  | polyline (points : Array (Point f)) -- (type : PolylineType)
  | polygon  (points : Array (Point f))
  deriving ToJson, FromJson
goal: ProofWidgets.Svg.Shape f

full_name: ProofWidgets.Svg.Shape.circle
code: inductive Shape (f : Frame) where
  | line     (src trg : Point f)
  | circle   (center : Point f) (radius : Size f)
  | polyline (points : Array (Point f)) -- (type : PolylineType)
  | polygon  (points : Array (Point f))
  deriving ToJson, FromJson
goal: ProofWidgets.Svg.Shape f

full_name: ProofWidgets.Svg.Shape
code: inductive Shape (f : Frame) where
  | line     (src trg : Point f)
  | circle   (center : Point f) (radius : Size f)
  | polyline (points : Array (Point f)) -- (type : PolylineType)
  | polygon  (points : Array (Point f))
  deriving ToJson, FromJson
goal: Type

full_name: ProofWidgets.Svg.Shape.polyline
code: inductive Shape (f : Frame) where
  | line     (src trg : Point f)
  | circle   (center : Point f) (radius : Size f)
  | polyline (points : Array (Point f)) -- (type : PolylineType)
  | polygon  (points : Array (Point f))
  deriving ToJson, FromJson
goal: ProofWidgets.Svg.Shape f

full_name: ProofWidgets.Svg.Shape.line
code: inductive Shape (f : Frame) where
  | line     (src trg : Point f)
  | circle   (center : Point f) (radius : Size f)
  | polyline (points : Array (Point f)) -- (type : PolylineType)
  | polygon  (points : Array (Point f))
  deriving ToJson, FromJson
goal: ProofWidgets.Svg.Shape f

full_name: ProofWidgets.Svg.instToJsonShape
code: ToJson
goal: {f : ProofWidgets.Svg.Frame} → Lean.ToJson (ProofWidgets.Svg.Shape f)

full_name: ProofWidgets.Svg.instFromJsonShape
code: FromJson
goal: {f : ProofWidgets.Svg.Frame} → Lean.FromJson (ProofWidgets.Svg.Shape f)

full_name: ProofWidgets.Svg.Shape.toHtmlData
code: def Shape.toHtmlData {f : Frame} : Shape f → String × Array (String × Json)
  
goal: ProofWidgets.Svg.Shape f → String × Array (String × Lean.Json)

full_name: ProofWidgets.Svg.Element.id
code: structure Element (f : Frame) where
  shape : Shape f
  strokeColor := (none : Option Color)
  strokeWidth := (none : Option (Size f))
  fillColor   := (none : Option Color)
  id          := (none : Option String)
  data        := (none : Option Json)
  deriving ToJson, FromJson
goal: Option String

full_name: ProofWidgets.Svg.Element.strokeColor
code: structure Element (f : Frame) where
  shape : Shape f
  strokeColor := (none : Option Color)
  strokeWidth := (none : Option (Size f))
  fillColor   := (none : Option Color)
  id          := (none : Option String)
  data        := (none : Option Json)
  deriving ToJson, FromJson
goal: Option ProofWidgets.Svg.Color

full_name: ProofWidgets.Svg.Element.fillColor
code: structure Element (f : Frame) where
  shape : Shape f
  strokeColor := (none : Option Color)
  strokeWidth := (none : Option (Size f))
  fillColor   := (none : Option Color)
  id          := (none : Option String)
  data        := (none : Option Json)
  deriving ToJson, FromJson
goal: Option ProofWidgets.Svg.Color

full_name: ProofWidgets.Svg.Element.strokeWidth
code: structure Element (f : Frame) where
  shape : Shape f
  strokeColor := (none : Option Color)
  strokeWidth := (none : Option (Size f))
  fillColor   := (none : Option Color)
  id          := (none : Option String)
  data        := (none : Option Json)
  deriving ToJson, FromJson
goal: Option (ProofWidgets.Svg.Size f)

full_name: ProofWidgets.Svg.Element
code: structure Element (f : Frame) where
  shape : Shape f
  strokeColor := (none : Option Color)
  strokeWidth := (none : Option (Size f))
  fillColor   := (none : Option Color)
  id          := (none : Option String)
  data        := (none : Option Json)
  deriving ToJson, FromJson
goal: Type

full_name: ProofWidgets.Svg.Element.shape
code: structure Element (f : Frame) where
  shape : Shape f
  strokeColor := (none : Option Color)
  strokeWidth := (none : Option (Size f))
  fillColor   := (none : Option Color)
  id          := (none : Option String)
  data        := (none : Option Json)
  deriving ToJson, FromJson
goal: ProofWidgets.Svg.Shape f

full_name: ProofWidgets.Svg.Element.data
code: structure Element (f : Frame) where
  shape : Shape f
  strokeColor := (none : Option Color)
  strokeWidth := (none : Option (Size f))
  fillColor   := (none : Option Color)
  id          := (none : Option String)
  data        := (none : Option Json)
  deriving ToJson, FromJson
goal: Option Lean.Json

full_name: ProofWidgets.Svg.instToJsonElement
code: ToJson
goal: {f : ProofWidgets.Svg.Frame} → Lean.ToJson (ProofWidgets.Svg.Element f)

full_name: ProofWidgets.Svg.instFromJsonElement
code: FromJson
goal: {f : ProofWidgets.Svg.Frame} → Lean.FromJson (ProofWidgets.Svg.Element f)

full_name: ProofWidgets.Svg.Element.setStroke
code: def Element.setStroke {f} (elem : Element f) (color : Color) (width : Size f) 
goal: ProofWidgets.Svg.Element f

full_name: ProofWidgets.Svg.Element.setFill
code: def Element.setFill {f} (elem : Element f) (color : Color) 
goal: ProofWidgets.Svg.Element f

full_name: ProofWidgets.Svg.Element.setId
code: def Element.setId {f} (elem : Element f) (id : String) 
goal: ProofWidgets.Svg.Element f

full_name: ProofWidgets.Svg.Element.setData
code: def Element.setData {α : Type} {f} (elem : Element f) (a : α) [ToJson α] 
goal: ProofWidgets.Svg.Element f

full_name: ProofWidgets.Svg.Element.toHtml
code: def Element.toHtml {f : Frame} (e : Element f) : Html 
goal: ProofWidgets.Html

full_name: ProofWidgets.Svg.line
code: def line {f} (p q : Point f) : Element f 
goal: ProofWidgets.Svg.Element f

full_name: ProofWidgets.Svg.circle
code: def circle {f} (c : Point f) (r : Size f) : Element f 
goal: ProofWidgets.Svg.Element f

full_name: ProofWidgets.Svg.polyline
code: def polyline {f} (pts : Array (Point f)) : Element f 
goal: ProofWidgets.Svg.Element f

full_name: ProofWidgets.Svg.polygon
code: def polygon {f} (pts : Array (Point f)) : Element f 
goal: ProofWidgets.Svg.Element f

full_name: ProofWidgets.mkIdToIdx
code: def mkIdToIdx {f} (elements : Array (Svg.Element f)) : HashMap String (Fin elements.size) 
goal: Lean.HashMap String (Fin elements.size)

full_name: ProofWidgets.Svg
code: structure Svg (f : Svg.Frame) where
  elements : Array (Svg.Element f)
  idToIdx := mkIdToIdx elements
goal: Type

full_name: ProofWidgets.Svg.elements
code: structure Svg (f : Svg.Frame) where
  elements : Array (Svg.Element f)
  idToIdx := mkIdToIdx elements
goal: Array (ProofWidgets.Svg.Element f)

full_name: ProofWidgets.Svg.idToIdx
code: structure Svg (f : Svg.Frame) where
  elements : Array (Svg.Element f)
  idToIdx := mkIdToIdx elements
goal: Lean.HashMap String (Fin self.elements.size)

full_name: ProofWidgets.Svg.toHtml
code: def toHtml {f : Frame} (svg : Svg f) : Html 
goal: ProofWidgets.Html

full_name: ProofWidgets.Svg.idToDataList
code: def idToDataList {f} (svg : Svg f) : List (String × Json) 
goal: List (String × Lean.Json)

full_name: ProofWidgets.Svg.idToData
code: def idToData {f} (svg : Svg f) : HashMap String Json 
goal: Lean.HashMap String Lean.Json

full_name: ProofWidgets.Svg.instGetElemNatElementLtSizeElements
code: instance {f} : GetElem (Svg f) Nat (Svg.Element f) (λ svg idx => idx < svg.elements.size) 
goal: GetElem (ProofWidgets.Svg f) Nat (ProofWidgets.Svg.Element f) fun svg idx => idx < svg.elements.size

full_name: ProofWidgets.Svg.instGetElemStringOptionElementTrue
code: instance {f} : GetElem (Svg f) String (Option (Svg.Element f)) (λ _ _ => True) 
goal: GetElem (ProofWidgets.Svg f) String (Option (ProofWidgets.Svg.Element f)) fun x x => True

full_name: ProofWidgets.Svg.getData
code: def getData {f} (svg : Svg f) (id : String) : Option Json 
goal: Option Lean.Json