Theorem: FOL.NV.Sub.Var.All.Rec.replaceFreeAux_same_on_free (FOL/NV/Sub/Var/All/Rec/ReplaceFree.lean)

State before:
F : Formula
σ σ' : VarName → VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ binders F = replaceFreeAux σ' binders F
Tactic:
induction F generalizing binders
State after:
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✝)

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]
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✝)

State before:
σ σ' : VarName → VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ def_ X (List.map (fun x => if x ∉ binders then σ x else x) xs) =
    def_ X (List.map (fun x => if x ∉ binders then σ' x else x) xs)
Tactic:
case pred_const_ X xs | pred_var_ X xs | def_ X xs =>
  congr! 1
  simp only [List.map_eq_map_iff]
  intro x _
  split_ifs <;> tauto
State after:
no goals

State before:
σ σ' : VarName → VarName
phi : Formula
phi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ (replaceFreeAux σ binders phi).not_ = (replaceFreeAux σ' binders phi).not_
Tactic:
case not_ phi phi_ih =>
  simp
  tauto
State after:
no goals

State before:
σ σ' : VarName → VarName
phi psi : Formula
phi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi
psi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders psi = replaceFreeAux σ' binders psi
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ (replaceFreeAux σ binders phi).iff_ (replaceFreeAux σ binders psi) =
    (replaceFreeAux σ' binders phi).iff_ (replaceFreeAux σ' binders psi)
Tactic:
case
    imp_ phi psi phi_ih psi_ih
  | and_ phi psi phi_ih psi_ih
  | or_ phi psi phi_ih psi_ih
  | iff_ phi psi phi_ih psi_ih =>
  simp
  tauto
State after:
no goals

State before:
σ σ' : VarName → VarName
x : VarName
phi : Formula
phi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ exists_ x (replaceFreeAux σ (binders ∪ {x}) phi) = exists_ x (replaceFreeAux σ' (binders ∪ {x}) phi)
Tactic:
case forall_ x phi phi_ih | exists_ x phi phi_ih =>
  congr! 1
  apply phi_ih
  simp
  tauto
State after:
no goals

State before:
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:
simp only [replaceFreeAux]
State after:
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✝)

State before:
σ σ' : VarName → VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ def_ X (List.map (fun x => if x ∉ binders then σ x else x) xs) =
    def_ X (List.map (fun x => if x ∉ binders then σ' x else x) xs)
Tactic:
congr! 1
State after:
case h.e'_2
σ σ' : VarName → VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ List.map (fun x => if x ∉ binders then σ x else x) xs = List.map (fun x => if x ∉ binders then σ' x else x) xs

State before:
case h.e'_2
σ σ' : VarName → VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ List.map (fun x => if x ∉ binders then σ x else x) xs = List.map (fun x => if x ∉ binders then σ' x else x) xs
Tactic:
simp only [List.map_eq_map_iff]
State after:
case h.e'_2
σ σ' : VarName → VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ ∀ x ∈ xs, (if x ∉ binders then σ x else x) = if x ∉ binders then σ' x else x

State before:
case h.e'_2
σ σ' : VarName → VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ ∀ x ∈ xs, (if x ∉ binders then σ x else x) = if x ∉ binders then σ' x else x
Tactic:
intro x _
State after:
case h.e'_2
σ σ' : VarName → VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
x : VarName
a✝ : x ∈ xs
⊢ (if x ∉ binders then σ x else x) = if x ∉ binders then σ' x else x

State before:
case h.e'_2
σ σ' : VarName → VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
x : VarName
a✝ : x ∈ xs
⊢ (if x ∉ binders then σ x else x) = if x ∉ binders then σ' x else x
Tactic:
split_ifs <;> tauto
State after:
no goals

State before:
σ σ' : VarName → VarName
x y : VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ eq_ (if x ∉ binders then σ x else x) (if y ∉ binders then σ y else y) =
    eq_ (if x ∉ binders then σ' x else x) (if y ∉ binders then σ' y else y)
Tactic:
congr! 1
State after:
case h.e'_1
σ σ' : VarName → VarName
x y : VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ (if x ∉ binders then σ x else x) = if x ∉ binders then σ' x else x

case h.e'_2
σ σ' : VarName → VarName
x y : VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ (if y ∉ binders then σ y else y) = if y ∉ binders then σ' y else y

State before:
case h.e'_1
σ σ' : VarName → VarName
x y : VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ (if x ∉ binders then σ x else x) = if x ∉ binders then σ' x else x
Tactic:
split_ifs <;> tauto
State after:
no goals

State before:
case h.e'_2
σ σ' : VarName → VarName
x y : VarName
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ (if y ∉ binders then σ y else y) = if y ∉ binders then σ' y else y
Tactic:
split_ifs <;> tauto
State after:
no goals

State before:
σ σ' : VarName → VarName
phi : Formula
phi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ (replaceFreeAux σ binders phi).not_ = (replaceFreeAux σ' binders phi).not_
Tactic:
simp
State after:
σ σ' : VarName → VarName
phi : Formula
phi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi

State before:
σ σ' : VarName → VarName
phi : Formula
phi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi
Tactic:
tauto
State after:
no goals

State before:
σ σ' : VarName → VarName
phi psi : Formula
phi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi
psi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders psi = replaceFreeAux σ' binders psi
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ (replaceFreeAux σ binders phi).iff_ (replaceFreeAux σ binders psi) =
    (replaceFreeAux σ' binders phi).iff_ (replaceFreeAux σ' binders psi)
Tactic:
simp
State after:
σ σ' : VarName → VarName
phi psi : Formula
phi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi
psi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders psi = replaceFreeAux σ' binders psi
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi ∧
    replaceFreeAux σ binders psi = replaceFreeAux σ' binders psi

State before:
σ σ' : VarName → VarName
phi psi : Formula
phi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi
psi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders psi = replaceFreeAux σ' binders psi
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi ∧
    replaceFreeAux σ binders psi = replaceFreeAux σ' binders psi
Tactic:
tauto
State after:
no goals

State before:
σ σ' : VarName → VarName
x : VarName
phi : Formula
phi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ exists_ x (replaceFreeAux σ (binders ∪ {x}) phi) = exists_ x (replaceFreeAux σ' (binders ∪ {x}) phi)
Tactic:
congr! 1
State after:
case h.e'_2
σ σ' : VarName → VarName
x : VarName
phi : Formula
phi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ (binders ∪ {x}) phi = replaceFreeAux σ' (binders ∪ {x}) phi

State before:
case h.e'_2
σ σ' : VarName → VarName
x : VarName
phi : Formula
phi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ replaceFreeAux σ (binders ∪ {x}) phi = replaceFreeAux σ' (binders ∪ {x}) phi
Tactic:
apply phi_ih
State after:
case h.e'_2.h1
σ σ' : VarName → VarName
x : VarName
phi : Formula
phi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ ∀ v ∉ binders ∪ {x}, σ v = σ' v

State before:
case h.e'_2.h1
σ σ' : VarName → VarName
x : VarName
phi : Formula
phi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ ∀ v ∉ binders ∪ {x}, σ v = σ' v
Tactic:
simp
State after:
case h.e'_2.h1
σ σ' : VarName → VarName
x : VarName
phi : Formula
phi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ ∀ v ∉ binders, ¬v = x → σ v = σ' v

State before:
case h.e'_2.h1
σ σ' : VarName → VarName
x : VarName
phi : Formula
phi_ih :
  ∀ (binders : Finset VarName),
    (∀ v ∉ binders, σ v = σ' v) → replaceFreeAux σ binders phi = replaceFreeAux σ' binders phi
binders : Finset VarName
h1 : ∀ v ∉ binders, σ v = σ' v
⊢ ∀ v ∉ binders, ¬v = x → σ v = σ' v
Tactic:
tauto
State after:
no goals