Theorem: FOL.NV.replace_empty_Holds
Proof state before:
D : Type
I : Interpretation D
u v : VarName
a : D
hd : Definition
tl : List Definition
ih :
  ∀ (V : VarAssignment D) (F : Formula),
    ¬isFreeIn v F →
      ¬isBoundIn v F →
        (Holds D I (Function.updateITE V u a) tl F ↔
          Holds D I (Function.updateITE V v a) tl (Sub.Var.One.Rec.fastReplaceFree u v F))
X : DefName
xs : List VarName
V : VarAssignment D
h1 : ¬isFreeIn v (def_ X xs)
h2 : ¬isBoundIn v (def_ X xs)
⊢ (if X = hd.name ∧ xs.length = hd.args.length then
      Holds D I
        (Function.updateListITE (fun c => if c = u then a else V c) hd.args
          (List.map (fun c => if c = u then a else V c) xs))
        tl hd.q
    else Holds D I (fun c => if c = u then a else V c) tl (def_ X xs)) ↔
    if X = hd.name ∧ (List.map (fun x => if u = x then v else x) xs).length = hd.args.length then
      Holds D I
        (Function.updateListITE (fun c => if c = v then a else V c) hd.args
          (List.map (fun c => if c = v then a else V c) (List.map (fun x => if u = x then v else x) xs)))
        tl hd.q
    else Holds D I (fun c => if c = v then a else V c) tl (def_ X (List.map (fun x => if u = x then v else x) xs))
Tactic:
congr! 1
Proof state after:
case a.h₁.a
D : Type
I : Interpretation D
u v : VarName
a : D
hd : Definition
tl : List Definition
ih :
  ∀ (V : VarAssignment D) (F : Formula),
    ¬isFreeIn v F →
      ¬isBoundIn v F →
        (Holds D I (Function.updateITE V u a) tl F ↔
          Holds D I (Function.updateITE V v a) tl (Sub.Var.One.Rec.fastReplaceFree u v F))
X : DefName
xs : List VarName
V : VarAssignment D
h1 : ¬isFreeIn v (def_ X xs)
h2 : ¬isBoundIn v (def_ X xs)
⊢ X = hd.name ∧ xs.length = hd.args.length ↔
    X = hd.name ∧ (List.map (fun x => if u = x then v else x) xs).length = hd.args.length

case a.h₂.a
D : Type
I : Interpretation D
u v : VarName
a : D
hd : Definition
tl : List Definition
ih :
  ∀ (V : VarAssignment D) (F : Formula),
    ¬isFreeIn v F →
      ¬isBoundIn v F →
        (Holds D I (Function.updateITE V u a) tl F ↔
          Holds D I (Function.updateITE V v a) tl (Sub.Var.One.Rec.fastReplaceFree u v F))
X : DefName
xs : List VarName
V : VarAssignment D
h1 : ¬isFreeIn v (def_ X xs)
h2 : ¬isBoundIn v (def_ X xs)
a✝ : X = hd.name ∧ (List.map (fun x => if u = x then v else x) xs).length = hd.args.length
⊢ Holds D I
      (Function.updateListITE (fun c => if c = u then a else V c) hd.args
        (List.map (fun c => if c = u then a else V c) xs))
      tl hd.q ↔
    Holds D I
      (Function.updateListITE (fun c => if c = v then a else V c) hd.args
        (List.map (fun c => if c = v then a else V c) (List.map (fun x => if u = x then v else x) xs)))
      tl hd.q

case a.h₃.a
D : Type
I : Interpretation D
u v : VarName
a : D
hd : Definition
tl : List Definition
ih :
  ∀ (V : VarAssignment D) (F : Formula),
    ¬isFreeIn v F →
      ¬isBoundIn v F →
        (Holds D I (Function.updateITE V u a) tl F ↔
          Holds D I (Function.updateITE V v a) tl (Sub.Var.One.Rec.fastReplaceFree u v F))
X : DefName
xs : List VarName
V : VarAssignment D
h1 : ¬isFreeIn v (def_ X xs)
h2 : ¬isBoundIn v (def_ X xs)
a✝ : ¬(X = hd.name ∧ (List.map (fun x => if u = x then v else x) xs).length = hd.args.length)
⊢ Holds D I (fun c => if c = u then a else V c) tl (def_ X xs) ↔
    Holds D I (fun c => if c = v then a else V c) tl (def_ X (List.map (fun x => if u = x then v else x) xs))