pith. machine review for the scientific record. sign in
structure definition def or abbrev

Quantity

show as:
view Lean formalization →

No prose has been written for this declaration yet. The Lean source and graph data below render without it.

generate prose now

formal statement (Lean)

 167structure Quantity (U : Type) where
 168  val : ℝ
 169
 170instance (U : Type) : CoeTC (Quantity U) ℝ := ⟨Quantity.val⟩

proof body

Definition body.

 171
 172namespace Quantity
 173
 174instance (U : Type) : Zero (Quantity U) := ⟨⟨0⟩⟩
 175instance (U : Type) : Add (Quantity U) := ⟨fun a b => ⟨a.val + b.val⟩⟩
 176instance (U : Type) : Sub (Quantity U) := ⟨fun a b => ⟨a.val - b.val⟩⟩
 177instance (U : Type) : Neg (Quantity U) := ⟨fun a => ⟨-a.val⟩⟩
 178instance (U : Type) : SMul ℝ (Quantity U) := ⟨fun r a => ⟨r * a.val⟩⟩
 179

used by (14)

From the project-wide theorem graph. These declarations reference this one in their body.

depends on (2)

Lean names referenced from this declaration's body.