Theorem: FOL.NV.Sub.Var.One.Rec.fastAdmitsAux_imp_free_and_bound_unchanged
Proof state before:
case pred_const_
v u : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
h2 : v ∈ a✝ → u ∉ binders
⊢ toIsBoundAux binders (pred_const_ a✝¹ a✝) =
    toIsBoundAux binders (pred_const_ a✝¹ (List.map (fun x => if v = x then u else x) a✝))

case pred_var_
v u : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
h2 : v ∈ a✝ → u ∉ binders
⊢ toIsBoundAux binders (pred_var_ a✝¹ a✝) =
    toIsBoundAux binders (pred_var_ a✝¹ (List.map (fun x => if v = x then u else x) a✝))

case eq_
v u a✝¹ a✝ : VarName
binders : Finset VarName
h1 : v ∉ binders
h2 : v = a✝¹ ∨ v = a✝ → u ∉ binders
⊢ toIsBoundAux binders (eq_ a✝¹ a✝) = toIsBoundAux binders (eq_ (if v = a✝¹ then u else a✝¹) (if v = a✝ then u else a✝))

case not_
v u : VarName
a✝ : Formula
a_ih✝ :
  ∀ (binders : Finset VarName),
    v ∉ binders → fastAdmitsAux v u binders a✝ → toIsBoundAux binders a✝ = toIsBoundAux binders (fastReplaceFree v u a✝)
binders : Finset VarName
h1 : v ∉ binders
h2 : fastAdmitsAux v u binders a✝
⊢ toIsBoundAux binders a✝.not_ = toIsBoundAux binders (fastReplaceFree v u a✝).not_

case imp_
v u : VarName
a✝¹ a✝ : Formula
a_ih✝¹ :
  ∀ (binders : Finset VarName),
    v ∉ binders →
      fastAdmitsAux v u binders a✝¹ → toIsBoundAux binders a✝¹ = toIsBoundAux binders (fastReplaceFree v u a✝¹)
a_ih✝ :
  ∀ (binders : Finset VarName),
    v ∉ binders → fastAdmitsAux v u binders a✝ → toIsBoundAux binders a✝ = toIsBoundAux binders (fastReplaceFree v u a✝)
binders : Finset VarName
h1 : v ∉ binders
h2 : fastAdmitsAux v u binders a✝¹ ∧ fastAdmitsAux v u binders a✝
⊢ toIsBoundAux binders (a✝¹.imp_ a✝) = toIsBoundAux binders ((fastReplaceFree v u a✝¹).imp_ (fastReplaceFree v u a✝))

case and_
v u : VarName
a✝¹ a✝ : Formula
a_ih✝¹ :
  ∀ (binders : Finset VarName),
    v ∉ binders →
      fastAdmitsAux v u binders a✝¹ → toIsBoundAux binders a✝¹ = toIsBoundAux binders (fastReplaceFree v u a✝¹)
a_ih✝ :
  ∀ (binders : Finset VarName),
    v ∉ binders → fastAdmitsAux v u binders a✝ → toIsBoundAux binders a✝ = toIsBoundAux binders (fastReplaceFree v u a✝)
binders : Finset VarName
h1 : v ∉ binders
h2 : fastAdmitsAux v u binders a✝¹ ∧ fastAdmitsAux v u binders a✝
⊢ toIsBoundAux binders (a✝¹.and_ a✝) = toIsBoundAux binders ((fastReplaceFree v u a✝¹).and_ (fastReplaceFree v u a✝))

case or_
v u : VarName
a✝¹ a✝ : Formula
a_ih✝¹ :
  ∀ (binders : Finset VarName),
    v ∉ binders →
      fastAdmitsAux v u binders a✝¹ → toIsBoundAux binders a✝¹ = toIsBoundAux binders (fastReplaceFree v u a✝¹)
a_ih✝ :
  ∀ (binders : Finset VarName),
    v ∉ binders → fastAdmitsAux v u binders a✝ → toIsBoundAux binders a✝ = toIsBoundAux binders (fastReplaceFree v u a✝)
binders : Finset VarName
h1 : v ∉ binders
h2 : fastAdmitsAux v u binders a✝¹ ∧ fastAdmitsAux v u binders a✝
⊢ toIsBoundAux binders (a✝¹.or_ a✝) = toIsBoundAux binders ((fastReplaceFree v u a✝¹).or_ (fastReplaceFree v u a✝))

case iff_
v u : VarName
a✝¹ a✝ : Formula
a_ih✝¹ :
  ∀ (binders : Finset VarName),
    v ∉ binders →
      fastAdmitsAux v u binders a✝¹ → toIsBoundAux binders a✝¹ = toIsBoundAux binders (fastReplaceFree v u a✝¹)
a_ih✝ :
  ∀ (binders : Finset VarName),
    v ∉ binders → fastAdmitsAux v u binders a✝ → toIsBoundAux binders a✝ = toIsBoundAux binders (fastReplaceFree v u a✝)
