AFTD Auto-Formalizing Theoretical Domains

PositiveRealUnitCore

classimported Lean

Common representation API for unit types whose magnitude is a positive real.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open NNReal in
class PositiveRealUnitCore (U : Type)
Defined in
Physlib, `PositiveRealUnitCore`
Lean proof
By Joseph Tooby-Smith, Hirotaka Monya, from github.com/leanprover-community/physlib at e411c6e89692 (Copyright (c) 2025 Joseph Tooby-Smith. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.34.1.
Verified
09 Oct 2026
Axioms
none listed
Used by 80

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open NNReal in
/-- Common representation API for unit types whose magnitude is a positive real. -/
class PositiveRealUnitCore (U : Type) where
  /-- The underlying real magnitude of a unit. -/
  val : U → ℝ
  /-- Every unit has a strictly positive magnitude. -/
  pos : ∀ x, 0 < val x
  /-- Construct a unit from a positive real magnitude. -/
  ofVal : (r : ℝ) → 0 < r → U
  /-- Construction preserves the supplied magnitude. -/
  val_ofVal : ∀ r hr, val (ofVal r hr) = r
  /-- Reconstructing a unit from its magnitude returns that unit. -/
  ofVal_val : ∀ x, ofVal (val x) (pos x) = x
See it in the graphDiscuss this resultChallenge it