Theorem: FOL.NV.occursIn_iff_mem_varSet (FOL/NV/Binders.lean)

State before:
v : VarName
F : Formula
⊢ occursIn v F ↔ v ∈ F.varSet
Tactic:
induction F
State after:
case pred_const_
v : VarName
a✝¹ : PredName
a✝ : List VarName
⊢ occursIn v (pred_const_ a✝¹ a✝) ↔ v ∈ (pred_const_ a✝¹ a✝).varSet

case pred_var_
v : VarName
a✝¹ : PredName
a✝ : List VarName
⊢ occursIn v (pred_var_ a✝¹ a✝) ↔ v ∈ (pred_var_ a✝¹ a✝).varSet

case eq_
v a✝¹ a✝ : VarName
⊢ occursIn v (eq_ a✝¹ a✝) ↔ v ∈ (eq_ a✝¹ a✝).varSet

case true_
v : VarName
⊢ occursIn v true_ ↔ v ∈ true_.varSet

case false_
v : VarName
⊢ occursIn v false_ ↔ v ∈ false_.varSet

case not_
v : VarName
a✝ : Formula
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ occursIn v a✝.not_ ↔ v ∈ a✝.not_.varSet

case imp_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : occursIn v a✝¹ ↔ v ∈ a✝¹.varSet
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ occursIn v (a✝¹.imp_ a✝) ↔ v ∈ (a✝¹.imp_ a✝).varSet

case and_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : occursIn v a✝¹ ↔ v ∈ a✝¹.varSet
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ occursIn v (a✝¹.and_ a✝) ↔ v ∈ (a✝¹.and_ a✝).varSet

case or_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : occursIn v a✝¹ ↔ v ∈ a✝¹.varSet
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ occursIn v (a✝¹.or_ a✝) ↔ v ∈ (a✝¹.or_ a✝).varSet

case iff_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : occursIn v a✝¹ ↔ v ∈ a✝¹.varSet
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ occursIn v (a✝¹.iff_ a✝) ↔ v ∈ (a✝¹.iff_ a✝).varSet

case forall_
v a✝¹ : VarName
a✝ : Formula
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ occursIn v (forall_ a✝¹ a✝) ↔ v ∈ (forall_ a✝¹ a✝).varSet

case exists_
v a✝¹ : VarName
a✝ : Formula
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ occursIn v (exists_ a✝¹ a✝) ↔ v ∈ (exists_ a✝¹ a✝).varSet

case def_
v : VarName
a✝¹ : DefName
a✝ : List VarName
⊢ occursIn v (def_ a✝¹ a✝) ↔ v ∈ (def_ a✝¹ a✝).varSet

State before:
case pred_const_
v : VarName
a✝¹ : PredName
a✝ : List VarName
⊢ occursIn v (pred_const_ a✝¹ a✝) ↔ v ∈ (pred_const_ a✝¹ a✝).varSet

case pred_var_
v : VarName
a✝¹ : PredName
a✝ : List VarName
⊢ occursIn v (pred_var_ a✝¹ a✝) ↔ v ∈ (pred_var_ a✝¹ a✝).varSet

case eq_
v a✝¹ a✝ : VarName
⊢ occursIn v (eq_ a✝¹ a✝) ↔ v ∈ (eq_ a✝¹ a✝).varSet

case true_
v : VarName
⊢ occursIn v true_ ↔ v ∈ true_.varSet

case false_
v : VarName
⊢ occursIn v false_ ↔ v ∈ false_.varSet

case not_
v : VarName
a✝ : Formula
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ occursIn v a✝.not_ ↔ v ∈ a✝.not_.varSet

case imp_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : occursIn v a✝¹ ↔ v ∈ a✝¹.varSet
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ occursIn v (a✝¹.imp_ a✝) ↔ v ∈ (a✝¹.imp_ a✝).varSet

case and_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : occursIn v a✝¹ ↔ v ∈ a✝¹.varSet
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ occursIn v (a✝¹.and_ a✝) ↔ v ∈ (a✝¹.and_ a✝).varSet