binders : Finset VarName
h1 : v ∉ binders
h2 : fastAdmitsAux v u binders a✝¹ ∧ fastAdmitsAux v u binders a✝
⊢ toIsBoundAux binders (a✝¹.iff_ a✝) = toIsBoundAux binders ((fastReplaceFree v u a✝¹).iff_ (fastReplaceFree v u a✝))

case forall_
v u a✝¹ : VarName
a✝ : Formula
a_ih✝ :
  ∀ (binders : Finset VarName),
    v ∉ binders → fastAdmitsAux v u binders a✝ → toIsBoundAux binders a✝ = toIsBoundAux binders (fastReplaceFree v u a✝)
binders : Finset VarName
h1 : v ∉ binders
h2 : v = a✝¹ ∨ fastAdmitsAux v u (binders ∪ {a✝¹}) a✝
⊢ toIsBoundAux binders (forall_ a✝¹ a✝) =
    toIsBoundAux binders (if v = a✝¹ then forall_ a✝¹ a✝ else forall_ a✝¹ (fastReplaceFree v u a✝))

case exists_
v u a✝¹ : VarName
a✝ : Formula
a_ih✝ :
  ∀ (binders : Finset VarName),
    v ∉ binders → fastAdmitsAux v u binders a✝ → toIsBoundAux binders a✝ = toIsBoundAux binders (fastReplaceFree v u a✝)
binders : Finset VarName
h1 : v ∉ binders
h2 : v = a✝¹ ∨ fastAdmitsAux v u (binders ∪ {a✝¹}) a✝
⊢ toIsBoundAux binders (exists_ a✝¹ a✝) =
    toIsBoundAux binders (if v = a✝¹ then exists_ a✝¹ a✝ else exists_ a✝¹ (fastReplaceFree v u a✝))

case def_
v u : VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
h2 : v ∈ a✝ → u ∉ binders
⊢ toIsBoundAux binders (def_ a✝¹ a✝) = toIsBoundAux binders (def_ a✝¹ (List.map (fun x => if v = x then u else x) a✝))
Tactic:
any_goals
  simp only [toIsBoundAux]
Proof state after:
case pred_const_
v u : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
h2 : v ∈ a✝ → u ∉ binders
⊢ BoolFormula.pred_const_ a✝¹ (List.map (fun v => decide (v ∈ binders)) a✝) =
    BoolFormula.pred_const_ a✝¹
      (List.map (fun v => decide (v ∈ binders)) (List.map (fun x => if v = x then u else x) a✝))

case pred_var_
v u : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
h2 : v ∈ a✝ → u ∉ binders
⊢ BoolFormula.pred_var_ a✝¹ (List.map (fun v => decide (v ∈ binders)) a✝) =
    BoolFormula.pred_var_ a✝¹ (List.map (fun v => decide (v ∈ binders)) (List.map (fun x => if v = x then u else x) a✝))

case eq_
v u a✝¹ a✝ : VarName
binders : Finset VarName
h1 : v ∉ binders
h2 : v = a✝¹ ∨ v = a✝ → u ∉ binders
⊢ BoolFormula.eq_ (decide (a✝¹ ∈ binders)) (decide (a✝ ∈ binders)) =
    BoolFormula.eq_ (decide ((if v = a✝¹ then u else a✝¹) ∈ binders)) (decide ((if v = a✝ then u else a✝) ∈ binders))

case not_
v u : VarName
a✝ : Formula
a_ih✝ :
  ∀ (binders : Finset VarName),
    v ∉ binders → fastAdmitsAux v u binders a✝ → toIsBoundAux binders a✝ = toIsBoundAux binders (fastReplaceFree v u a✝)
binders : Finset VarName
h1 : v ∉ binders
h2 : fastAdmitsAux v u binders a✝
⊢ (toIsBoundAux binders a✝).not_ = (toIsBoundAux binders (fastReplaceFree v u a✝)).not_

case imp_
v u : VarName
a✝¹ a✝ : Formula
a_ih✝¹ :
  ∀ (binders : Finset VarName),
    v ∉ binders →
      fastAdmitsAux v u binders a✝¹ → toIsBoundAux binders a✝¹ = toIsBoundAux binders (fastReplaceFree v u a✝¹)
a_ih✝ :
  ∀ (binders : Finset VarName),
    v ∉ binders → fastAdmitsAux v u binders a✝ → toIsBoundAux binders a✝ = toIsBoundAux binders (fastReplaceFree v u a✝)
binders : Finset VarName
h1 : v ∉ binders
h2 : fastAdmitsAux v u binders a✝¹ ∧ fastAdmitsAux v u binders a✝
⊢ (toIsBoundAux binders a✝¹).imp_ (toIsBoundAux binders a✝) =
    (toIsBoundAux binders (fastReplaceFree v u a✝¹)).imp_ (toIsBoundAux binders (fastReplaceFree v u a✝))

