Theorem: FOL.NV.Sub.Var.All.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
hd : Definition
tl : List Definition
ih :
  ∀ (V V' : VarAssignment D) (σ σ' : VarName → VarName) (binders : Finset VarName) (F : Formula),
    admitsAux σ binders F →
      (∀ (v : VarName), v ∈ binders ∨ σ' v ∉ binders → V v = V' (σ' v)) →
        (∀ v ∈ binders, v = σ' v) →
          (∀ v ∉ binders, σ' v = σ v) → (Holds D I V tl F ↔ Holds D I V' tl (fastReplaceFree σ' F))
X : DefName
xs : List VarName
V V' : VarAssignment D
σ σ' : VarName → VarName
binders : Finset VarName
h1 : ∀ v ∈ xs, v ∉ binders → σ v ∉ binders
h2 : ∀ (v : VarName), v ∈ binders ∨ σ' v ∉ binders → V v = V' (σ' v)
h2' : ∀ v ∈ binders, v = σ' v
h3 : ∀ v ∉ binders, σ' v = σ v
⊢ (if X = hd.name ∧ xs.length = hd.args.length then Holds D I (Function.updateListITE V hd.args (List.map V xs)) tl hd.q
    else Holds D I V tl (def_ X xs)) ↔
    if X = hd.name ∧ (List.map σ' xs).length = hd.args.length then
      Holds D I (Function.updateListITE V' hd.args (List.map V' (List.map σ' xs))) tl hd.q
    else Holds D I V' tl (def_ X (List.map σ' xs))
Tactic:
split_ifs
Proof state after:
case pos
D : Type
I : Interpretation D
hd : Definition
tl : List Definition
ih :
  ∀ (V V' : VarAssignment D) (σ σ' : VarName → VarName) (binders : Finset VarName) (F : Formula),
    admitsAux σ binders F →
      (∀ (v : VarName), v ∈ binders ∨ σ' v ∉ binders → V v = V' (σ' v)) →
        (∀ v ∈ binders, v = σ' v) →
          (∀ v ∉ binders, σ' v = σ v) → (Holds D I V tl F ↔ Holds D I V' tl (fastReplaceFree σ' F))
X : DefName
xs : List VarName
V V' : VarAssignment D
σ σ' : VarName → VarName
binders : Finset VarName
h1 : ∀ v ∈ xs, v ∉ binders → σ v ∉ binders
h2 : ∀ (v : VarName), v ∈ binders ∨ σ' v ∉ binders → V v = V' (σ' v)
h2' : ∀ v ∈ binders, v = σ' v
h3 : ∀ v ∉ binders, σ' v = σ v
h✝¹ : X = hd.name ∧ xs.length = hd.args.length
h✝ : X = hd.name ∧ (List.map σ' xs).length = hd.args.length
⊢ Holds D I (Function.updateListITE V hd.args (List.map V xs)) tl hd.q ↔
    Holds D I (Function.updateListITE V' hd.args (List.map V' (List.map σ' xs))) tl hd.q

case neg
D : Type
I : Interpretation D
hd : Definition
tl : List Definition
ih :
  ∀ (V V' : VarAssignment D) (σ σ' : VarName → VarName) (binders : Finset VarName) (F : Formula),
    admitsAux σ binders F →
      (∀ (v : VarName), v ∈ binders ∨ σ' v ∉ binders → V v = V' (σ' v)) →
        (∀ v ∈ binders, v = σ' v) →
          (∀ v ∉ binders, σ' v = σ v) → (Holds D I V tl F ↔ Holds D I V' tl (fastReplaceFree σ' F))
X : DefName
xs : List VarName
V V' : VarAssignment D
σ σ' : VarName → VarName
binders : Finset VarName
h1 : ∀ v ∈ xs, v ∉ binders → σ v ∉ binders
h2 : ∀ (v : VarName), v ∈ binders ∨ σ' v ∉ binders → V v = V' (σ' v)
h2' : ∀ v ∈ binders, v = σ' v
h3 : ∀ v ∉ binders, σ' v = σ v
h✝¹ : X = hd.name ∧ xs.length = hd.args.length
h✝ : ¬(X = hd.name ∧ (List.map σ' xs).length = hd.args.length)
⊢ Holds D I (Function.updateListITE V hd.args (List.map V xs)) tl hd.q ↔ Holds D I V' tl (def_ X (List.map σ' xs))

case pos
D : Type
I : Interpretation D
hd : Definition
tl : List Definition
ih :
  ∀ (V V' : VarAssignment D) (σ σ' : VarName → VarName) (binders : Finset VarName) (F : Formula),
    admitsAux σ binders F →
      (∀ (v : VarName), v ∈ binders ∨ σ' v ∉ binders → V v = V' (σ' v)) →
        (∀ v ∈ binders, v = σ' v) →
          (∀ v ∉ binders, σ' v = σ v) → (Holds D I V tl F ↔ Holds D I V' tl (fastReplaceFree σ' F))
X : DefName
xs : List VarName
V V' : VarAssignment D
σ σ' : VarName → VarName
binders : Finset VarName
h1 : ∀ v ∈ xs, v ∉ binders → σ v ∉ binders
h2 : ∀ (v : VarName), v ∈ binders ∨ σ' v ∉ binders → V v = V' (σ' v)
h2' : ∀ v ∈ binders, v = σ' v
h3 : ∀ v ∉ binders, σ' v = σ v
h✝¹ : ¬(X = hd.name ∧ xs.length = hd.args.length)
h✝ : X = hd.name ∧ (List.map σ' xs).length = hd.args.length
⊢ Holds D I V tl (def_ X xs) ↔ Holds D I (Function.updateListITE V' hd.args (List.map V' (List.map σ' xs))) tl hd.q

case neg
D : Type
I : Interpretation D
hd : Definition
tl : List Definition
ih :
  ∀ (V V' : VarAssignment D) (σ σ' : VarName → VarName) (binders : Finset VarName) (F : Formula),
    admitsAux σ binders F →
      (∀ (v : VarName), v ∈ binders ∨ σ' v ∉ binders → V v = V' (σ' v)) →
        (∀ v ∈ binders, v = σ' v) →
          (∀ v ∉ binders, σ' v = σ v) → (Holds D I V tl F ↔ Holds D I V' tl (fastReplaceFree σ' F))
X : DefName
xs : List VarName
V V' : VarAssignment D
σ σ' : VarName → VarName
binders : Finset VarName
h1 : ∀ v ∈ xs, v ∉ binders → σ v ∉ binders
h2 : ∀ (v : VarName), v ∈ binders ∨ σ' v ∉ binders → V v = V' (σ' v)
h2' : ∀ v ∈ binders, v = σ' v
h3 : ∀ v ∉ binders, σ' v = σ v
h✝¹ : ¬(X = hd.name ∧ xs.length = hd.args.length)
h✝ : ¬(X = hd.name ∧ (List.map σ' xs).length = hd.args.length)
⊢ Holds D I V tl (def_ X xs) ↔ Holds D I V' tl (def_ X (List.map σ' xs))