case or_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : occursIn v a✝¹ ↔ v ∈ a✝¹.varSet
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ occursIn v (a✝¹.or_ a✝) ↔ v ∈ (a✝¹.or_ a✝).varSet

case iff_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : occursIn v a✝¹ ↔ v ∈ a✝¹.varSet
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ occursIn v (a✝¹.iff_ a✝) ↔ v ∈ (a✝¹.iff_ a✝).varSet

case forall_
v a✝¹ : VarName
a✝ : Formula
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ occursIn v (forall_ a✝¹ a✝) ↔ v ∈ (forall_ a✝¹ a✝).varSet

case exists_
v a✝¹ : VarName
a✝ : Formula
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ occursIn v (exists_ a✝¹ a✝) ↔ v ∈ (exists_ a✝¹ a✝).varSet

case def_
v : VarName
a✝¹ : DefName
a✝ : List VarName
⊢ occursIn v (def_ a✝¹ a✝) ↔ v ∈ (def_ a✝¹ a✝).varSet
Tactic:
all_goals
  simp only [occursIn]
  simp only [Formula.varSet]
State after:
case pred_const_
v : VarName
a✝¹ : PredName
a✝ : List VarName
⊢ v ∈ a✝ ↔ v ∈ a✝.toFinset

case pred_var_
v : VarName
a✝¹ : PredName
a✝ : List VarName
⊢ v ∈ a✝ ↔ v ∈ a✝.toFinset

case eq_
v a✝¹ a✝ : VarName
⊢ v = a✝¹ ∨ v = a✝ ↔ v ∈ {a✝¹, a✝}

case true_
v : VarName
⊢ False ↔ v ∈ ∅

case false_
v : VarName
⊢ False ↔ v ∈ ∅

case not_
v : VarName
a✝ : Formula
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ occursIn v a✝ ↔ v ∈ a✝.varSet

case imp_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : occursIn v a✝¹ ↔ v ∈ a✝¹.varSet
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ occursIn v a✝¹ ∨ occursIn v a✝ ↔ v ∈ a✝¹.varSet ∪ a✝.varSet

case and_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : occursIn v a✝¹ ↔ v ∈ a✝¹.varSet
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ occursIn v a✝¹ ∨ occursIn v a✝ ↔ v ∈ a✝¹.varSet ∪ a✝.varSet

case or_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : occursIn v a✝¹ ↔ v ∈ a✝¹.varSet
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ occursIn v a✝¹ ∨ occursIn v a✝ ↔ v ∈ a✝¹.varSet ∪ a✝.varSet

case iff_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : occursIn v a✝¹ ↔ v ∈ a✝¹.varSet
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ occursIn v a✝¹ ∨ occursIn v a✝ ↔ v ∈ a✝¹.varSet ∪ a✝.varSet

case forall_
v a✝¹ : VarName
a✝ : Formula
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ v = a✝¹ ∨ occursIn v a✝ ↔ v ∈ a✝.varSet ∪ {a✝¹}

case exists_
v a✝¹ : VarName
a✝ : Formula
a_ih✝ : occursIn v a✝ ↔ v ∈ a✝.varSet
⊢ v = a✝¹ ∨ occursIn v a✝ ↔ v ∈ a✝.varSet ∪ {a✝¹}

case def_
v : VarName
a✝¹ : DefName
a✝ : List VarName
⊢ v ∈ a✝ ↔ v ∈ a✝.toFinset

State before:
v : VarName
X : DefName
xs : List VarName
⊢ v ∈ xs ↔ v ∈ xs.toFinset
Tactic:
case pred_const_ X xs | pred_var_ X xs | def_ X xs =>
  simp
State after:
no goals

State before:
v x y : VarName
⊢ v = x ∨ v = y ↔ v ∈ {x, y}
Tactic:
case eq_ x y =>
  simp
State after:
no goals

State before:
v : VarName
⊢ False ↔ v ∈ ∅
Tactic:
case true_ | false_ =>
  tauto
State after:
no goals

State before:
v : VarName
phi : Formula
phi_ih : occursIn v phi ↔ v ∈ phi.varSet
⊢ occursIn v phi ↔ v ∈ phi.varSet
Tactic:
case not_ phi phi_ih =>
  tauto
