Equations
- ProofWidgets.Svg.instToJsonFrame = { toJson := ProofWidgets.Svg.toJsonFrame✝ }
Equations
- ProofWidgets.Svg.instFromJsonFrame = { fromJson? := ProofWidgets.Svg.fromJsonFrame✝ }
Instances For
Instances For
Instances For
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
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
- s.toPixels = match s with | ProofWidgets.Svg.Size.px x => x | ProofWidgets.Svg.Size.abs x => (x / f.pixelSize).ceil.toUInt64.toNat
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
Instances For
def
ProofWidgets.Svg.Element.setFill
{f : ProofWidgets.Svg.Frame}
(elem : ProofWidgets.Svg.Element f)
(color : ProofWidgets.Svg.Color)
:
Equations
Instances For
def
ProofWidgets.Svg.Element.setId
{f : ProofWidgets.Svg.Frame}
(elem : ProofWidgets.Svg.Element f)
(id : String)
:
Equations
Instances For
def
ProofWidgets.Svg.Element.setData
{α : Type}
{f : ProofWidgets.Svg.Frame}
(elem : ProofWidgets.Svg.Element f)
(a : α)
[Lean.ToJson α]
:
Equations
- elem.setData a = { shape := elem.shape, strokeColor := elem.strokeColor, strokeWidth := elem.strokeWidth, fillColor := elem.fillColor, id := elem.id, data := some (Lean.toJson a) }
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 elements.size)
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 self.elements.size)
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
- svg.idToData = Lean.HashMap.ofList svg.idToDataList
Instances For
instance
ProofWidgets.Svg.instGetElemNatElementLtSizeElements
{f : ProofWidgets.Svg.Frame}
:
GetElem (ProofWidgets.Svg f) Nat (ProofWidgets.Svg.Element f) fun (svg : ProofWidgets.Svg f) (idx : Nat) =>
idx < svg.elements.size
Equations
- One or more equations did not get rendered due to their size.
instance
ProofWidgets.Svg.instGetElemStringOptionElementTrue
{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)
: