Alphabeta Math
LemmaStatement: AI-adaptedProof: AI-generatedprecheck passjudge pass (z-ai/glm-5.2)audited 2026-07-26
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

Nonnegativity of a metric is a consequence of the other axioms, not an axiom

Statement

Let X be a set and let p:X×X→R satisfy the reflexivity axiom (M1') p(x,x)=0 and the symmetry axiom (M2) p(x,y)=p(y,x) of Metric space: d(x,y)=0 iff x=y, symmetry, and the triangle inequality; pseudometric and ultrametric. Then:

  1. If p satisfies the triangle inequality (M3), then p(x,y)≥0 for all x,y∈X.
  2. If p satisfies the strong triangle inequality (M3'), then p(x,y)≥0 for all x,y∈X.

In particular every metric, every pseudometric and every ultrametric (Metric space: d(x,y)=0 iff x=y, symmetry, and the triangle inequality; pseudometric and ultrametric) takes only nonnegative values. Nonnegativity is therefore a theorem about the axiom list this library uses, not a fourth axiom, and no statement on this page needs to assume it separately.

Facts & Assumptions

Given: A set X, points x,y∈X, and a function p:X×X→R satisfying (M1') p(a,a)=0 for every a∈X and (M2) p(a,b)=p(b,a) for all a,b∈X (Metric space: d(x,y)=0 iff x=y, symmetry, and the triangle inequality; pseudometric and ultrametric).

[A1]

(M3) The triangle inequality p(a,c)≤p(a,b)+p(b,c) holds for all a,b,c∈X (Metric space: d(x,y)=0 iff x=y, symmetry, and the triangle inequality; pseudometric and ultrametric).

[A2]

(M3') The strong triangle inequality p(a,c)≤max⁡{p(a,b),p(b,c)} holds for all a,b,c∈X (Metric space: d(x,y)=0 iff x=y, symmetry, and the triangle inequality; pseudometric and ultrametric).

[L1]

Trichotomy of the order of R: for reals a,b exactly one of a<b, a=b, b<a holds, so a≥0 fails exactly when a<0 (Order on the reals, Complete ordered field (least-upper-bound property), Ordered field).

[L2]

Adding two strict inequalities: if a<b and c<d then a+c<b+d (Order is preserved by adding a constant and by adding inequalities).

[L3]

A two-element subset {a,b} of R has a maximum, and that maximum is a or b; if a=b it is a (Every nonempty finite set of reals has a maximum and a minimum, Maximum and minimum of a set).

Proof

technique · direct
1.1A1

Instantiate [A1] at a=x, b=y, c=x: p(x,x)≤p(x,y)+p(y,x).

1.2A2

Instantiate [A2] at a=x, b=y, c=x: p(x,x)≤max⁡{p(x,y),p(y,x)}.

1.3assume-hyp

Suppose, towards ruling it out, that p(x,y)<0.

2.1step 1.1given

By (M1') the left side of step 1.1 is 0 and by (M2) the right side is p(x,y)+p(x,y), so 0≤p(x,y)+p(x,y).

2.2step 1.2givenL3

By (M2) the two entries of the maximum in step 1.2 are the same real number, so that maximum equals p(x,y) by [L3], and (M1') turns step 1.2 into 0≤p(x,y), which is claim 2.

2.3step 1.3L2

Adding the supposed inequality of step 1.3 to itself gives p(x,y)+p(x,y)<0+0=0.

3.1step 2.1step 2.2step 2.3L1∎

Steps 2.1 and 2.3 assert 0≤p(x,y)+p(x,y) and p(x,y)+p(x,y)<0, which trichotomy forbids; so the supposition of step 1.3 is untenable and p(x,y)≥0, which is claim 1.

Remarks

  • What each claim uses. Claim 1 is the familiar two-line argument 0=p(x,x)≤p(x,y)+p(y,x)=2p(x,y) followed by the observation that a negative real added to itself stays negative. Claim 2 does not need that second half at all: the strong triangle inequality delivers 0≤p(x,y) in one step, because the maximum of a real number with itself is that number.
  • Symmetry is used in both claims and cannot be dropped. Without (M2) the instantiation of step 1.1 only gives 0≤p(x,y)+p(y,x), which leaves the possibility that one of the two values is negative and the other larger and positive. Dropping (M2) instead of weakening (M1) gives the notion usually called a quasimetric, which this library does not treat; for it the argument above is unavailable, so nonnegativity is not redundant there and is imposed as part of the definition (Which metric axiom list this library uses, the live naming fork between semimetric and pseudometric, and why extended metrics are not treated here).

Depends on

Dependency tree · 2 levels

Sources