Equations
- ProofWidgets.Svg.instToJsonFrame = { toJson := ProofWidgets.Svg.toJsonFrame✝ }
Equations
- ProofWidgets.Svg.instFromJsonFrame = { fromJson? := ProofWidgets.Svg.fromJsonFrame✝ }
Equations
- ProofWidgets.Svg.Frame.ySize frame = Nat.toFloat frame.height * (frame.xSize / Nat.toFloat frame.width)
Instances For
Equations
- ProofWidgets.Svg.Frame.xmax frame = frame.xmin + frame.xSize
Instances For
Equations
- ProofWidgets.Svg.Frame.ymax frame = frame.ymin + ProofWidgets.Svg.Frame.ySize frame
Instances For
Equations
- ProofWidgets.Svg.Frame.pixelSize frame = frame.xSize / Nat.toFloat frame.width
Instances For
Equations
- ProofWidgets.Svg.instToJsonColor = { toJson := ProofWidgets.Svg.toJsonColor✝ }
Equations
- ProofWidgets.Svg.instFromJsonColor = { fromJson? := ProofWidgets.Svg.fromJsonColor✝ }
Returns string "rgb(r, g, b)" with r,g,b ∈ [0,...,256)
Equations
- One or more equations did not get rendered due to their size.
Instances For
- px: {f : ProofWidgets.Svg.Frame} → Int → Int → ProofWidgets.Svg.Point f
- abs: {f : ProofWidgets.Svg.Frame} → Float → Float → ProofWidgets.Svg.Point f
Instances For
instance
ProofWidgets.Svg.instInhabitedPoint :
{a : ProofWidgets.Svg.Frame} → Inhabited (ProofWidgets.Svg.Point a)
Equations
- ProofWidgets.Svg.instInhabitedPoint = { default := ProofWidgets.Svg.Point.px default default }
instance
ProofWidgets.Svg.instToJsonPoint :
{f : ProofWidgets.Svg.Frame} → Lean.ToJson (ProofWidgets.Svg.Point f)
Equations
- ProofWidgets.Svg.instToJsonPoint = { toJson := ProofWidgets.Svg.toJsonPoint✝ }
Equations
- ProofWidgets.Svg.instFromJsonPoint = { fromJson? := ProofWidgets.Svg.fromJsonPoint✝ }
instance
ProofWidgets.Svg.instCoeProdFloatPoint
(f : ProofWidgets.Svg.Frame)
:
Coe (Float × Float) (ProofWidgets.Svg.Point f)
Equations
- ProofWidgets.Svg.instCoeProdFloatPoint f = { coe := fun (x : Float × Float) => match x with | (x, y) => ProofWidgets.Svg.Point.abs x y }
instance
ProofWidgets.Svg.instCoeProdIntPoint
(f : ProofWidgets.Svg.Frame)
:
Coe (Int × Int) (ProofWidgets.Svg.Point f)
Equations
- ProofWidgets.Svg.instCoeProdIntPoint f = { coe := fun (x : Int × Int) => match x with | (i, j) => ProofWidgets.Svg.Point.px i j }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
- px: {f : ProofWidgets.Svg.Frame} → Nat → ProofWidgets.Svg.Size f
- abs: {f : ProofWidgets.Svg.Frame} → Float → ProofWidgets.Svg.Size f
Instances For
instance
ProofWidgets.Svg.instToJsonSize :
{f : ProofWidgets.Svg.Frame} → Lean.ToJson (ProofWidgets.Svg.Size f)
Equations
- ProofWidgets.Svg.instToJsonSize = { toJson := ProofWidgets.Svg.toJsonSize✝ }
instance
ProofWidgets.Svg.instFromJsonSize :
{f : ProofWidgets.Svg.Frame} → Lean.FromJson (ProofWidgets.Svg.Size f)
Equations
- ProofWidgets.Svg.instFromJsonSize = { fromJson? := ProofWidgets.Svg.fromJsonSize✝ }
Equations
- One or more equations did not get rendered due to their size.
Instances For
- line: {f : ProofWidgets.Svg.Frame} → ProofWidgets.Svg.Point f → ProofWidgets.Svg.Point f → ProofWidgets.Svg.Shape f
- circle: {f : ProofWidgets.Svg.Frame} → ProofWidgets.Svg.Point f → ProofWidgets.Svg.Size f → ProofWidgets.Svg.Shape f
- polyline: {f : ProofWidgets.Svg.Frame} → Array (ProofWidgets.Svg.Point f) → ProofWidgets.Svg.Shape f
- polygon: {f : ProofWidgets.Svg.Frame} → Array (ProofWidgets.Svg.Point f) → ProofWidgets.Svg.Shape f
Instances For
instance
ProofWidgets.Svg.instToJsonShape :
{f : ProofWidgets.Svg.Frame} → Lean.ToJson (ProofWidgets.Svg.Shape f)
Equations
- ProofWidgets.Svg.instToJsonShape = { toJson := ProofWidgets.Svg.toJsonShape✝ }
Equations
- ProofWidgets.Svg.instFromJsonShape = { fromJson? := ProofWidgets.Svg.fromJsonShape✝ }
Equations
- One or more equations did not get rendered due to their size.
Instances For
- shape : ProofWidgets.Svg.Shape f
- strokeColor : Option ProofWidgets.Svg.Color
- strokeWidth : Option (ProofWidgets.Svg.Size f)
- fillColor : Option ProofWidgets.Svg.Color
Instances For
Equations
- ProofWidgets.Svg.instToJsonElement = { toJson := ProofWidgets.Svg.toJsonElement✝ }
Equations
- ProofWidgets.Svg.instFromJsonElement = { fromJson? := ProofWidgets.Svg.fromJsonElement✝ }
def
ProofWidgets.Svg.Element.setStroke
{f : ProofWidgets.Svg.Frame}
(elem : ProofWidgets.Svg.Element f)
(color : ProofWidgets.Svg.Color)
(width : ProofWidgets.Svg.Size f)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
ProofWidgets.Svg.Element.setFill
{f : ProofWidgets.Svg.Frame}
(elem : ProofWidgets.Svg.Element f)
(color : ProofWidgets.Svg.Color)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
ProofWidgets.Svg.Element.setId
{f : ProofWidgets.Svg.Frame}
(elem : ProofWidgets.Svg.Element f)
(id : String)
:
Equations
- ProofWidgets.Svg.Element.setId elem id = { shape := elem.shape, strokeColor := elem.strokeColor, strokeWidth := elem.strokeWidth, fillColor := elem.fillColor, id := some id, data := elem.data }
Instances For
def
ProofWidgets.Svg.Element.setData
{α : Type}
{f : ProofWidgets.Svg.Frame}
(elem : ProofWidgets.Svg.Element f)
(a : α)
[Lean.ToJson α]
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
ProofWidgets.Svg.line
{f : ProofWidgets.Svg.Frame}
(p : ProofWidgets.Svg.Point f)
(q : ProofWidgets.Svg.Point f)
:
Equations
- ProofWidgets.Svg.line p q = { shape := ProofWidgets.Svg.Shape.line p q, strokeColor := none, strokeWidth := none, fillColor := none, id := none, data := none }
Instances For
def
ProofWidgets.Svg.circle
{f : ProofWidgets.Svg.Frame}
(c : ProofWidgets.Svg.Point f)
(r : ProofWidgets.Svg.Size f)
:
Equations
- ProofWidgets.Svg.circle c r = { shape := ProofWidgets.Svg.Shape.circle c r, strokeColor := none, strokeWidth := none, fillColor := none, id := none, data := none }
Instances For
def
ProofWidgets.Svg.polyline
{f : ProofWidgets.Svg.Frame}
(pts : Array (ProofWidgets.Svg.Point f))
:
Equations
- ProofWidgets.Svg.polyline pts = { shape := ProofWidgets.Svg.Shape.polyline pts, strokeColor := none, strokeWidth := none, fillColor := none, id := none, data := none }
Instances For
def
ProofWidgets.Svg.polygon
{f : ProofWidgets.Svg.Frame}
(pts : Array (ProofWidgets.Svg.Point f))
:
Equations
- ProofWidgets.Svg.polygon pts = { shape := ProofWidgets.Svg.Shape.polygon pts, strokeColor := none, strokeWidth := none, fillColor := none, id := none, data := none }
Instances For
def
ProofWidgets.mkIdToIdx
{f : ProofWidgets.Svg.Frame}
(elements : Array (ProofWidgets.Svg.Element f))
:
Lean.HashMap String (Fin (Array.size elements))
Equations
- One or more equations did not get rendered due to their size.
Instances For
- elements : Array (ProofWidgets.Svg.Element f)
- idToIdx : Lean.HashMap String (Fin (Array.size self.elements))
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
instance
ProofWidgets.Svg.instGetElemSvgNatElementLtInstLTNatSizeElements
{f : ProofWidgets.Svg.Frame}
:
GetElem (ProofWidgets.Svg f) Nat (ProofWidgets.Svg.Element f) fun (svg : ProofWidgets.Svg f) (idx : Nat) =>
idx < Array.size svg.elements
Equations
- ProofWidgets.Svg.instGetElemSvgNatElementLtInstLTNatSizeElements = { getElem := fun (svg : ProofWidgets.Svg f) (i : Nat) (h : i < Array.size svg.elements) => svg.elements[i] }
instance
ProofWidgets.Svg.instGetElemSvgStringOptionElementTrue
{f : ProofWidgets.Svg.Frame}
:
GetElem (ProofWidgets.Svg f) String (Option (ProofWidgets.Svg.Element f)) fun (x : ProofWidgets.Svg f) (x : String) =>
True
Equations
- One or more equations did not get rendered due to their size.
def
ProofWidgets.Svg.getData
{f : ProofWidgets.Svg.Frame}
(svg : ProofWidgets.Svg f)
(id : String)
:
Equations
- ProofWidgets.Svg.getData svg id = match svg[id] with | none => none | some elem => elem.data