Documentation

Pdl.Star

Helper Lemmas about the Kleene Star #

Nothing here is specific about PDL, but we prove some useful results about the reflexive-transitive closure ReflTransGen and the transitive closure TransGen.

theorem ReflTransGen.cases_tail_eq_neq {α : Type u_1} {x z : α} {r : α → α → Prop} (h : Relation.ReflTransGen r x z) :
x = z ∨ x ≠ z ∧ ∃ (y : α), x ≠ y ∧ r x y ∧ Relation.ReflTransGen r y z

A version of Relation.ReflTransGen.cases_tail also giving (in)equalities.

theorem ReflTransGen.to_finitelyManySteps {α : Type u_1} {x z : α} {r : α → α → Prop} (h : Relation.ReflTransGen r x z) :
∃ (n : ℕ), ∃ (ys : List.Vector α n.succ), x = ys.head ∧ z = ys.last ∧ ∀ (i : Fin n), r (ys.get i.castSucc) (ys.get i.succ)

ReflTransGen r a b implies ∃ x₀ ... xₙ, a = x₀ ∧ r x₀ x₁ ∧ ... ∧ xₙ = b. Similar to List.exists_chain_of_relationReflTransGen.

theorem ReflTransGen.from_finitelyManySteps {α : Type u_1} (r : α → α → Prop) {n : ℕ} (x z : α) (ys : List.Vector α n.succ) :
(x = ys.head ∧ z = ys.last ∧ ∀ (i : Fin n), r (ys.get i.castSucc) (ys.get i.succ)) → Relation.ReflTransGen r x z

a = x₀ ∧ r x₀ x₁ ∧ ... ∧ xₙ = b implies ReflTransGen r a b. Similar to List.relationReflTransGen_of_exists_chain in mathlib.

theorem ReflTransGen.iff_finitelyManySteps {α : Type u_1} (r : α → α → Prop) (x z : α) :
Relation.ReflTransGen r x z ↔ ∃ (n : ℕ), ∃ (ys : List.Vector α n.succ), x = ys.head ∧ z = ys.last ∧ ∀ (i : Fin n), r (ys.get i.castSucc) (ys.get i.succ)

ReflTransGen r a b is equivalent to ∃ x₀ ... xₙ, a = x₀ ∧ r x₀ x₁ ∧ ... ∧ r xₙ = b

theorem Relation.ReflTransGen_or_left {α : Type u_1} {r r' : α → α → Prop} {a b : α} :
ReflTransGen r a b → ReflTransGen (fun (x y : α) => r x y ∨ r' x y) a b
theorem Relation.ReflTransGen_or_right {α : Type u_1} {r r' : α → α → Prop} {a b : α} :
ReflTransGen r a b → ReflTransGen (fun (x y : α) => r' x y ∨ r x y) a b
theorem Relation.ReflTransGen_imp {α : Type u_1} {r r' : α → α → Prop} {a b : α} :
(∀ (x y : α), r x y → r' x y) → ReflTransGen r a b → ReflTransGen r' a b
theorem Relation.TransGen_or_left {α : Sort u_1} {r r' : α → α → Prop} {a b : α} :
TransGen r a b → TransGen (fun (x y : α) => r x y ∨ r' x y) a b
theorem Relation.TransGen_or_right {α : Sort u_1} {r r' : α → α → Prop} {a b : α} :
TransGen r a b → TransGen (fun (x y : α) => r' x y ∨ r x y) a b
theorem Relation.TransGen_imp {α : Sort u_1} {r r' : α → α → Prop} {a b : α} :
(∀ (x y : α), r x y → r' x y) → TransGen r a b → TransGen r' a b
theorem Relation.TransGen_of_ReflTransGen {α : Type} {r : α → α → Prop} {a b : α} (h : ReflTransGen r a b) (hne : a ≠ b) :
TransGen r a b
theorem Relation.TransGen.flip_iff (α : Type) {r : α → α → Prop} {a b : α} :
TransGen (flip r) a b ↔ TransGen r b a