Relation.RelatesInSteps
inductiveimported Lean
A relation r relates two elements of α in n steps if there is a chain of n pairs (t_i, t_{i+1}) such that r t_i t_{i+1} for each i, starting from the first element and ending at the second.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in variable {α : Type*} {r : α → α → Prop} {a b c : α} in inductive Relation.RelatesInSteps (r : α → α → Prop) : α → α → ℕ → Prop
- Defined in
- CSLib, `Relation.RelatesInSteps`
- 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.RelatesInSteps← Relation.RelatesInSteps (Cslib/Foundations/Data/RelatesInSteps.lean:30): verbatim
- Verified
- 08 Oct 2026
- Axioms
- none listed
- Used by 24
- Relation.RelatesInSteps.mapIf
gis a homomorphism fromrtor'(i.e., it preserves the reduction relation), thenRelatesInStepsis preserved underg. - Relation.RelatesInSteps.zero_iffRelation.RelatesInSteps.zero_iff
- Relation.RelatesWithinSteps.mapIf
gis a homomorphism fromrtor'(i.e., it preserves the reduction relation), thenRelatesWithinStepsis preserved underg. - Relation.RelatesInSteps.succ_iffRelation.RelatesInSteps.succ_iff
- Relation.RelatesInSteps.headRelation.RelatesInSteps.head
- Relation.RelatesInSteps.transRelation.RelatesInSteps.trans
- Relation.RelatesWithinSteps.of_leRelation.RelatesWithinSteps.of_le
- Relation.RelatesInSteps.head_induction_onRelation.RelatesInSteps.head_induction_on
- Relation.RelatesInSteps.singleRelation.RelatesInSteps.single
- exact_steiner_hopset_layered_dag_steiner_shortcutLet V and W be finite types, Gv a directed graph on V and ℓ : V → ℕ a layering such that every arc u → v of Gv has ℓ v = ℓ u + 1 (a…
- Relation.ReflTransGen.relatesInStepsRelation.ReflTransGen.relatesInSteps
- Relation.RelatesWithinSteps
RelatesWithinStepsis a variant ofRelatesInStepsthat allows for a loose bound. It states thatarelates tobin *at most*n… - Relation.RelatesWithinSteps.reflRelation.RelatesWithinSteps.refl
- Relation.RelatesWithinSteps.of_relatesInSteps
RelatesInStepsimpliesRelatesWithinStepswith the same bound. - Relation.RelatesInSteps.succ'Relation.RelatesInSteps.succ'
- Relation.RelatesWithinSteps.apply_le_apply_addIf
h : α → ℕincreases by at most 1 on each step ofr, then the value ofhat the output is at mosthat the input plus the step… - Relation.RelatesInSteps.zeroRelation.RelatesInSteps.zero
- Relation.RelatesInSteps.reflTransGenRelation.RelatesInSteps.reflTransGen
- Relation.RelatesWithinSteps.transTransitivity of
RelatesWithinStepsin the sum of the step bounds. - Relation.RelatesWithinSteps.zeroRelation.RelatesWithinSteps.zero
- Relation.RelatesInSteps.apply_le_apply_addIf
h : α → ℕincreases by at most 1 on each step ofr, then the value ofhat the output is at mosthat the input plus the number… - Relation.RelatesInSteps.succRelation.RelatesInSteps.succ
- Relation.RelatesInSteps.succ'_iffRelation.RelatesInSteps.succ'_iff
- Cslib.Turing.SingleTapeTM.TimeComputable.idThe identity map on Symbol is computable in constant time.
- Relation.RelatesInSteps.mapIf
Lean source view module on GitHub
set_option autoImplicit true in set_option relaxedAutoImplicit true in variable {α : Type*} {r : α → α → Prop} {a b c : α} in /-- A relation `r` relates two elements of `α` in `n` steps if there is a chain of `n` pairs `(t_i, t_{i+1})` such that `r t_i t_{i+1}` for each `i`, starting from the first element and ending at the second. -/ inductive Relation.RelatesInSteps (r : α → α → Prop) : α → α → ℕ → Prop | refl (a : α) : RelatesInSteps r a a 0 | tail (t t' t'' : α) (n : ℕ) (h₁ : RelatesInSteps r t t' n) (h₂ : r t' t'') : RelatesInSteps r t t'' (n + 1)