Relation.RelatesWithinSteps.trans
theoremverifiedformalizationimported Lean
Transitivity of RelatesWithinSteps in the sum of the step bounds.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in variable {α : Type*} {r : α → α → Prop} {a b c : α} in @[trans] lemma Relation.RelatesWithinSteps.trans {a b c : α} {n₁ n₂ : ℕ} (h₁ : RelatesWithinSteps r a b n₁) (h₂ : RelatesWithinSteps r b c n₂) : RelatesWithinSteps r a c (n₁ + n₂)
- Formalizes
- CSLib, `Relation.RelatesWithinSteps.trans`
- Lean proof
- By Bolton Bailey, from github.com/leanprover/cslib at
3951377e5a3f(Copyright (c) 2025 Bolton Bailey. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.33.0.Relation.RelatesWithinSteps.trans← Relation.RelatesWithinSteps.trans (Cslib/Foundations/Data/RelatesInSteps.lean:184): verbatim
- Verified
- 08 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 4
- Relation.RelatesInSteps.transRelation.RelatesInSteps.trans
- Relation.RelatesWithinSteps
RelatesWithinStepsis a variant ofRelatesInStepsthat allows for a loose bound. It states thatarelates tobin *at most*n… - Relation.RelatesWithinSteps.zero_iffRelation.RelatesWithinSteps.zero_iff
- Relation.RelatesInStepsA relation
rrelates two elements ofαinnsteps if there is a chain ofnpairs(t_i, t_{i+1})such thatr t_i t_{i+1}for…
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
set_option autoImplicit true inset_option relaxedAutoImplicit true invariable {α : Type*} {r : α → α → Prop} {a b c : α} in/-- Transitivity of `RelatesWithinSteps` in the sum of the step bounds. -/@[trans]lemma Relation.RelatesWithinSteps.trans {a b c : α} {n₁ n₂ : ℕ} (h₁ : RelatesWithinSteps r a b n₁) (h₂ : RelatesWithinSteps r b c n₂) : RelatesWithinSteps r a c (n₁ + n₂) := by obtain ⟨m₁, hm₁, hevals₁⟩ := h₁ obtain ⟨m₂, hm₂, hevals₂⟩ := h₂ use m₁ + m₂ constructor · lia · exact RelatesInSteps.trans hevals₁ hevals₂