Compiled with official native Lean 4.33.1 on 25 November 2026, core library only. The browser checker uses a separately identified experimental fork. Intended-statement comparison, independent axiom audit and mathematical review are pending.
The statement
For natural numbers a, b and c, a ≤ b and b ≤ c imply a ≤ c.
theorem order_transitivity (a b c : Nat) (hab : a ≤ b) (hbc : b ≤ c) : a ≤ c := by
exact Nat.le_trans hab hbc
Why these steps?
- The variables and inequalities restrict the statement to the natural-number order. The target contains the first and last endpoints.
- Nat.le_trans is a named theorem from the basic natural-number library. Its inputs are proofs of two inequalities with a shared middle value.
- The arguments hab and hbc appear in the same order as the chain a ≤ b ≤ c. Lean infers the endpoints from these proof types.
- This is an application of an existing theorem, not an expanded construction of transitivity from the definition of ≤. That distinction remains visible when using much larger libraries.
Try a variation
State and prove a four-point chain with assumptions a ≤ b, b ≤ c and c ≤ d by composing Nat.le_trans twice.
A mistake to understand
theorem order_transitivity (a b c : Nat) (hab : a ≤ b) (hbc : b ≤ c) : a ≤ c := by
exact Nat.le_trans hbc hab
Expected teaching failure, not recorded compiler output: The reversed arguments do not form the required ordered chain: the ending point of the first relation must match the starting point of the second.
Sources & reuse
Native compilation evidence (JSON)Code and explanation: original LeanProofs teaching content, CC0-1.0. Linked references retain their own licenses. Editorial date: 24 November 2026; independent mathematical review pending.