AFTD Auto-Formalizing Theoretical Domains

is_pseudometric

def

For an arbitrary type V and function d : V → V → ℝ, d is a pseudometric if d(u, u) = 0 for all u : V, d(u, v) = d(v, u) for all u, v : V, and d(u, w) ≤ d(u, v) + d(v, w) for all u, v, w : V.

Statement

def is_pseudometric {V : Type*} (d : V → V → ℝ) : Prop
Defined in
arXiv:2610.23032 Section 4
Verified
20 Oct 2026
Axioms
none listed

Read back from the Lean

Given a type V and a function d : V → V → ℝ, is_pseudometric d is defined as the conjunction of three conditions: 1. ∀ u : V, d u u = 0 (identity of indiscernibles in one direction: every point has distance 0 to itself), 2. ∀ u v : V, d u v = d v u (symmetry), and 3. ∀ u v w : V, d u w ≤ d u v + d v w (the triangle inequality).

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- A pseudometric satisfies reflexivity, symmetry, and the triangle inequality. -/
def is_pseudometric {V : Type*} (d : V → V → ℝ) : Prop :=
  (∀ u, d u u = 0) ∧ (∀ u v, d u v = d v u) ∧ (∀ u v w, d u w ≤ d u v + d v w)
See it in the graphDiscuss this resultChallenge it