PhysLean Documentation

PhysLean.Units.WithDim.Basic

WithDim #

WithDim is the type M which carrying the dimension d.

structure WithDim (d : Dimension) (M : Type) [MulAction NNReal M] :

The type M carrying an instance of a dimension d.

  • val : M

    The underlying value of M.

Instances For
    theorem WithDim.ext {d : Dimension} {M : Type} [MulAction NNReal M] (x1 x2 : WithDim d M) (h : x1.val = x2.val) :
    x1 = x2
    theorem WithDim.ext_iff {d : Dimension} {M : Type} [MulAction NNReal M] {x1 x2 : WithDim d M} :
    x1 = x2 x1.val = x2.val
    Equations
    @[simp]
    theorem WithDim.smul_val {d : Dimension} {M : Type} [MulAction NNReal M] (a : NNReal) (m : WithDim d M) :
    (a m).val = a m.val
    Equations
    @[simp]
    theorem WithDim.withDim_hMul_val {d1 d2 : Dimension} (m1 : WithDim d1 ) (m2 : WithDim d2 ) :
    (m1 * m2).val = m1.val * m2.val