State after:
no goals

State before:
v : VarName
phi psi : Formula
phi_ih : occursIn v phi ↔ v ∈ phi.varSet
psi_ih : occursIn v psi ↔ v ∈ psi.varSet
⊢ occursIn v phi ∨ occursIn v psi ↔ v ∈ phi.varSet ∪ psi.varSet
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:
v x : VarName
phi : Formula
phi_ih : occursIn v phi ↔ v ∈ phi.varSet
⊢ v = x ∨ occursIn v phi ↔ v ∈ phi.varSet ∪ {x}
Tactic:
case forall_ x phi phi_ih | exists_ x phi phi_ih =>
  simp
  tauto
State after:
no goals

State before:
case def_
v : VarName
a✝¹ : DefName
a✝ : List VarName
⊢ occursIn v (def_ a✝¹ a✝) ↔ v ∈ (def_ a✝¹ a✝).varSet
Tactic:
simp only [occursIn]
State after:
case def_
v : VarName
a✝¹ : DefName
a✝ : List VarName
⊢ v ∈ a✝ ↔ v ∈ (def_ a✝¹ a✝).varSet

State before:
case def_
v : VarName
a✝¹ : DefName
a✝ : List VarName
⊢ v ∈ a✝ ↔ v ∈ (def_ a✝¹ a✝).varSet
Tactic:
simp only [Formula.varSet]
State after:
case def_
v : VarName
a✝¹ : DefName
a✝ : List VarName
⊢ v ∈ a✝ ↔ v ∈ a✝.toFinset

State before:
v : VarName
X : DefName
xs : List VarName
⊢ v ∈ xs ↔ v ∈ xs.toFinset
Tactic:
simp
State after:
no goals

State before:
v x y : VarName
⊢ v = x ∨ v = y ↔ v ∈ {x, y}
Tactic:
simp
State after:
no goals

State before:
v : VarName
⊢ False ↔ v ∈ ∅
Tactic:
tauto
State after:
no goals

State before:
v : VarName
phi : Formula
phi_ih : occursIn v phi ↔ v ∈ phi.varSet
⊢ occursIn v phi ↔ v ∈ phi.varSet
Tactic:
tauto
State after:
no goals

State before:
v : VarName
phi psi : Formula
phi_ih : occursIn v phi ↔ v ∈ phi.varSet
psi_ih : occursIn v psi ↔ v ∈ psi.varSet
⊢ occursIn v phi ∨ occursIn v psi ↔ v ∈ phi.varSet ∪ psi.varSet
Tactic:
simp
State after:
v : VarName
phi psi : Formula
phi_ih : occursIn v phi ↔ v ∈ phi.varSet
psi_ih : occursIn v psi ↔ v ∈ psi.varSet
⊢ occursIn v phi ∨ occursIn v psi ↔ v ∈ phi.varSet ∨ v ∈ psi.varSet

State before:
v : VarName
phi psi : Formula
phi_ih : occursIn v phi ↔ v ∈ phi.varSet
psi_ih : occursIn v psi ↔ v ∈ psi.varSet
⊢ occursIn v phi ∨ occursIn v psi ↔ v ∈ phi.varSet ∨ v ∈ psi.varSet
Tactic:
tauto
State after:
no goals

State before:
v x : VarName
phi : Formula
phi_ih : occursIn v phi ↔ v ∈ phi.varSet
⊢ v = x ∨ occursIn v phi ↔ v ∈ phi.varSet ∪ {x}
Tactic:
simp
State after:
v x : VarName
phi : Formula
phi_ih : occursIn v phi ↔ v ∈ phi.varSet
⊢ v = x ∨ occursIn v phi ↔ v ∈ phi.varSet ∨ v = x

State before:
v x : VarName
phi : Formula
phi_ih : occursIn v phi ↔ v ∈ phi.varSet
⊢ v = x ∨ occursIn v phi ↔ v ∈ phi.varSet ∨ v = x
Tactic:
tauto
State after:
no goals