Theorem: FOL.NV.Sub.Var.All.Rec.replaceFreeAux_same_on_free
Proof state before:
case pred_const_
σ σ' : VarName → VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ binders (pred_const_ a✝¹ a✝) = replaceFreeAux σ' binders (pred_const_ a✝¹ a✝)

case pred_var_
σ σ' : VarName → VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ binders (pred_var_ a✝¹ a✝) = replaceFreeAux σ' binders (pred_var_ a✝¹ a✝)

case eq_
σ σ' : VarName → VarName
a✝¹ a✝ : VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ binders (eq_ a✝¹ a✝) = replaceFreeAux σ' binders (eq_ a✝¹ a✝)

case true_
σ σ' : VarName → VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ binders true_ = replaceFreeAux σ' binders true_

case false_
σ σ' : VarName → VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ binders false_ = replaceFreeAux σ' binders false_

case not_
σ σ' : VarName → VarName
a✝ : Formula
a_ih✝ :
  ∀ (binders : Finset VarName), (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝ = replaceFreeAux σ' binders a✝
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ binders a✝.not_ = replaceFreeAux σ' binders a✝.not_

case imp_
σ σ' : VarName → VarName
a✝¹ a✝ : Formula
a_ih✝¹ :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝¹ = replaceFreeAux σ' binders a✝¹
a_ih✝ :
  ∀ (binders : Finset VarName), (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝ = replaceFreeAux σ' binders a✝
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ binders (a✝¹.imp_ a✝) = replaceFreeAux σ' binders (a✝¹.imp_ a✝)

case and_
σ σ' : VarName → VarName
a✝¹ a✝ : Formula
a_ih✝¹ :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝¹ = replaceFreeAux σ' binders a✝¹
a_ih✝ :
  ∀ (binders : Finset VarName), (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝ = replaceFreeAux σ' binders a✝
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ binders (a✝¹.and_ a✝) = replaceFreeAux σ' binders (a✝¹.and_ a✝)

case or_
σ σ' : VarName → VarName
a✝¹ a✝ : Formula
a_ih✝¹ :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝¹ = replaceFreeAux σ' binders a✝¹
a_ih✝ :
  ∀ (binders : Finset VarName), (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝ = replaceFreeAux σ' binders a✝
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ binders (a✝¹.or_ a✝) = replaceFreeAux σ' binders (a✝¹.or_ a✝)

case iff_
σ σ' : VarName → VarName
a✝¹ a✝ : Formula
a_ih✝¹ :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝¹ = replaceFreeAux σ' binders a✝¹
a_ih✝ :
  ∀ (binders : Finset VarName), (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝ = replaceFreeAux σ' binders a✝
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ binders (a✝¹.iff_ a✝) = replaceFreeAux σ' binders (a✝¹.iff_ a✝)

case forall_
σ σ' : VarName → VarName
a✝¹ : VarName
a✝ : Formula
a_ih✝ :
  ∀ (binders : Finset VarName), (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝ = replaceFreeAux σ' binders a✝
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ binders (forall_ a✝¹ a✝) = replaceFreeAux σ' binders (forall_ a✝¹ a✝)

case exists_
σ σ' : VarName → VarName
a✝¹ : VarName
a✝ : Formula
a_ih✝ :
  ∀ (binders : Finset VarName), (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝ = replaceFreeAux σ' binders a✝
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ binders (exists_ a✝¹ a✝) = replaceFreeAux σ' binders (exists_ a✝¹ a✝)

case def_
σ σ' : VarName → VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ binders (def_ a✝¹ a✝) = replaceFreeAux σ' binders (def_ a✝¹ a✝)
Tactic:
all_goals
  simp only [replaceFreeAux]
Proof state after:
case pred_const_
σ σ' : VarName → VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ pred_const_ a✝¹ (List.map (fun x => if x ∉ binders then σ x else x) a✝) =
    pred_const_ a✝¹ (List.map (fun x => if x ∉ binders then σ' x else x) a✝)

case pred_var_
σ σ' : VarName → VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ pred_var_ a✝¹ (List.map (fun x => if x ∉ binders then σ x else x) a✝) =
    pred_var_ a✝¹ (List.map (fun x => if x ∉ binders then σ' x else x) a✝)

case eq_
σ σ' : VarName → VarName
a✝¹ a✝ : VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ eq_ (if a✝¹ ∉ binders then σ a✝¹ else a✝¹) (if a✝ ∉ binders then σ a✝ else a✝) =
    eq_ (if a✝¹ ∉ binders then σ' a✝¹ else a✝¹) (if a✝ ∉ binders then σ' a✝ else a✝)

case not_
σ σ' : VarName → VarName
a✝ : Formula
a_ih✝ :
  ∀ (binders : Finset VarName), (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝ = replaceFreeAux σ' binders a✝
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ (replaceFreeAux σ binders a✝).not_ = (replaceFreeAux σ' binders a✝).not_

case imp_
σ σ' : VarName → VarName
a✝¹ a✝ : Formula
a_ih✝¹ :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝¹ = replaceFreeAux σ' binders a✝¹
a_ih✝ :
  ∀ (binders : Finset VarName), (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝ = replaceFreeAux σ' binders a✝
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ (replaceFreeAux σ binders a✝¹).imp_ (replaceFreeAux σ binders a✝) =
    (replaceFreeAux σ' binders a✝¹).imp_ (replaceFreeAux σ' binders a✝)

case and_
σ σ' : VarName → VarName
a✝¹ a✝ : Formula
a_ih✝¹ :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝¹ = replaceFreeAux σ' binders a✝¹
a_ih✝ :
  ∀ (binders : Finset VarName), (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝ = replaceFreeAux σ' binders a✝
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ (replaceFreeAux σ binders a✝¹).and_ (replaceFreeAux σ binders a✝) =
    (replaceFreeAux σ' binders a✝¹).and_ (replaceFreeAux σ' binders a✝)

case or_
σ σ' : VarName → VarName
a✝¹ a✝ : Formula
a_ih✝¹ :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝¹ = replaceFreeAux σ' binders a✝¹
a_ih✝ :
  ∀ (binders : Finset VarName), (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝ = replaceFreeAux σ' binders a✝
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ (replaceFreeAux σ binders a✝¹).or_ (replaceFreeAux σ binders a✝) =
    (replaceFreeAux σ' binders a✝¹).or_ (replaceFreeAux σ' binders a✝)

case iff_
σ σ' : VarName → VarName
a✝¹ a✝ : Formula
a_ih✝¹ :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝¹ = replaceFreeAux σ' binders a✝¹
a_ih✝ :
  ∀ (binders : Finset VarName), (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝ = replaceFreeAux σ' binders a✝
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ (replaceFreeAux σ binders a✝¹).iff_ (replaceFreeAux σ binders a✝) =
    (replaceFreeAux σ' binders a✝¹).iff_ (replaceFreeAux σ' binders a✝)

case forall_
σ σ' : VarName → VarName
a✝¹ : VarName
a✝ : Formula
a_ih✝ :
  ∀ (binders : Finset VarName), (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝ = replaceFreeAux σ' binders a✝
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ forall_ a✝¹ (replaceFreeAux σ (binders ∪ {a✝¹}) a✝) = forall_ a✝¹ (replaceFreeAux σ' (binders ∪ {a✝¹}) a✝)

case exists_
σ σ' : VarName → VarName
a✝¹ : VarName
a✝ : Formula
a_ih✝ :
  ∀ (binders : Finset VarName), (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders a✝ = replaceFreeAux σ' binders a✝
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ exists_ a✝¹ (replaceFreeAux σ (binders ∪ {a✝¹}) a✝) = exists_ a✝¹ (replaceFreeAux σ' (binders ∪ {a✝¹}) a✝)

case def_
σ σ' : VarName → VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ def_ a✝¹ (List.map (fun x => if x ∉ binders then σ x else x) a✝) =
    def_ a✝¹ (List.map (fun x => if x ∉ binders then σ' x else x) a✝)