Theorem: substitutionLemmaRel (Pdl/Substitution.lean)

State before:
σ : Substitution
α : Program
W : Type
M : KripkeModel W
w v : W
⊢ relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
Tactic:
cases α
State after:
case atom_prog
σ : Substitution
W : Type
M : KripkeModel W
w v : W
a✝ : ℕ
⊢ relate M (subst_in_P σ (·a✝)) w v ↔ relate (subst_in_model σ M) (·a✝) w v

case sequence
σ : Substitution
W : Type
M : KripkeModel W
w v : W
a✝¹ a✝ : Program
⊢ relate M (subst_in_P σ (a✝¹;'a✝)) w v ↔ relate (subst_in_model σ M) (a✝¹;'a✝) w v

case union
σ : Substitution
W : Type
M : KripkeModel W
w v : W
a✝¹ a✝ : Program
⊢ relate M (subst_in_P σ (a✝¹⋓a✝)) w v ↔ relate (subst_in_model σ M) (a✝¹⋓a✝) w v

case star
σ : Substitution
W : Type
M : KripkeModel W
w v : W
a✝ : Program
⊢ relate M (subst_in_P σ (∗a✝)) w v ↔ relate (subst_in_model σ M) (∗a✝) w v

case test
σ : Substitution
W : Type
M : KripkeModel W
w v : W
a✝ : Formula
⊢ relate M (subst_in_P σ (?'a✝)) w v ↔ relate (subst_in_model σ M) (?'a✝) w v

State before:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
a : ℕ
⊢ relate M (subst_in_P σ (·a)) w v ↔ relate (subst_in_model σ M) (·a) w v
Tactic:
case atom_prog a =>
  simp [subst_in_model]
State after:
no goals

State before:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α β : Program
⊢ relate M (subst_in_P σ (α;'β)) w v ↔ relate (subst_in_model σ M) (α;'β) w v
Tactic:
case sequence α β =>
  have IHα := substitutionLemmaRel σ α M
  have IHβ := substitutionLemmaRel σ β M
  simp_all only [subst_in_P, relate]
State after:
no goals

State before:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α β : Program
⊢ relate M (subst_in_P σ (α⋓β)) w v ↔ relate (subst_in_model σ M) (α⋓β) w v
Tactic:
case union α β =>
  have IHα := substitutionLemmaRel σ α M
  have IHβ := substitutionLemmaRel σ β M
  simp_all only [subst_in_P, relate]
State after:
no goals

State before:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α : Program
⊢ relate M (subst_in_P σ (∗α)) w v ↔ relate (subst_in_model σ M) (∗α) w v
Tactic:
case star α =>
  have IHα := substitutionLemmaRel σ α M
  simp_all only [subst_in_P, relate]
  constructor
  all_goals
    apply Relation.ReflTransGen.mono
    intro w v
    rw [IHα w v]
    tauto
State after:
no goals

State before:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
φ : Formula
⊢ relate M (subst_in_P σ (?'φ)) w v ↔ relate (subst_in_model σ M) (?'φ) w v
Tactic:
case test φ =>
  have IHφ := substitutionLemma σ φ M v
  simp only [subst_in_P, relate, and_congr_right_iff, evaluatePoint, modelCanSemImplyForm] at *
  intro w_is_v
  subst w_is_v
  exact IHφ
State after:
no goals

State before:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
a : ℕ
⊢ relate M (subst_in_P σ (·a)) w v ↔ relate (subst_in_model σ M) (·a) w v
Tactic:
simp [subst_in_model]
State after:
no goals

State before:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α β : Program
⊢ relate M (subst_in_P σ (α;'β)) w v ↔ relate (subst_in_model σ M) (α;'β) w v
Tactic:
have IHα := substitutionLemmaRel σ α M
State after:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α β : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
⊢ relate M (subst_in_P σ (α;'β)) w v ↔ relate (subst_in_model σ M) (α;'β) w v

State before:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α β : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
⊢ relate M (subst_in_P σ (α;'β)) w v ↔ relate (subst_in_model σ M) (α;'β) w v
Tactic:
have IHβ := substitutionLemmaRel σ β M
State after:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α β : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
IHβ : ∀ (w v : W), relate M (subst_in_P σ β) w v ↔ relate (subst_in_model σ M) β w v
⊢ relate M (subst_in_P σ (α;'β)) w v ↔ relate (subst_in_model σ M) (α;'β) w v

State before:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α β : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
IHβ : ∀ (w v : W), relate M (subst_in_P σ β) w v ↔ relate (subst_in_model σ M) β w v
⊢ relate M (subst_in_P σ (α;'β)) w v ↔ relate (subst_in_model σ M) (α;'β) w v
Tactic:
simp_all only [subst_in_P, relate]
State after:
no goals

State before:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α β : Program
⊢ relate M (subst_in_P σ (α⋓β)) w v ↔ relate (subst_in_model σ M) (α⋓β) w v
Tactic:
have IHα := substitutionLemmaRel σ α M
State after:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α β : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
⊢ relate M (subst_in_P σ (α⋓β)) w v ↔ relate (subst_in_model σ M) (α⋓β) w v

State before:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α β : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
⊢ relate M (subst_in_P σ (α⋓β)) w v ↔ relate (subst_in_model σ M) (α⋓β) w v
Tactic:
have IHβ := substitutionLemmaRel σ β M
State after:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α β : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
IHβ : ∀ (w v : W), relate M (subst_in_P σ β) w v ↔ relate (subst_in_model σ M) β w v
⊢ relate M (subst_in_P σ (α⋓β)) w v ↔ relate (subst_in_model σ M) (α⋓β) w v

State before:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α β : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
IHβ : ∀ (w v : W), relate M (subst_in_P σ β) w v ↔ relate (subst_in_model σ M) β w v
⊢ relate M (subst_in_P σ (α⋓β)) w v ↔ relate (subst_in_model σ M) (α⋓β) w v
Tactic:
simp_all only [subst_in_P, relate]
State after:
no goals

State before:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α : Program
⊢ relate M (subst_in_P σ (∗α)) w v ↔ relate (subst_in_model σ M) (∗α) w v
Tactic:
have IHα := substitutionLemmaRel σ α M
State after:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
⊢ relate M (subst_in_P σ (∗α)) w v ↔ relate (subst_in_model σ M) (∗α) w v

State before:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
⊢ relate M (subst_in_P σ (∗α)) w v ↔ relate (subst_in_model σ M) (∗α) w v
Tactic:
simp_all only [subst_in_P, relate]
State after:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
⊢ Relation.ReflTransGen (relate M (subst_in_P σ α)) w v ↔ Relation.ReflTransGen (relate (subst_in_model σ M) α) w v

State before:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
⊢ Relation.ReflTransGen (relate M (subst_in_P σ α)) w v ↔ Relation.ReflTransGen (relate (subst_in_model σ M) α) w v
Tactic:
constructor
State after:
case mp
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
⊢ Relation.ReflTransGen (relate M (subst_in_P σ α)) w v → Relation.ReflTransGen (relate (subst_in_model σ M) α) w v

case mpr
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
⊢ Relation.ReflTransGen (relate (subst_in_model σ M) α) w v → Relation.ReflTransGen (relate M (subst_in_P σ α)) w v

State before:
case mp
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
⊢ Relation.ReflTransGen (relate M (subst_in_P σ α)) w v → Relation.ReflTransGen (relate (subst_in_model σ M) α) w v

case mpr
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
⊢ Relation.ReflTransGen (relate (subst_in_model σ M) α) w v → Relation.ReflTransGen (relate M (subst_in_P σ α)) w v
Tactic:
all_goals
  apply Relation.ReflTransGen.mono
  intro w v
  rw [IHα w v]
  tauto
State after:
no goals

State before:
case mpr
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
⊢ Relation.ReflTransGen (relate (subst_in_model σ M) α) w v → Relation.ReflTransGen (relate M (subst_in_P σ α)) w v
Tactic:
apply Relation.ReflTransGen.mono
State after:
case mpr.a
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
⊢ ∀ (a b : W), relate (subst_in_model σ M) α a b → relate M (subst_in_P σ α) a b

State before:
case mpr.a
σ : Substitution
W : Type
M : KripkeModel W
w v : W
α : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
⊢ ∀ (a b : W), relate (subst_in_model σ M) α a b → relate M (subst_in_P σ α) a b
Tactic:
intro w v
State after:
case mpr.a
σ : Substitution
W : Type
M : KripkeModel W
w✝ v✝ : W
α : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
w v : W
⊢ relate (subst_in_model σ M) α w v → relate M (subst_in_P σ α) w v

State before:
case mpr.a
σ : Substitution
W : Type
M : KripkeModel W
w✝ v✝ : W
α : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
w v : W
⊢ relate (subst_in_model σ M) α w v → relate M (subst_in_P σ α) w v
Tactic:
rw [IHα w v]
State after:
case mpr.a
σ : Substitution
W : Type
M : KripkeModel W
w✝ v✝ : W
α : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
w v : W
⊢ relate (subst_in_model σ M) α w v → relate (subst_in_model σ M) α w v

State before:
case mpr.a
σ : Substitution
W : Type
M : KripkeModel W
w✝ v✝ : W
α : Program
IHα : ∀ (w v : W), relate M (subst_in_P σ α) w v ↔ relate (subst_in_model σ M) α w v
w v : W
⊢ relate (subst_in_model σ M) α w v → relate (subst_in_model σ M) α w v
Tactic:
tauto
State after:
no goals

State before:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
φ : Formula
⊢ relate M (subst_in_P σ (?'φ)) w v ↔ relate (subst_in_model σ M) (?'φ) w v
Tactic:
have IHφ := substitutionLemma σ φ M v
State after:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
φ : Formula
IHφ : (M, v)⊨subst_in_F σ φ ↔ (subst_in_model σ M, v)⊨φ
⊢ relate M (subst_in_P σ (?'φ)) w v ↔ relate (subst_in_model σ M) (?'φ) w v

State before:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
φ : Formula
IHφ : (M, v)⊨subst_in_F σ φ ↔ (subst_in_model σ M, v)⊨φ
⊢ relate M (subst_in_P σ (?'φ)) w v ↔ relate (subst_in_model σ M) (?'φ) w v
Tactic:
simp only [subst_in_P, relate, and_congr_right_iff, evaluatePoint, modelCanSemImplyForm] at *
State after:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
φ : Formula
IHφ : evaluate M v (subst_in_F σ φ) ↔ evaluate (subst_in_model σ M) v φ
⊢ w = v → (evaluate M w (subst_in_F σ φ) ↔ evaluate (subst_in_model σ M) w φ)

State before:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
φ : Formula
IHφ : evaluate M v (subst_in_F σ φ) ↔ evaluate (subst_in_model σ M) v φ
⊢ w = v → (evaluate M w (subst_in_F σ φ) ↔ evaluate (subst_in_model σ M) w φ)
Tactic:
intro w_is_v
State after:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
φ : Formula
IHφ : evaluate M v (subst_in_F σ φ) ↔ evaluate (subst_in_model σ M) v φ
w_is_v : w = v
⊢ evaluate M w (subst_in_F σ φ) ↔ evaluate (subst_in_model σ M) w φ

State before:
σ : Substitution
W : Type
M : KripkeModel W
w v : W
φ : Formula
IHφ : evaluate M v (subst_in_F σ φ) ↔ evaluate (subst_in_model σ M) v φ
w_is_v : w = v
⊢ evaluate M w (subst_in_F σ φ) ↔ evaluate (subst_in_model σ M) w φ
Tactic:
subst w_is_v
State after:
σ : Substitution
W : Type
M : KripkeModel W
w : W
φ : Formula
IHφ : evaluate M w (subst_in_F σ φ) ↔ evaluate (subst_in_model σ M) w φ
⊢ evaluate M w (subst_in_F σ φ) ↔ evaluate (subst_in_model σ M) w φ

State before:
σ : Substitution
W : Type
M : KripkeModel W
w : W
φ : Formula
IHφ : evaluate M w (subst_in_F σ φ) ↔ evaluate (subst_in_model σ M) w φ
⊢ evaluate M w (subst_in_F σ φ) ↔ evaluate (subst_in_model σ M) w φ
Tactic:
exact IHφ
State after:
no goals