Theorem: FOL.NV.Sub.Var.One.Rec.fastReplaceFree_inverse
Proof state before:
case pred_const_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
h1 : ¬occursIn t (pred_const_ a✝¹ a✝)
⊢ fastReplaceFree t v (fastReplaceFree v t (pred_const_ a✝¹ a✝)) = pred_const_ a✝¹ a✝

case pred_var_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
h1 : ¬occursIn t (pred_var_ a✝¹ a✝)
⊢ fastReplaceFree t v (fastReplaceFree v t (pred_var_ a✝¹ a✝)) = pred_var_ a✝¹ a✝

case eq_
v t a✝¹ a✝ : VarName
h1 : ¬occursIn t (eq_ a✝¹ a✝)
⊢ fastReplaceFree t v (fastReplaceFree v t (eq_ a✝¹ a✝)) = eq_ a✝¹ a✝

case true_
v t : VarName
h1 : ¬occursIn t true_
⊢ fastReplaceFree t v (fastReplaceFree v t true_) = true_

case false_
v t : VarName
h1 : ¬occursIn t false_
⊢ fastReplaceFree t v (fastReplaceFree v t false_) = false_

case not_
v t : VarName
a✝ : Formula
a_ih✝ : ¬occursIn t a✝ → fastReplaceFree t v (fastReplaceFree v t a✝) = a✝
h1 : ¬occursIn t a✝.not_
⊢ fastReplaceFree t v (fastReplaceFree v t a✝.not_) = a✝.not_

case imp_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬occursIn t a✝¹ → fastReplaceFree t v (fastReplaceFree v t a✝¹) = a✝¹
a_ih✝ : ¬occursIn t a✝ → fastReplaceFree t v (fastReplaceFree v t a✝) = a✝
h1 : ¬occursIn t (a✝¹.imp_ a✝)
⊢ fastReplaceFree t v (fastReplaceFree v t (a✝¹.imp_ a✝)) = a✝¹.imp_ a✝

case and_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬occursIn t a✝¹ → fastReplaceFree t v (fastReplaceFree v t a✝¹) = a✝¹
a_ih✝ : ¬occursIn t a✝ → fastReplaceFree t v (fastReplaceFree v t a✝) = a✝
h1 : ¬occursIn t (a✝¹.and_ a✝)
⊢ fastReplaceFree t v (fastReplaceFree v t (a✝¹.and_ a✝)) = a✝¹.and_ a✝

case or_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬occursIn t a✝¹ → fastReplaceFree t v (fastReplaceFree v t a✝¹) = a✝¹
a_ih✝ : ¬occursIn t a✝ → fastReplaceFree t v (fastReplaceFree v t a✝) = a✝
h1 : ¬occursIn t (a✝¹.or_ a✝)
⊢ fastReplaceFree t v (fastReplaceFree v t (a✝¹.or_ a✝)) = a✝¹.or_ a✝

case iff_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬occursIn t a✝¹ → fastReplaceFree t v (fastReplaceFree v t a✝¹) = a✝¹
a_ih✝ : ¬occursIn t a✝ → fastReplaceFree t v (fastReplaceFree v t a✝) = a✝
h1 : ¬occursIn t (a✝¹.iff_ a✝)
⊢ fastReplaceFree t v (fastReplaceFree v t (a✝¹.iff_ a✝)) = a✝¹.iff_ a✝

case forall_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ¬occursIn t a✝ → fastReplaceFree t v (fastReplaceFree v t a✝) = a✝
h1 : ¬occursIn t (forall_ a✝¹ a✝)
⊢ fastReplaceFree t v (fastReplaceFree v t (forall_ a✝¹ a✝)) = forall_ a✝¹ a✝

case exists_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ¬occursIn t a✝ → fastReplaceFree t v (fastReplaceFree v t a✝) = a✝
h1 : ¬occursIn t (exists_ a✝¹ a✝)
⊢ fastReplaceFree t v (fastReplaceFree v t (exists_ a✝¹ a✝)) = exists_ a✝¹ a✝

case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
h1 : ¬occursIn t (def_ a✝¹ a✝)
⊢ fastReplaceFree t v (fastReplaceFree v t (def_ a✝¹ a✝)) = def_ a✝¹ a✝
Tactic:
any_goals
  simp only [occursIn] at h1
  simp only [fastReplaceFree]
