Theorem: FOL.NV.Sub.Var.All.Rec.Inj.substitution_is_valid (FOL/NV/Sub/Var/All/Rec/Inj/ReplaceAll.lean)

State before:
F : Formula
σ : VarName → VarName
h1 : Function.Injective σ
h2 : F.IsValid
⊢ (replaceAll σ F).IsValid
Tactic:
simp only [IsValid] at h2
State after:
F : Formula
σ : VarName → VarName
h1 : Function.Injective σ
h2 : ∀ (D : Type) (I : Interpretation D) (V : VarAssignment D) (E : Env), Holds D I V E F
⊢ (replaceAll σ F).IsValid

State before:
F : Formula
σ : VarName → VarName
h1 : Function.Injective σ
h2 : ∀ (D : Type) (I : Interpretation D) (V : VarAssignment D) (E : Env), Holds D I V E F
⊢ (replaceAll σ F).IsValid
Tactic:
simp only [IsValid]
State after:
F : Formula
σ : VarName → VarName
h1 : Function.Injective σ
h2 : ∀ (D : Type) (I : Interpretation D) (V : VarAssignment D) (E : Env), Holds D I V E F
⊢ ∀ (D : Type) (I : Interpretation D) (V : VarAssignment D) (E : Env), Holds D I V E (replaceAll σ F)

State before:
F : Formula
σ : VarName → VarName
h1 : Function.Injective σ
h2 : ∀ (D : Type) (I : Interpretation D) (V : VarAssignment D) (E : Env), Holds D I V E F
⊢ ∀ (D : Type) (I : Interpretation D) (V : VarAssignment D) (E : Env), Holds D I V E (replaceAll σ F)
Tactic:
intro D I V E
State after:
F : Formula
σ : VarName → VarName
h1 : Function.Injective σ
h2 : ∀ (D : Type) (I : Interpretation D) (V : VarAssignment D) (E : Env), Holds D I V E F
D : Type
I : Interpretation D
V : VarAssignment D
E : Env
⊢ Holds D I V E (replaceAll σ F)

State before:
F : Formula
σ : VarName → VarName
h1 : Function.Injective σ
h2 : ∀ (D : Type) (I : Interpretation D) (V : VarAssignment D) (E : Env), Holds D I V E F
D : Type
I : Interpretation D
V : VarAssignment D
E : Env
⊢ Holds D I V E (replaceAll σ F)
Tactic:
simp only [← substitution_theorem D I V E F σ h1]
State after:
F : Formula
σ : VarName → VarName
h1 : Function.Injective σ
h2 : ∀ (D : Type) (I : Interpretation D) (V : VarAssignment D) (E : Env), Holds D I V E F
D : Type
I : Interpretation D
V : VarAssignment D
E : Env
⊢ Holds D I (V ∘ σ) E F

State before:
F : Formula
σ : VarName → VarName
h1 : Function.Injective σ
h2 : ∀ (D : Type) (I : Interpretation D) (V : VarAssignment D) (E : Env), Holds D I V E F
D : Type
I : Interpretation D
V : VarAssignment D
E : Env
⊢ Holds D I (V ∘ σ) E F
Tactic:
apply h2
State after:
no goals