Relation.RelatesWithinSteps
defimported Lean
RelatesWithinSteps is a variant of RelatesInSteps that allows for a loose bound. It states that a relates to b in *at most* n steps.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in variable {α : Type*} {r : α → α → Prop} {a b c : α} in def Relation.RelatesWithinSteps (r : α → α → Prop) (a b : α) (n : ℕ) : Prop
- Defined in
- CSLib, `Relation.RelatesWithinSteps`
- 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← Relation.RelatesWithinSteps (Cslib/Foundations/Data/RelatesInSteps.lean:154): verbatim
- Verified
- 08 Oct 2026
- Axioms
- none listed
- Built on 1
- 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…
- Relation.RelatesInStepsA relation
- Used by 13
- Relation.RelatesWithinSteps.mapIf
gis a homomorphism fromrtor'(i.e., it preserves the reduction relation), thenRelatesWithinStepsis preserved underg. - Relation.RelatesWithinSteps.of_leRelation.RelatesWithinSteps.of_le
- 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…
- Cslib.Turing.SingleTapeTM.OutputsWithinTimeA proof of
tmoutputtingl'on inputlin at mostmsteps. - Relation.RelatesWithinSteps.reflRelation.RelatesWithinSteps.refl
- Cslib.Turing.SingleTapeTM.comp_right_relatesWithinStepsSimulation for the second phase of the composed computer. When the second machine runs from start to halt, the composed machine runs from…
- Relation.RelatesWithinSteps.of_relatesInSteps
RelatesInStepsimpliesRelatesWithinStepswith the same bound. - Relation.RelatesWithinSteps.singleRelation.RelatesWithinSteps.single
- Cslib.Turing.SingleTapeTM.comp_left_relatesWithinStepsSimulation for the first phase of the composed computer. When the first machine runs from start to halt, the composed machine runs from…
- 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.RelatesWithinSteps.zero_iffRelation.RelatesWithinSteps.zero_iff
- Relation.RelatesWithinSteps.transTransitivity of
RelatesWithinStepsin the sum of the step bounds. - Relation.RelatesWithinSteps.zeroRelation.RelatesWithinSteps.zero
- Relation.RelatesWithinSteps.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 /-- `RelatesWithinSteps` is a variant of `RelatesInSteps` that allows for a loose bound. It states that `a` relates to `b` in *at most* `n` steps. -/ def Relation.RelatesWithinSteps (r : α → α → Prop) (a b : α) (n : ℕ) : Prop := ∃ m ≤ n, RelatesInSteps r a b m