case and_
v u : VarName
a✝¹ a✝ : Formula
a_ih✝¹ :
  ∀ (binders : Finset VarName),
    v ∉ binders →
      fastAdmitsAux v u binders a✝¹ → toIsBoundAux binders a✝¹ = toIsBoundAux binders (fastReplaceFree v u a✝¹)
a_ih✝ :
  ∀ (binders : Finset VarName),
    v ∉ binders → fastAdmitsAux v u binders a✝ → toIsBoundAux binders a✝ = toIsBoundAux binders (fastReplaceFree v u a✝)
binders : Finset VarName
h1 : v ∉ binders
h2 : fastAdmitsAux v u binders a✝¹ ∧ fastAdmitsAux v u binders a✝
⊢ (toIsBoundAux binders a✝¹).and_ (toIsBoundAux binders a✝) =
    (toIsBoundAux binders (fastReplaceFree v u a✝¹)).and_ (toIsBoundAux binders (fastReplaceFree v u a✝))

case or_
v u : VarName
a✝¹ a✝ : Formula
a_ih✝¹ :
  ∀ (binders : Finset VarName),
    v ∉ binders →
      fastAdmitsAux v u binders a✝¹ → toIsBoundAux binders a✝¹ = toIsBoundAux binders (fastReplaceFree v u a✝¹)
a_ih✝ :
  ∀ (binders : Finset VarName),
    v ∉ binders → fastAdmitsAux v u binders a✝ → toIsBoundAux binders a✝ = toIsBoundAux binders (fastReplaceFree v u a✝)
binders : Finset VarName
h1 : v ∉ binders
h2 : fastAdmitsAux v u binders a✝¹ ∧ fastAdmitsAux v u binders a✝
⊢ (toIsBoundAux binders a✝¹).or_ (toIsBoundAux binders a✝) =
    (toIsBoundAux binders (fastReplaceFree v u a✝¹)).or_ (toIsBoundAux binders (fastReplaceFree v u a✝))

case iff_
v u : VarName
a✝¹ a✝ : Formula
a_ih✝¹ :
  ∀ (binders : Finset VarName),
    v ∉ binders →
      fastAdmitsAux v u binders a✝¹ → toIsBoundAux binders a✝¹ = toIsBoundAux binders (fastReplaceFree v u a✝¹)
a_ih✝ :
  ∀ (binders : Finset VarName),
    v ∉ binders → fastAdmitsAux v u binders a✝ → toIsBoundAux binders a✝ = toIsBoundAux binders (fastReplaceFree v u a✝)
binders : Finset VarName
h1 : v ∉ binders
h2 : fastAdmitsAux v u binders a✝¹ ∧ fastAdmitsAux v u binders a✝
⊢ (toIsBoundAux binders a✝¹).iff_ (toIsBoundAux binders a✝) =
    (toIsBoundAux binders (fastReplaceFree v u a✝¹)).iff_ (toIsBoundAux binders (fastReplaceFree v u a✝))

case forall_
v u a✝¹ : VarName
a✝ : Formula
a_ih✝ :
  ∀ (binders : Finset VarName),
    v ∉ binders → fastAdmitsAux v u binders a✝ → toIsBoundAux binders a✝ = toIsBoundAux binders (fastReplaceFree v u a✝)
binders : Finset VarName
h1 : v ∉ binders
h2 : v = a✝¹ ∨ fastAdmitsAux v u (binders ∪ {a✝¹}) a✝
⊢ BoolFormula.forall_ (decide True) (toIsBoundAux (binders ∪ {a✝¹}) a✝) =
    toIsBoundAux binders (if v = a✝¹ then forall_ a✝¹ a✝ else forall_ a✝¹ (fastReplaceFree v u a✝))

case exists_
v u a✝¹ : VarName
a✝ : Formula
a_ih✝ :
  ∀ (binders : Finset VarName),
    v ∉ binders → fastAdmitsAux v u binders a✝ → toIsBoundAux binders a✝ = toIsBoundAux binders (fastReplaceFree v u a✝)
binders : Finset VarName
h1 : v ∉ binders
h2 : v = a✝¹ ∨ fastAdmitsAux v u (binders ∪ {a✝¹}) a✝
⊢ BoolFormula.forall_ (decide True) (toIsBoundAux (binders ∪ {a✝¹}) a✝) =
    toIsBoundAux binders (if v = a✝¹ then exists_ a✝¹ a✝ else exists_ a✝¹ (fastReplaceFree v u a✝))

case def_
v u : VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
h2 : v ∈ a✝ → u ∉ binders
⊢ BoolFormula.def_ a✝¹ (List.map (fun v => decide (v ∈ binders)) a✝) =
    BoolFormula.def_ a✝¹ (List.map (fun v => decide (v ∈ binders)) (List.map (fun x => if v = x then u else x) a✝))