Proof state after:
case pred_const_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
h1 : t ∉ a✝
⊢ pred_const_ a✝¹ (List.map (fun x => if t = x then v else x) (List.map (fun x => if v = x then t else x) a✝)) =
    pred_const_ a✝¹ a✝

case pred_var_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
h1 : t ∉ a✝
⊢ pred_var_ a✝¹ (List.map (fun x => if t = x then v else x) (List.map (fun x => if v = x then t else x) a✝)) =
    pred_var_ a✝¹ a✝

case eq_
v t a✝¹ a✝ : VarName
h1 : ¬(t = a✝¹ ∨ t = a✝)
⊢ eq_ (if t = if v = a✝¹ then t else a✝¹ then v else if v = a✝¹ then t else a✝¹)
      (if t = if v = a✝ then t else a✝ then v else if v = a✝ then t else a✝) =
    eq_ a✝¹ a✝

case not_
v t : VarName
a✝ : Formula
a_ih✝ : ¬occursIn t a✝ → fastReplaceFree t v (fastReplaceFree v t a✝) = a✝
h1 : ¬occursIn t a✝
⊢ (fastReplaceFree t v (fastReplaceFree v t a✝)).not_ = a✝.not_

case imp_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬occursIn t a✝¹ → fastReplaceFree t v (fastReplaceFree v t a✝¹) = a✝¹
a_ih✝ : ¬occursIn t a✝ → fastReplaceFree t v (fastReplaceFree v t a✝) = a✝
h1 : ¬(occursIn t a✝¹ ∨ occursIn t a✝)
⊢ (fastReplaceFree t v (fastReplaceFree v t a✝¹)).imp_ (fastReplaceFree t v (fastReplaceFree v t a✝)) = a✝¹.imp_ a✝

case and_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬occursIn t a✝¹ → fastReplaceFree t v (fastReplaceFree v t a✝¹) = a✝¹
a_ih✝ : ¬occursIn t a✝ → fastReplaceFree t v (fastReplaceFree v t a✝) = a✝
h1 : ¬(occursIn t a✝¹ ∨ occursIn t a✝)
⊢ (fastReplaceFree t v (fastReplaceFree v t a✝¹)).and_ (fastReplaceFree t v (fastReplaceFree v t a✝)) = a✝¹.and_ a✝

case or_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬occursIn t a✝¹ → fastReplaceFree t v (fastReplaceFree v t a✝¹) = a✝¹
a_ih✝ : ¬occursIn t a✝ → fastReplaceFree t v (fastReplaceFree v t a✝) = a✝
h1 : ¬(occursIn t a✝¹ ∨ occursIn t a✝)
⊢ (fastReplaceFree t v (fastReplaceFree v t a✝¹)).or_ (fastReplaceFree t v (fastReplaceFree v t a✝)) = a✝¹.or_ a✝

case iff_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬occursIn t a✝¹ → fastReplaceFree t v (fastReplaceFree v t a✝¹) = a✝¹
a_ih✝ : ¬occursIn t a✝ → fastReplaceFree t v (fastReplaceFree v t a✝) = a✝
h1 : ¬(occursIn t a✝¹ ∨ occursIn t a✝)
⊢ (fastReplaceFree t v (fastReplaceFree v t a✝¹)).iff_ (fastReplaceFree t v (fastReplaceFree v t a✝)) = a✝¹.iff_ a✝

case forall_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ¬occursIn t a✝ → fastReplaceFree t v (fastReplaceFree v t a✝) = a✝
h1 : ¬(t = a✝¹ ∨ occursIn t a✝)
⊢ fastReplaceFree t v (if v = a✝¹ then forall_ a✝¹ a✝ else forall_ a✝¹ (fastReplaceFree v t a✝)) = forall_ a✝¹ a✝

case exists_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ¬occursIn t a✝ → fastReplaceFree t v (fastReplaceFree v t a✝) = a✝
h1 : ¬(t = a✝¹ ∨ occursIn t a✝)
⊢ fastReplaceFree t v (if v = a✝¹ then exists_ a✝¹ a✝ else exists_ a✝¹ (fastReplaceFree v t a✝)) = exists_ a✝¹ a✝

case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
h1 : t ∉ a✝
⊢ def_ a✝¹ (List.map (fun x => if t = x then v else x) (List.map (fun x => if v = x then t else x) a✝)) = def_ a✝¹ a✝