Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Composition of implications

Sebastian Pokutta
v1 2026-10-19 · last 2026-11-28
Note: An example: it shows what an entry can contain, on a deliberately simple result.

Abstract. If P→QP \to Q and Q→RQ \to R then P→RP \to R. The archive’s worked example: a result small enough to read at a glance, used to show numbered results, a diagram, an interactive widget and a Mathlib corollary.

Implications chain. This is the archive’s worked example: it shows the pieces an entry can use — numbered results, a diagram, a widget, a Mathlib corollary — on a result small enough to read at a glance.

Composing with self-implication (P→PP \to P) on either side changes nothing:

Main.lean
/-- Every proposition implies itself. -/
theorem self_implication (P : Prop) : P → P :=
  fun hp => hp

/-- Implications compose. -/
theorem implication_composition {P Q R : Prop} (hpq : P → Q) (hqr : Q → R) : P → R :=
  fun hp => Lemmata.Shared.mp hqr (Lemmata.Shared.mp hpq hp)

/-- Composing with self-implication changes nothing. -/
theorem compose_self {P Q : Prop} (hpq : P → Q) : P → Q :=
  implication_composition (self_implication P) hpq

Try it: pick which hypotheses hold, and see whether RR follows.

Formal verification — ✅ all 2 formal results are kernel-checked
  • ✓ kernel-checked (Lean v4.35.0) Theorem 1 — Lemmata.ImplicationComposition.implication_composition (source)

  • ✓ kernel-checked (Lean v4.35.0) Corollary 1 — Lemmata.ImplicationComposition.le_compose (source)

Checked at commit 3b355a656ef3. The formal statement is machine-checked; that it matches the prose is checked by review. What “checked” means.

Lean implication_composition · ✅ kernel-checked · source

Statement in Lean
/-- Implications compose. -/
theorem implication_composition {P Q R : Prop} (hpq : P → Q) (hqr : Q → R) : P → R

Lean le_compose · ✅ kernel-checked · source

Statement in Lean
/-- On a preorder, transitivity of `≤` is composition of the two inequalities. -/
theorem le_compose {α : Type*} [Preorder α] {a b c : α} (h₁ : a ≤ b) (h₂ : b ≤ c) : a ≤ c

License: CC BY 4.0

Comments.

Comments are external content (GitHub Discussions, shown with giscus) and need JavaScript.