AFTD Auto-Formalizing Theoretical Domains

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.
Verified
08 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 4

Lean source view module on GitHub

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₂
See it in the graphDiscuss this resultChallenge it