url
stringclasses 147
values | commit
stringclasses 147
values | file_path
stringlengths 7
101
| full_name
stringlengths 1
94
| start
stringlengths 6
10
| end
stringlengths 6
11
| tactic
stringlengths 1
11.2k
| state_before
stringlengths 3
2.09M
| state_after
stringlengths 6
2.09M
| input
stringlengths 73
2.09M
|
|---|---|---|---|---|---|---|---|---|---|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Prop/All/Rec/Sub.lean
|
FOL.NV.Sub.Prop.All.Rec.substitution_is_valid
|
[185, 1]
|
[196, 11]
|
simp only [substitution_theorem D I V E τ F]
|
F : Formula
τ : PredName → PredName
h1 : ∀ (D : Type) (I : Interpretation D) (V : VarAssignment D) (E : Env), Holds D I V E F
D : Type
I : Interpretation D
V : VarAssignment D
E : Env
⊢ Holds D I V E (sub τ F)
|
F : Formula
τ : PredName → PredName
h1 : ∀ (D : Type) (I : Interpretation D) (V : VarAssignment D) (E : Env), Holds D I V E F
D : Type
I : Interpretation D
V : VarAssignment D
E : Env
⊢ Holds D
{ nonempty := ⋯, pred_const_ := I.pred_const_,
pred_var_ := fun P ds => if ds = [] then Holds D I V E (pred_var_ (τ P) []) else I.pred_var_ P ds }
V E F
|
Please generate a tactic in lean4 to solve the state.
STATE:
F : Formula
τ : PredName → PredName
h1 : ∀ (D : Type) (I : Interpretation D) (V : VarAssignment D) (E : Env), Holds D I V E F
D : Type
I : Interpretation D
V : VarAssignment D
E : Env
⊢ Holds D I V E (sub τ F)
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Prop/All/Rec/Sub.lean
|
FOL.NV.Sub.Prop.All.Rec.substitution_is_valid
|
[185, 1]
|
[196, 11]
|
apply h1
|
F : Formula
τ : PredName → PredName
h1 : ∀ (D : Type) (I : Interpretation D) (V : VarAssignment D) (E : Env), Holds D I V E F
D : Type
I : Interpretation D
V : VarAssignment D
E : Env
⊢ Holds D
{ nonempty := ⋯, pred_const_ := I.pred_const_,
pred_var_ := fun P ds => if ds = [] then Holds D I V E (pred_var_ (τ P) []) else I.pred_var_ P ds }
V E F
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
F : Formula
τ : PredName → PredName
h1 : ∀ (D : Type) (I : Interpretation D) (V : VarAssignment D) (E : Env), Holds D I V E F
D : Type
I : Interpretation D
V : VarAssignment D
E : Env
⊢ Holds D
{ nonempty := ⋯, pred_const_ := I.pred_const_,
pred_var_ := fun P ds => if ds = [] then Holds D I V E (pred_var_ (τ P) []) else I.pred_var_ P ds }
V E F
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
induction F generalizing binders
|
F : Formula
v t : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders F = F
|
case pred_const_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (pred_const_ a✝¹ a✝) = pred_const_ a✝¹ a✝
case pred_var_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (pred_var_ a✝¹ a✝) = pred_var_ a✝¹ a✝
case eq_
v t a✝¹ a✝ : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (eq_ a✝¹ a✝) = eq_ a✝¹ a✝
case true_
v t : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders true_ = true_
case false_
v t : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders false_ = false_
case not_
v t : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders a✝.not_ = a✝.not_
case imp_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝¹ = a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (a✝¹.imp_ a✝) = a✝¹.imp_ a✝
case and_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝¹ = a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (a✝¹.and_ a✝) = a✝¹.and_ a✝
case or_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝¹ = a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (a✝¹.or_ a✝) = a✝¹.or_ a✝
case iff_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝¹ = a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (a✝¹.iff_ a✝) = a✝¹.iff_ a✝
case forall_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (forall_ a✝¹ a✝) = forall_ a✝¹ a✝
case exists_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (exists_ a✝¹ a✝) = exists_ a✝¹ a✝
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (def_ a✝¹ a✝) = def_ a✝¹ a✝
|
Please generate a tactic in lean4 to solve the state.
STATE:
F : Formula
v t : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders F = F
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
any_goals
simp only [replaceFreeAux]
|
case pred_const_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (pred_const_ a✝¹ a✝) = pred_const_ a✝¹ a✝
case pred_var_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (pred_var_ a✝¹ a✝) = pred_var_ a✝¹ a✝
case eq_
v t a✝¹ a✝ : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (eq_ a✝¹ a✝) = eq_ a✝¹ a✝
case true_
v t : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders true_ = true_
case false_
v t : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders false_ = false_
case not_
v t : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders a✝.not_ = a✝.not_
case imp_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝¹ = a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (a✝¹.imp_ a✝) = a✝¹.imp_ a✝
case and_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝¹ = a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (a✝¹.and_ a✝) = a✝¹.and_ a✝
case or_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝¹ = a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (a✝¹.or_ a✝) = a✝¹.or_ a✝
case iff_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝¹ = a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (a✝¹.iff_ a✝) = a✝¹.iff_ a✝
case forall_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (forall_ a✝¹ a✝) = forall_ a✝¹ a✝
case exists_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (exists_ a✝¹ a✝) = exists_ a✝¹ a✝
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (def_ a✝¹ a✝) = def_ a✝¹ a✝
|
case pred_const_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ pred_const_ a✝¹ (List.map (fun x => if v = x ∧ x ∉ binders then t else x) a✝) = pred_const_ a✝¹ a✝
case pred_var_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ pred_var_ a✝¹ (List.map (fun x => if v = x ∧ x ∉ binders then t else x) a✝) = pred_var_ a✝¹ a✝
case eq_
v t a✝¹ a✝ : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ eq_ (if v = a✝¹ ∧ a✝¹ ∉ binders then t else a✝¹) (if v = a✝ ∧ a✝ ∉ binders then t else a✝) = eq_ a✝¹ a✝
case not_
v t : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ (replaceFreeAux v t binders a✝).not_ = a✝.not_
case imp_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝¹ = a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ (replaceFreeAux v t binders a✝¹).imp_ (replaceFreeAux v t binders a✝) = a✝¹.imp_ a✝
case and_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝¹ = a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ (replaceFreeAux v t binders a✝¹).and_ (replaceFreeAux v t binders a✝) = a✝¹.and_ a✝
case or_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝¹ = a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ (replaceFreeAux v t binders a✝¹).or_ (replaceFreeAux v t binders a✝) = a✝¹.or_ a✝
case iff_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝¹ = a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ (replaceFreeAux v t binders a✝¹).iff_ (replaceFreeAux v t binders a✝) = a✝¹.iff_ a✝
case forall_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ forall_ a✝¹ (replaceFreeAux v t (binders ∪ {a✝¹}) a✝) = forall_ a✝¹ a✝
case exists_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ exists_ a✝¹ (replaceFreeAux v t (binders ∪ {a✝¹}) a✝) = exists_ a✝¹ a✝
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ def_ a✝¹ (List.map (fun x => if v = x ∧ x ∉ binders then t else x) a✝) = def_ a✝¹ a✝
|
Please generate a tactic in lean4 to solve the state.
STATE:
case pred_const_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (pred_const_ a✝¹ a✝) = pred_const_ a✝¹ a✝
case pred_var_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (pred_var_ a✝¹ a✝) = pred_var_ a✝¹ a✝
case eq_
v t a✝¹ a✝ : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (eq_ a✝¹ a✝) = eq_ a✝¹ a✝
case true_
v t : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders true_ = true_
case false_
v t : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders false_ = false_
case not_
v t : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders a✝.not_ = a✝.not_
case imp_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝¹ = a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (a✝¹.imp_ a✝) = a✝¹.imp_ a✝
case and_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝¹ = a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (a✝¹.and_ a✝) = a✝¹.and_ a✝
case or_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝¹ = a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (a✝¹.or_ a✝) = a✝¹.or_ a✝
case iff_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝¹ = a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (a✝¹.iff_ a✝) = a✝¹.iff_ a✝
case forall_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (forall_ a✝¹ a✝) = forall_ a✝¹ a✝
case exists_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders a✝ = a✝
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (exists_ a✝¹ a✝) = exists_ a✝¹ a✝
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (def_ a✝¹ a✝) = def_ a✝¹ a✝
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
case pred_const_ X xs | pred_var_ X xs | def_ X xs =>
simp
simp only [List.map_eq_self_iff]
simp
intro x _ a2 a3
subst a2
contradiction
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ def_ X (List.map (fun x => if v = x ∧ x ∉ binders then t else x) xs) = def_ X xs
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ def_ X (List.map (fun x => if v = x ∧ x ∉ binders then t else x) xs) = def_ X xs
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
case eq_ x y =>
simp
constructor
case left | right =>
intro a1 a2
subst a1
contradiction
|
v t x y : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ eq_ (if v = x ∧ x ∉ binders then t else x) (if v = y ∧ y ∉ binders then t else y) = eq_ x y
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x y : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ eq_ (if v = x ∧ x ∉ binders then t else x) (if v = y ∧ y ∉ binders then t else y) = eq_ x y
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
case not_ phi phi_ih =>
tauto
|
v t : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ (replaceFreeAux v t binders phi).not_ = phi.not_
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ (replaceFreeAux v t binders phi).not_ = phi.not_
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
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
|
v t : VarName
phi psi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
psi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders psi = psi
binders : Finset VarName
h1 : v ∈ binders
⊢ (replaceFreeAux v t binders phi).iff_ (replaceFreeAux v t binders psi) = phi.iff_ psi
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
phi psi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
psi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders psi = psi
binders : Finset VarName
h1 : v ∈ binders
⊢ (replaceFreeAux v t binders phi).iff_ (replaceFreeAux v t binders psi) = phi.iff_ psi
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
case forall_ x phi phi_ih | exists_ x phi phi_ih =>
simp
apply phi_ih
simp
left
exact h1
|
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ exists_ x (replaceFreeAux v t (binders ∪ {x}) phi) = exists_ x phi
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ exists_ x (replaceFreeAux v t (binders ∪ {x}) phi) = exists_ x phi
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
simp only [replaceFreeAux]
|
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (def_ a✝¹ a✝) = def_ a✝¹ a✝
|
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ def_ a✝¹ (List.map (fun x => if v = x ∧ x ∉ binders then t else x) a✝) = def_ a✝¹ a✝
|
Please generate a tactic in lean4 to solve the state.
STATE:
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders (def_ a✝¹ a✝) = def_ a✝¹ a✝
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
simp
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ def_ X (List.map (fun x => if v = x ∧ x ∉ binders then t else x) xs) = def_ X xs
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ List.map (fun x => if v = x ∧ x ∉ binders then t else x) xs = xs
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ def_ X (List.map (fun x => if v = x ∧ x ∉ binders then t else x) xs) = def_ X xs
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
simp only [List.map_eq_self_iff]
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ List.map (fun x => if v = x ∧ x ∉ binders then t else x) xs = xs
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ ∀ x ∈ xs, (if v = x ∧ x ∉ binders then t else x) = x
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ List.map (fun x => if v = x ∧ x ∉ binders then t else x) xs = xs
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
simp
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ ∀ x ∈ xs, (if v = x ∧ x ∉ binders then t else x) = x
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ ∀ x ∈ xs, v = x → x ∉ binders → t = x
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ ∀ x ∈ xs, (if v = x ∧ x ∉ binders then t else x) = x
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
intro x _ a2 a3
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ ∀ x ∈ xs, v = x → x ∉ binders → t = x
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∈ binders
x : VarName
a✝ : x ∈ xs
a2 : v = x
a3 : x ∉ binders
⊢ t = x
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ ∀ x ∈ xs, v = x → x ∉ binders → t = x
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
subst a2
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∈ binders
x : VarName
a✝ : x ∈ xs
a2 : v = x
a3 : x ∉ binders
⊢ t = x
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∈ binders
a✝ : v ∈ xs
a3 : v ∉ binders
⊢ t = v
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∈ binders
x : VarName
a✝ : x ∈ xs
a2 : v = x
a3 : x ∉ binders
⊢ t = x
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
contradiction
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∈ binders
a✝ : v ∈ xs
a3 : v ∉ binders
⊢ t = v
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∈ binders
a✝ : v ∈ xs
a3 : v ∉ binders
⊢ t = v
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
simp
|
v t x y : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ eq_ (if v = x ∧ x ∉ binders then t else x) (if v = y ∧ y ∉ binders then t else y) = eq_ x y
|
v t x y : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ (v = x → x ∉ binders → t = x) ∧ (v = y → y ∉ binders → t = y)
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x y : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ eq_ (if v = x ∧ x ∉ binders then t else x) (if v = y ∧ y ∉ binders then t else y) = eq_ x y
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
constructor
|
v t x y : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ (v = x → x ∉ binders → t = x) ∧ (v = y → y ∉ binders → t = y)
|
case left
v t x y : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ v = x → x ∉ binders → t = x
case right
v t x y : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ v = y → y ∉ binders → t = y
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x y : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ (v = x → x ∉ binders → t = x) ∧ (v = y → y ∉ binders → t = y)
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
case left | right =>
intro a1 a2
subst a1
contradiction
|
v t x y : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ v = y → y ∉ binders → t = y
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x y : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ v = y → y ∉ binders → t = y
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
intro a1 a2
|
v t x y : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ v = y → y ∉ binders → t = y
|
v t x y : VarName
binders : Finset VarName
h1 : v ∈ binders
a1 : v = y
a2 : y ∉ binders
⊢ t = y
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x y : VarName
binders : Finset VarName
h1 : v ∈ binders
⊢ v = y → y ∉ binders → t = y
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
subst a1
|
v t x y : VarName
binders : Finset VarName
h1 : v ∈ binders
a1 : v = y
a2 : y ∉ binders
⊢ t = y
|
v t x : VarName
binders : Finset VarName
h1 : v ∈ binders
a2 : v ∉ binders
⊢ t = v
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x y : VarName
binders : Finset VarName
h1 : v ∈ binders
a1 : v = y
a2 : y ∉ binders
⊢ t = y
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
contradiction
|
v t x : VarName
binders : Finset VarName
h1 : v ∈ binders
a2 : v ∉ binders
⊢ t = v
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x : VarName
binders : Finset VarName
h1 : v ∈ binders
a2 : v ∉ binders
⊢ t = v
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
tauto
|
v t : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ (replaceFreeAux v t binders phi).not_ = phi.not_
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ (replaceFreeAux v t binders phi).not_ = phi.not_
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
simp
|
v t : VarName
phi psi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
psi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders psi = psi
binders : Finset VarName
h1 : v ∈ binders
⊢ (replaceFreeAux v t binders phi).iff_ (replaceFreeAux v t binders psi) = phi.iff_ psi
|
v t : VarName
phi psi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
psi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders psi = psi
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders phi = phi ∧ replaceFreeAux v t binders psi = psi
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
phi psi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
psi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders psi = psi
binders : Finset VarName
h1 : v ∈ binders
⊢ (replaceFreeAux v t binders phi).iff_ (replaceFreeAux v t binders psi) = phi.iff_ psi
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
tauto
|
v t : VarName
phi psi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
psi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders psi = psi
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders phi = phi ∧ replaceFreeAux v t binders psi = psi
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
phi psi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
psi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders psi = psi
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t binders phi = phi ∧ replaceFreeAux v t binders psi = psi
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
simp
|
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ exists_ x (replaceFreeAux v t (binders ∪ {x}) phi) = exists_ x phi
|
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t (binders ∪ {x}) phi = phi
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ exists_ x (replaceFreeAux v t (binders ∪ {x}) phi) = exists_ x phi
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
apply phi_ih
|
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t (binders ∪ {x}) phi = phi
|
case h1
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ v ∈ binders ∪ {x}
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ replaceFreeAux v t (binders ∪ {x}) phi = phi
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
simp
|
case h1
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ v ∈ binders ∪ {x}
|
case h1
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ v ∈ binders ∨ v = x
|
Please generate a tactic in lean4 to solve the state.
STATE:
case h1
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ v ∈ binders ∪ {x}
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
left
|
case h1
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ v ∈ binders ∨ v = x
|
case h1.h
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ v ∈ binders
|
Please generate a tactic in lean4 to solve the state.
STATE:
case h1
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ v ∈ binders ∨ v = x
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_mem_binders
|
[122, 1]
|
[160, 13]
|
exact h1
|
case h1.h
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ v ∈ binders
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
case h1.h
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∈ binders → replaceFreeAux v t binders phi = phi
binders : Finset VarName
h1 : v ∈ binders
⊢ v ∈ binders
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
induction F generalizing binders
|
F : Formula
v t : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders F = fastReplaceFree v t F
|
case pred_const_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (pred_const_ a✝¹ a✝) = fastReplaceFree v t (pred_const_ a✝¹ a✝)
case pred_var_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (pred_var_ a✝¹ a✝) = fastReplaceFree v t (pred_var_ a✝¹ a✝)
case eq_
v t a✝¹ a✝ : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (eq_ a✝¹ a✝) = fastReplaceFree v t (eq_ a✝¹ a✝)
case true_
v t : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders true_ = fastReplaceFree v t true_
case false_
v t : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders false_ = fastReplaceFree v t false_
case not_
v t : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders a✝.not_ = fastReplaceFree v t a✝.not_
case imp_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝¹ = fastReplaceFree v t a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (a✝¹.imp_ a✝) = fastReplaceFree v t (a✝¹.imp_ a✝)
case and_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝¹ = fastReplaceFree v t a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (a✝¹.and_ a✝) = fastReplaceFree v t (a✝¹.and_ a✝)
case or_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝¹ = fastReplaceFree v t a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (a✝¹.or_ a✝) = fastReplaceFree v t (a✝¹.or_ a✝)
case iff_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝¹ = fastReplaceFree v t a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (a✝¹.iff_ a✝) = fastReplaceFree v t (a✝¹.iff_ a✝)
case forall_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (forall_ a✝¹ a✝) = fastReplaceFree v t (forall_ a✝¹ a✝)
case exists_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (exists_ a✝¹ a✝) = fastReplaceFree v t (exists_ a✝¹ a✝)
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (def_ a✝¹ a✝) = fastReplaceFree v t (def_ a✝¹ a✝)
|
Please generate a tactic in lean4 to solve the state.
STATE:
F : Formula
v t : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders F = fastReplaceFree v t F
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
any_goals
simp only [replaceFreeAux]
simp only [fastReplaceFree]
|
case pred_const_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (pred_const_ a✝¹ a✝) = fastReplaceFree v t (pred_const_ a✝¹ a✝)
case pred_var_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (pred_var_ a✝¹ a✝) = fastReplaceFree v t (pred_var_ a✝¹ a✝)
case eq_
v t a✝¹ a✝ : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (eq_ a✝¹ a✝) = fastReplaceFree v t (eq_ a✝¹ a✝)
case true_
v t : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders true_ = fastReplaceFree v t true_
case false_
v t : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders false_ = fastReplaceFree v t false_
case not_
v t : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders a✝.not_ = fastReplaceFree v t a✝.not_
case imp_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝¹ = fastReplaceFree v t a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (a✝¹.imp_ a✝) = fastReplaceFree v t (a✝¹.imp_ a✝)
case and_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝¹ = fastReplaceFree v t a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (a✝¹.and_ a✝) = fastReplaceFree v t (a✝¹.and_ a✝)
case or_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝¹ = fastReplaceFree v t a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (a✝¹.or_ a✝) = fastReplaceFree v t (a✝¹.or_ a✝)
case iff_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝¹ = fastReplaceFree v t a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (a✝¹.iff_ a✝) = fastReplaceFree v t (a✝¹.iff_ a✝)
case forall_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (forall_ a✝¹ a✝) = fastReplaceFree v t (forall_ a✝¹ a✝)
case exists_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (exists_ a✝¹ a✝) = fastReplaceFree v t (exists_ a✝¹ a✝)
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (def_ a✝¹ a✝) = fastReplaceFree v t (def_ a✝¹ a✝)
|
case pred_const_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ pred_const_ a✝¹ (List.map (fun x => if v = x ∧ x ∉ binders then t else x) a✝) =
pred_const_ a✝¹ (List.map (fun x => if v = x then t else x) a✝)
case pred_var_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ pred_var_ a✝¹ (List.map (fun x => if v = x ∧ x ∉ binders then t else x) a✝) =
pred_var_ a✝¹ (List.map (fun x => if v = x then t else x) a✝)
case eq_
v t a✝¹ a✝ : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ eq_ (if v = a✝¹ ∧ a✝¹ ∉ binders then t else a✝¹) (if v = a✝ ∧ a✝ ∉ binders then t else a✝) =
eq_ (if v = a✝¹ then t else a✝¹) (if v = a✝ then t else a✝)
case not_
v t : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ (replaceFreeAux v t binders a✝).not_ = (fastReplaceFree v t a✝).not_
case imp_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝¹ = fastReplaceFree v t a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ (replaceFreeAux v t binders a✝¹).imp_ (replaceFreeAux v t binders a✝) =
(fastReplaceFree v t a✝¹).imp_ (fastReplaceFree v t a✝)
case and_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝¹ = fastReplaceFree v t a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ (replaceFreeAux v t binders a✝¹).and_ (replaceFreeAux v t binders a✝) =
(fastReplaceFree v t a✝¹).and_ (fastReplaceFree v t a✝)
case or_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝¹ = fastReplaceFree v t a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ (replaceFreeAux v t binders a✝¹).or_ (replaceFreeAux v t binders a✝) =
(fastReplaceFree v t a✝¹).or_ (fastReplaceFree v t a✝)
case iff_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝¹ = fastReplaceFree v t a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ (replaceFreeAux v t binders a✝¹).iff_ (replaceFreeAux v t binders a✝) =
(fastReplaceFree v t a✝¹).iff_ (fastReplaceFree v t a✝)
case forall_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ forall_ a✝¹ (replaceFreeAux v t (binders ∪ {a✝¹}) a✝) =
if v = a✝¹ then forall_ a✝¹ a✝ else forall_ a✝¹ (fastReplaceFree v t a✝)
case exists_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ exists_ a✝¹ (replaceFreeAux v t (binders ∪ {a✝¹}) a✝) =
if v = a✝¹ then exists_ a✝¹ a✝ else exists_ a✝¹ (fastReplaceFree v t a✝)
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ def_ a✝¹ (List.map (fun x => if v = x ∧ x ∉ binders then t else x) a✝) =
def_ a✝¹ (List.map (fun x => if v = x then t else x) a✝)
|
Please generate a tactic in lean4 to solve the state.
STATE:
case pred_const_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (pred_const_ a✝¹ a✝) = fastReplaceFree v t (pred_const_ a✝¹ a✝)
case pred_var_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (pred_var_ a✝¹ a✝) = fastReplaceFree v t (pred_var_ a✝¹ a✝)
case eq_
v t a✝¹ a✝ : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (eq_ a✝¹ a✝) = fastReplaceFree v t (eq_ a✝¹ a✝)
case true_
v t : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders true_ = fastReplaceFree v t true_
case false_
v t : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders false_ = fastReplaceFree v t false_
case not_
v t : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders a✝.not_ = fastReplaceFree v t a✝.not_
case imp_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝¹ = fastReplaceFree v t a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (a✝¹.imp_ a✝) = fastReplaceFree v t (a✝¹.imp_ a✝)
case and_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝¹ = fastReplaceFree v t a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (a✝¹.and_ a✝) = fastReplaceFree v t (a✝¹.and_ a✝)
case or_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝¹ = fastReplaceFree v t a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (a✝¹.or_ a✝) = fastReplaceFree v t (a✝¹.or_ a✝)
case iff_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝¹ = fastReplaceFree v t a✝¹
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (a✝¹.iff_ a✝) = fastReplaceFree v t (a✝¹.iff_ a✝)
case forall_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (forall_ a✝¹ a✝) = fastReplaceFree v t (forall_ a✝¹ a✝)
case exists_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders a✝ = fastReplaceFree v t a✝
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (exists_ a✝¹ a✝) = fastReplaceFree v t (exists_ a✝¹ a✝)
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (def_ a✝¹ a✝) = fastReplaceFree v t (def_ a✝¹ a✝)
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
case pred_const_ X xs | pred_var_ X xs | def_ X xs =>
congr!
case _ x =>
constructor
case mp =>
tauto
case mpr =>
intro a1
subst a1
tauto
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ def_ X (List.map (fun x => if v = x ∧ x ∉ binders then t else x) xs) =
def_ X (List.map (fun x => if v = x then t else x) xs)
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ def_ X (List.map (fun x => if v = x ∧ x ∉ binders then t else x) xs) =
def_ X (List.map (fun x => if v = x then t else x) xs)
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
case eq_ x y =>
congr!
case _ | _ =>
constructor
case mp =>
tauto
case mpr =>
intro a1
subst a1
tauto
|
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ eq_ (if v = x ∧ x ∉ binders then t else x) (if v = y ∧ y ∉ binders then t else y) =
eq_ (if v = x then t else x) (if v = y then t else y)
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ eq_ (if v = x ∧ x ∉ binders then t else x) (if v = y ∧ y ∉ binders then t else y) =
eq_ (if v = x then t else x) (if v = y then t else y)
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
case not_ phi phi_ih =>
tauto
|
v t : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
⊢ (replaceFreeAux v t binders phi).not_ = (fastReplaceFree v t phi).not_
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
⊢ (replaceFreeAux v t binders phi).not_ = (fastReplaceFree v t phi).not_
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
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
|
v t : VarName
phi psi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
psi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders psi = fastReplaceFree v t psi
binders : Finset VarName
h1 : v ∉ binders
⊢ (replaceFreeAux v t binders phi).iff_ (replaceFreeAux v t binders psi) =
(fastReplaceFree v t phi).iff_ (fastReplaceFree v t psi)
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
phi psi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
psi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders psi = fastReplaceFree v t psi
binders : Finset VarName
h1 : v ∉ binders
⊢ (replaceFreeAux v t binders phi).iff_ (replaceFreeAux v t binders psi) =
(fastReplaceFree v t phi).iff_ (fastReplaceFree v t psi)
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
case forall_ x phi phi_ih | exists_ x phi phi_ih =>
split_ifs
case pos c1 =>
congr! 1
apply replaceFreeAux_mem_binders
simp
right
exact c1
case neg c1 =>
congr! 1
apply phi_ih
simp
tauto
|
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
⊢ exists_ x (replaceFreeAux v t (binders ∪ {x}) phi) =
if v = x then exists_ x phi else exists_ x (fastReplaceFree v t phi)
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
⊢ exists_ x (replaceFreeAux v t (binders ∪ {x}) phi) =
if v = x then exists_ x phi else exists_ x (fastReplaceFree v t phi)
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
simp only [replaceFreeAux]
|
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (def_ a✝¹ a✝) = fastReplaceFree v t (def_ a✝¹ a✝)
|
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ def_ a✝¹ (List.map (fun x => if v = x ∧ x ∉ binders then t else x) a✝) = fastReplaceFree v t (def_ a✝¹ a✝)
|
Please generate a tactic in lean4 to solve the state.
STATE:
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders (def_ a✝¹ a✝) = fastReplaceFree v t (def_ a✝¹ a✝)
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
simp only [fastReplaceFree]
|
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ def_ a✝¹ (List.map (fun x => if v = x ∧ x ∉ binders then t else x) a✝) = fastReplaceFree v t (def_ a✝¹ a✝)
|
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ def_ a✝¹ (List.map (fun x => if v = x ∧ x ∉ binders then t else x) a✝) =
def_ a✝¹ (List.map (fun x => if v = x then t else x) a✝)
|
Please generate a tactic in lean4 to solve the state.
STATE:
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ def_ a✝¹ (List.map (fun x => if v = x ∧ x ∉ binders then t else x) a✝) = fastReplaceFree v t (def_ a✝¹ a✝)
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
congr!
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ def_ X (List.map (fun x => if v = x ∧ x ∉ binders then t else x) xs) =
def_ X (List.map (fun x => if v = x then t else x) xs)
|
case h.e'_2.h.e'_3.h.h₁.a
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
x✝ : VarName
⊢ v = x✝ ∧ x✝ ∉ binders ↔ v = x✝
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ def_ X (List.map (fun x => if v = x ∧ x ∉ binders then t else x) xs) =
def_ X (List.map (fun x => if v = x then t else x) xs)
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
case _ x =>
constructor
case mp =>
tauto
case mpr =>
intro a1
subst a1
tauto
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
x : VarName
⊢ v = x ∧ x ∉ binders ↔ v = x
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
x : VarName
⊢ v = x ∧ x ∉ binders ↔ v = x
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
constructor
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
x : VarName
⊢ v = x ∧ x ∉ binders ↔ v = x
|
case mp
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
x : VarName
⊢ v = x ∧ x ∉ binders → v = x
case mpr
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
x : VarName
⊢ v = x → v = x ∧ x ∉ binders
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
x : VarName
⊢ v = x ∧ x ∉ binders ↔ v = x
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
case mp =>
tauto
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
x : VarName
⊢ v = x ∧ x ∉ binders → v = x
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
x : VarName
⊢ v = x ∧ x ∉ binders → v = x
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
case mpr =>
intro a1
subst a1
tauto
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
x : VarName
⊢ v = x → v = x ∧ x ∉ binders
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
x : VarName
⊢ v = x → v = x ∧ x ∉ binders
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
tauto
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
x : VarName
⊢ v = x ∧ x ∉ binders → v = x
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
x : VarName
⊢ v = x ∧ x ∉ binders → v = x
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
intro a1
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
x : VarName
⊢ v = x → v = x ∧ x ∉ binders
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
x : VarName
a1 : v = x
⊢ v = x ∧ x ∉ binders
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
x : VarName
⊢ v = x → v = x ∧ x ∉ binders
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
subst a1
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
x : VarName
a1 : v = x
⊢ v = x ∧ x ∉ binders
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = v ∧ v ∉ binders
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
x : VarName
a1 : v = x
⊢ v = x ∧ x ∉ binders
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
tauto
|
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = v ∧ v ∉ binders
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
X : DefName
xs : List VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = v ∧ v ∉ binders
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
congr!
|
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ eq_ (if v = x ∧ x ∉ binders then t else x) (if v = y ∧ y ∉ binders then t else y) =
eq_ (if v = x then t else x) (if v = y then t else y)
|
case h.e'_1.h₁.a
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = x ∧ x ∉ binders ↔ v = x
case h.e'_2.h₁.a
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = y ∧ y ∉ binders ↔ v = y
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ eq_ (if v = x ∧ x ∉ binders then t else x) (if v = y ∧ y ∉ binders then t else y) =
eq_ (if v = x then t else x) (if v = y then t else y)
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
case _ | _ =>
constructor
case mp =>
tauto
case mpr =>
intro a1
subst a1
tauto
|
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = y ∧ y ∉ binders ↔ v = y
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = y ∧ y ∉ binders ↔ v = y
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
constructor
|
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = y ∧ y ∉ binders ↔ v = y
|
case mp
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = y ∧ y ∉ binders → v = y
case mpr
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = y → v = y ∧ y ∉ binders
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = y ∧ y ∉ binders ↔ v = y
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
case mp =>
tauto
|
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = y ∧ y ∉ binders → v = y
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = y ∧ y ∉ binders → v = y
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
case mpr =>
intro a1
subst a1
tauto
|
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = y → v = y ∧ y ∉ binders
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = y → v = y ∧ y ∉ binders
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
tauto
|
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = y ∧ y ∉ binders → v = y
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = y ∧ y ∉ binders → v = y
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
intro a1
|
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = y → v = y ∧ y ∉ binders
|
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
a1 : v = y
⊢ v = y ∧ y ∉ binders
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = y → v = y ∧ y ∉ binders
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
subst a1
|
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
a1 : v = y
⊢ v = y ∧ y ∉ binders
|
v t x : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = v ∧ v ∉ binders
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x y : VarName
binders : Finset VarName
h1 : v ∉ binders
a1 : v = y
⊢ v = y ∧ y ∉ binders
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
tauto
|
v t x : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = v ∧ v ∉ binders
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x : VarName
binders : Finset VarName
h1 : v ∉ binders
⊢ v = v ∧ v ∉ binders
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
tauto
|
v t : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
⊢ (replaceFreeAux v t binders phi).not_ = (fastReplaceFree v t phi).not_
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
⊢ (replaceFreeAux v t binders phi).not_ = (fastReplaceFree v t phi).not_
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
simp
|
v t : VarName
phi psi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
psi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders psi = fastReplaceFree v t psi
binders : Finset VarName
h1 : v ∉ binders
⊢ (replaceFreeAux v t binders phi).iff_ (replaceFreeAux v t binders psi) =
(fastReplaceFree v t phi).iff_ (fastReplaceFree v t psi)
|
v t : VarName
phi psi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
psi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders psi = fastReplaceFree v t psi
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders phi = fastReplaceFree v t phi ∧ replaceFreeAux v t binders psi = fastReplaceFree v t psi
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
phi psi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
psi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders psi = fastReplaceFree v t psi
binders : Finset VarName
h1 : v ∉ binders
⊢ (replaceFreeAux v t binders phi).iff_ (replaceFreeAux v t binders psi) =
(fastReplaceFree v t phi).iff_ (fastReplaceFree v t psi)
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
tauto
|
v t : VarName
phi psi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
psi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders psi = fastReplaceFree v t psi
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders phi = fastReplaceFree v t phi ∧ replaceFreeAux v t binders psi = fastReplaceFree v t psi
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
phi psi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
psi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders psi = fastReplaceFree v t psi
binders : Finset VarName
h1 : v ∉ binders
⊢ replaceFreeAux v t binders phi = fastReplaceFree v t phi ∧ replaceFreeAux v t binders psi = fastReplaceFree v t psi
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
split_ifs
|
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
⊢ exists_ x (replaceFreeAux v t (binders ∪ {x}) phi) =
if v = x then exists_ x phi else exists_ x (fastReplaceFree v t phi)
|
case pos
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
h✝ : v = x
⊢ exists_ x (replaceFreeAux v t (binders ∪ {x}) phi) = exists_ x phi
case neg
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
h✝ : ¬v = x
⊢ exists_ x (replaceFreeAux v t (binders ∪ {x}) phi) = exists_ x (fastReplaceFree v t phi)
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
⊢ exists_ x (replaceFreeAux v t (binders ∪ {x}) phi) =
if v = x then exists_ x phi else exists_ x (fastReplaceFree v t phi)
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
case pos c1 =>
congr! 1
apply replaceFreeAux_mem_binders
simp
right
exact c1
|
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : v = x
⊢ exists_ x (replaceFreeAux v t (binders ∪ {x}) phi) = exists_ x phi
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : v = x
⊢ exists_ x (replaceFreeAux v t (binders ∪ {x}) phi) = exists_ x phi
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
case neg c1 =>
congr! 1
apply phi_ih
simp
tauto
|
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : ¬v = x
⊢ exists_ x (replaceFreeAux v t (binders ∪ {x}) phi) = exists_ x (fastReplaceFree v t phi)
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : ¬v = x
⊢ exists_ x (replaceFreeAux v t (binders ∪ {x}) phi) = exists_ x (fastReplaceFree v t phi)
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
congr! 1
|
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : v = x
⊢ exists_ x (replaceFreeAux v t (binders ∪ {x}) phi) = exists_ x phi
|
case h.e'_2
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : v = x
⊢ replaceFreeAux v t (binders ∪ {x}) phi = phi
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : v = x
⊢ exists_ x (replaceFreeAux v t (binders ∪ {x}) phi) = exists_ x phi
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
apply replaceFreeAux_mem_binders
|
case h.e'_2
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : v = x
⊢ replaceFreeAux v t (binders ∪ {x}) phi = phi
|
case h.e'_2.h1
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : v = x
⊢ v ∈ binders ∪ {x}
|
Please generate a tactic in lean4 to solve the state.
STATE:
case h.e'_2
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : v = x
⊢ replaceFreeAux v t (binders ∪ {x}) phi = phi
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
simp
|
case h.e'_2.h1
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : v = x
⊢ v ∈ binders ∪ {x}
|
case h.e'_2.h1
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : v = x
⊢ v ∈ binders ∨ v = x
|
Please generate a tactic in lean4 to solve the state.
STATE:
case h.e'_2.h1
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : v = x
⊢ v ∈ binders ∪ {x}
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
right
|
case h.e'_2.h1
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : v = x
⊢ v ∈ binders ∨ v = x
|
case h.e'_2.h1.h
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : v = x
⊢ v = x
|
Please generate a tactic in lean4 to solve the state.
STATE:
case h.e'_2.h1
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : v = x
⊢ v ∈ binders ∨ v = x
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
exact c1
|
case h.e'_2.h1.h
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : v = x
⊢ v = x
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
case h.e'_2.h1.h
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : v = x
⊢ v = x
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
congr! 1
|
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : ¬v = x
⊢ exists_ x (replaceFreeAux v t (binders ∪ {x}) phi) = exists_ x (fastReplaceFree v t phi)
|
case h.e'_2
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : ¬v = x
⊢ replaceFreeAux v t (binders ∪ {x}) phi = fastReplaceFree v t phi
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : ¬v = x
⊢ exists_ x (replaceFreeAux v t (binders ∪ {x}) phi) = exists_ x (fastReplaceFree v t phi)
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
apply phi_ih
|
case h.e'_2
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : ¬v = x
⊢ replaceFreeAux v t (binders ∪ {x}) phi = fastReplaceFree v t phi
|
case h.e'_2.h1
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : ¬v = x
⊢ v ∉ binders ∪ {x}
|
Please generate a tactic in lean4 to solve the state.
STATE:
case h.e'_2
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : ¬v = x
⊢ replaceFreeAux v t (binders ∪ {x}) phi = fastReplaceFree v t phi
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
simp
|
case h.e'_2.h1
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : ¬v = x
⊢ v ∉ binders ∪ {x}
|
case h.e'_2.h1
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : ¬v = x
⊢ v ∉ binders ∧ ¬v = x
|
Please generate a tactic in lean4 to solve the state.
STATE:
case h.e'_2.h1
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : ¬v = x
⊢ v ∉ binders ∪ {x}
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFreeAux_eq_fastReplaceFree
|
[163, 1]
|
[216, 12]
|
tauto
|
case h.e'_2.h1
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : ¬v = x
⊢ v ∉ binders ∧ ¬v = x
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
case h.e'_2.h1
v t x : VarName
phi : Formula
phi_ih : ∀ (binders : Finset VarName), v ∉ binders → replaceFreeAux v t binders phi = fastReplaceFree v t phi
binders : Finset VarName
h1 : v ∉ binders
c1 : ¬v = x
⊢ v ∉ binders ∧ ¬v = x
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFree_eq_fastReplaceFree
|
[219, 1]
|
[226, 7]
|
simp only [replaceFree]
|
F : Formula
v t : VarName
⊢ replaceFree v t F = fastReplaceFree v t F
|
F : Formula
v t : VarName
⊢ replaceFreeAux v t ∅ F = fastReplaceFree v t F
|
Please generate a tactic in lean4 to solve the state.
STATE:
F : Formula
v t : VarName
⊢ replaceFree v t F = fastReplaceFree v t F
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFree_eq_fastReplaceFree
|
[219, 1]
|
[226, 7]
|
apply replaceFreeAux_eq_fastReplaceFree
|
F : Formula
v t : VarName
⊢ replaceFreeAux v t ∅ F = fastReplaceFree v t F
|
case h1
F : Formula
v t : VarName
⊢ v ∉ ∅
|
Please generate a tactic in lean4 to solve the state.
STATE:
F : Formula
v t : VarName
⊢ replaceFreeAux v t ∅ F = fastReplaceFree v t F
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.replaceFree_eq_fastReplaceFree
|
[219, 1]
|
[226, 7]
|
simp
|
case h1
F : Formula
v t : VarName
⊢ v ∉ ∅
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
case h1
F : Formula
v t : VarName
⊢ v ∉ ∅
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.fastReplaceFree_self
|
[230, 1]
|
[255, 17]
|
induction F
|
F : Formula
v : VarName
⊢ fastReplaceFree v v F = F
|
case pred_const_
v : VarName
a✝¹ : PredName
a✝ : List VarName
⊢ fastReplaceFree v v (pred_const_ a✝¹ a✝) = pred_const_ a✝¹ a✝
case pred_var_
v : VarName
a✝¹ : PredName
a✝ : List VarName
⊢ fastReplaceFree v v (pred_var_ a✝¹ a✝) = pred_var_ a✝¹ a✝
case eq_
v a✝¹ a✝ : VarName
⊢ fastReplaceFree v v (eq_ a✝¹ a✝) = eq_ a✝¹ a✝
case true_
v : VarName
⊢ fastReplaceFree v v true_ = true_
case false_
v : VarName
⊢ fastReplaceFree v v false_ = false_
case not_
v : VarName
a✝ : Formula
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v a✝.not_ = a✝.not_
case imp_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : fastReplaceFree v v a✝¹ = a✝¹
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v (a✝¹.imp_ a✝) = a✝¹.imp_ a✝
case and_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : fastReplaceFree v v a✝¹ = a✝¹
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v (a✝¹.and_ a✝) = a✝¹.and_ a✝
case or_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : fastReplaceFree v v a✝¹ = a✝¹
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v (a✝¹.or_ a✝) = a✝¹.or_ a✝
case iff_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : fastReplaceFree v v a✝¹ = a✝¹
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v (a✝¹.iff_ a✝) = a✝¹.iff_ a✝
case forall_
v a✝¹ : VarName
a✝ : Formula
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v (forall_ a✝¹ a✝) = forall_ a✝¹ a✝
case exists_
v a✝¹ : VarName
a✝ : Formula
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v (exists_ a✝¹ a✝) = exists_ a✝¹ a✝
case def_
v : VarName
a✝¹ : DefName
a✝ : List VarName
⊢ fastReplaceFree v v (def_ a✝¹ a✝) = def_ a✝¹ a✝
|
Please generate a tactic in lean4 to solve the state.
STATE:
F : Formula
v : VarName
⊢ fastReplaceFree v v F = F
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.fastReplaceFree_self
|
[230, 1]
|
[255, 17]
|
any_goals
simp only [fastReplaceFree]
|
case pred_const_
v : VarName
a✝¹ : PredName
a✝ : List VarName
⊢ fastReplaceFree v v (pred_const_ a✝¹ a✝) = pred_const_ a✝¹ a✝
case pred_var_
v : VarName
a✝¹ : PredName
a✝ : List VarName
⊢ fastReplaceFree v v (pred_var_ a✝¹ a✝) = pred_var_ a✝¹ a✝
case eq_
v a✝¹ a✝ : VarName
⊢ fastReplaceFree v v (eq_ a✝¹ a✝) = eq_ a✝¹ a✝
case true_
v : VarName
⊢ fastReplaceFree v v true_ = true_
case false_
v : VarName
⊢ fastReplaceFree v v false_ = false_
case not_
v : VarName
a✝ : Formula
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v a✝.not_ = a✝.not_
case imp_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : fastReplaceFree v v a✝¹ = a✝¹
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v (a✝¹.imp_ a✝) = a✝¹.imp_ a✝
case and_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : fastReplaceFree v v a✝¹ = a✝¹
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v (a✝¹.and_ a✝) = a✝¹.and_ a✝
case or_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : fastReplaceFree v v a✝¹ = a✝¹
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v (a✝¹.or_ a✝) = a✝¹.or_ a✝
case iff_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : fastReplaceFree v v a✝¹ = a✝¹
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v (a✝¹.iff_ a✝) = a✝¹.iff_ a✝
case forall_
v a✝¹ : VarName
a✝ : Formula
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v (forall_ a✝¹ a✝) = forall_ a✝¹ a✝
case exists_
v a✝¹ : VarName
a✝ : Formula
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v (exists_ a✝¹ a✝) = exists_ a✝¹ a✝
case def_
v : VarName
a✝¹ : DefName
a✝ : List VarName
⊢ fastReplaceFree v v (def_ a✝¹ a✝) = def_ a✝¹ a✝
|
case pred_const_
v : VarName
a✝¹ : PredName
a✝ : List VarName
⊢ pred_const_ a✝¹ (List.map (fun x => if v = x then v else x) a✝) = pred_const_ a✝¹ a✝
case pred_var_
v : VarName
a✝¹ : PredName
a✝ : List VarName
⊢ pred_var_ a✝¹ (List.map (fun x => if v = x then v else x) a✝) = pred_var_ a✝¹ a✝
case eq_
v a✝¹ a✝ : VarName
⊢ eq_ (if v = a✝¹ then v else a✝¹) (if v = a✝ then v else a✝) = eq_ a✝¹ a✝
case not_
v : VarName
a✝ : Formula
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ (fastReplaceFree v v a✝).not_ = a✝.not_
case imp_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : fastReplaceFree v v a✝¹ = a✝¹
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ (fastReplaceFree v v a✝¹).imp_ (fastReplaceFree v v a✝) = a✝¹.imp_ a✝
case and_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : fastReplaceFree v v a✝¹ = a✝¹
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ (fastReplaceFree v v a✝¹).and_ (fastReplaceFree v v a✝) = a✝¹.and_ a✝
case or_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : fastReplaceFree v v a✝¹ = a✝¹
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ (fastReplaceFree v v a✝¹).or_ (fastReplaceFree v v a✝) = a✝¹.or_ a✝
case iff_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : fastReplaceFree v v a✝¹ = a✝¹
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ (fastReplaceFree v v a✝¹).iff_ (fastReplaceFree v v a✝) = a✝¹.iff_ a✝
case forall_
v a✝¹ : VarName
a✝ : Formula
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ (if v = a✝¹ then forall_ a✝¹ a✝ else forall_ a✝¹ (fastReplaceFree v v a✝)) = forall_ a✝¹ a✝
case exists_
v a✝¹ : VarName
a✝ : Formula
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ (if v = a✝¹ then exists_ a✝¹ a✝ else exists_ a✝¹ (fastReplaceFree v v a✝)) = exists_ a✝¹ a✝
case def_
v : VarName
a✝¹ : DefName
a✝ : List VarName
⊢ def_ a✝¹ (List.map (fun x => if v = x then v else x) a✝) = def_ a✝¹ a✝
|
Please generate a tactic in lean4 to solve the state.
STATE:
case pred_const_
v : VarName
a✝¹ : PredName
a✝ : List VarName
⊢ fastReplaceFree v v (pred_const_ a✝¹ a✝) = pred_const_ a✝¹ a✝
case pred_var_
v : VarName
a✝¹ : PredName
a✝ : List VarName
⊢ fastReplaceFree v v (pred_var_ a✝¹ a✝) = pred_var_ a✝¹ a✝
case eq_
v a✝¹ a✝ : VarName
⊢ fastReplaceFree v v (eq_ a✝¹ a✝) = eq_ a✝¹ a✝
case true_
v : VarName
⊢ fastReplaceFree v v true_ = true_
case false_
v : VarName
⊢ fastReplaceFree v v false_ = false_
case not_
v : VarName
a✝ : Formula
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v a✝.not_ = a✝.not_
case imp_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : fastReplaceFree v v a✝¹ = a✝¹
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v (a✝¹.imp_ a✝) = a✝¹.imp_ a✝
case and_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : fastReplaceFree v v a✝¹ = a✝¹
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v (a✝¹.and_ a✝) = a✝¹.and_ a✝
case or_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : fastReplaceFree v v a✝¹ = a✝¹
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v (a✝¹.or_ a✝) = a✝¹.or_ a✝
case iff_
v : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : fastReplaceFree v v a✝¹ = a✝¹
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v (a✝¹.iff_ a✝) = a✝¹.iff_ a✝
case forall_
v a✝¹ : VarName
a✝ : Formula
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v (forall_ a✝¹ a✝) = forall_ a✝¹ a✝
case exists_
v a✝¹ : VarName
a✝ : Formula
a_ih✝ : fastReplaceFree v v a✝ = a✝
⊢ fastReplaceFree v v (exists_ a✝¹ a✝) = exists_ a✝¹ a✝
case def_
v : VarName
a✝¹ : DefName
a✝ : List VarName
⊢ fastReplaceFree v v (def_ a✝¹ a✝) = def_ a✝¹ a✝
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.fastReplaceFree_self
|
[230, 1]
|
[255, 17]
|
case pred_const_ X xs | pred_var_ X xs | def_ X xs =>
simp
simp only [List.map_eq_self_iff]
simp
|
v : VarName
X : DefName
xs : List VarName
⊢ def_ X (List.map (fun x => if v = x then v else x) xs) = def_ X xs
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v : VarName
X : DefName
xs : List VarName
⊢ def_ X (List.map (fun x => if v = x then v else x) xs) = def_ X xs
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.fastReplaceFree_self
|
[230, 1]
|
[255, 17]
|
case eq_ x y =>
simp
|
v x y : VarName
⊢ eq_ (if v = x then v else x) (if v = y then v else y) = eq_ x y
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v x y : VarName
⊢ eq_ (if v = x then v else x) (if v = y then v else y) = eq_ x y
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.fastReplaceFree_self
|
[230, 1]
|
[255, 17]
|
case not_ phi phi_ih =>
congr!
|
v : VarName
phi : Formula
phi_ih : fastReplaceFree v v phi = phi
⊢ (fastReplaceFree v v phi).not_ = phi.not_
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v : VarName
phi : Formula
phi_ih : fastReplaceFree v v phi = phi
⊢ (fastReplaceFree v v phi).not_ = phi.not_
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.fastReplaceFree_self
|
[230, 1]
|
[255, 17]
|
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 =>
congr!
|
v : VarName
phi psi : Formula
phi_ih : fastReplaceFree v v phi = phi
psi_ih : fastReplaceFree v v psi = psi
⊢ (fastReplaceFree v v phi).iff_ (fastReplaceFree v v psi) = phi.iff_ psi
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v : VarName
phi psi : Formula
phi_ih : fastReplaceFree v v phi = phi
psi_ih : fastReplaceFree v v psi = psi
⊢ (fastReplaceFree v v phi).iff_ (fastReplaceFree v v psi) = phi.iff_ psi
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.fastReplaceFree_self
|
[230, 1]
|
[255, 17]
|
case forall_ x phi phi_ih | exists_ x phi phi_ih =>
simp
intro _
exact phi_ih
|
v x : VarName
phi : Formula
phi_ih : fastReplaceFree v v phi = phi
⊢ (if v = x then exists_ x phi else exists_ x (fastReplaceFree v v phi)) = exists_ x phi
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v x : VarName
phi : Formula
phi_ih : fastReplaceFree v v phi = phi
⊢ (if v = x then exists_ x phi else exists_ x (fastReplaceFree v v phi)) = exists_ x phi
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.fastReplaceFree_self
|
[230, 1]
|
[255, 17]
|
simp only [fastReplaceFree]
|
case def_
v : VarName
a✝¹ : DefName
a✝ : List VarName
⊢ fastReplaceFree v v (def_ a✝¹ a✝) = def_ a✝¹ a✝
|
case def_
v : VarName
a✝¹ : DefName
a✝ : List VarName
⊢ def_ a✝¹ (List.map (fun x => if v = x then v else x) a✝) = def_ a✝¹ a✝
|
Please generate a tactic in lean4 to solve the state.
STATE:
case def_
v : VarName
a✝¹ : DefName
a✝ : List VarName
⊢ fastReplaceFree v v (def_ a✝¹ a✝) = def_ a✝¹ a✝
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.fastReplaceFree_self
|
[230, 1]
|
[255, 17]
|
simp
|
v : VarName
X : DefName
xs : List VarName
⊢ def_ X (List.map (fun x => if v = x then v else x) xs) = def_ X xs
|
v : VarName
X : DefName
xs : List VarName
⊢ List.map (fun x => if v = x then v else x) xs = xs
|
Please generate a tactic in lean4 to solve the state.
STATE:
v : VarName
X : DefName
xs : List VarName
⊢ def_ X (List.map (fun x => if v = x then v else x) xs) = def_ X xs
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.fastReplaceFree_self
|
[230, 1]
|
[255, 17]
|
simp only [List.map_eq_self_iff]
|
v : VarName
X : DefName
xs : List VarName
⊢ List.map (fun x => if v = x then v else x) xs = xs
|
v : VarName
X : DefName
xs : List VarName
⊢ ∀ x ∈ xs, (if v = x then v else x) = x
|
Please generate a tactic in lean4 to solve the state.
STATE:
v : VarName
X : DefName
xs : List VarName
⊢ List.map (fun x => if v = x then v else x) xs = xs
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.fastReplaceFree_self
|
[230, 1]
|
[255, 17]
|
simp
|
v : VarName
X : DefName
xs : List VarName
⊢ ∀ x ∈ xs, (if v = x then v else x) = x
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v : VarName
X : DefName
xs : List VarName
⊢ ∀ x ∈ xs, (if v = x then v else x) = x
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.fastReplaceFree_self
|
[230, 1]
|
[255, 17]
|
simp
|
v x y : VarName
⊢ eq_ (if v = x then v else x) (if v = y then v else y) = eq_ x y
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v x y : VarName
⊢ eq_ (if v = x then v else x) (if v = y then v else y) = eq_ x y
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.fastReplaceFree_self
|
[230, 1]
|
[255, 17]
|
congr!
|
v : VarName
phi : Formula
phi_ih : fastReplaceFree v v phi = phi
⊢ (fastReplaceFree v v phi).not_ = phi.not_
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v : VarName
phi : Formula
phi_ih : fastReplaceFree v v phi = phi
⊢ (fastReplaceFree v v phi).not_ = phi.not_
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.fastReplaceFree_self
|
[230, 1]
|
[255, 17]
|
congr!
|
v : VarName
phi psi : Formula
phi_ih : fastReplaceFree v v phi = phi
psi_ih : fastReplaceFree v v psi = psi
⊢ (fastReplaceFree v v phi).iff_ (fastReplaceFree v v psi) = phi.iff_ psi
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v : VarName
phi psi : Formula
phi_ih : fastReplaceFree v v phi = phi
psi_ih : fastReplaceFree v v psi = psi
⊢ (fastReplaceFree v v phi).iff_ (fastReplaceFree v v psi) = phi.iff_ psi
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.fastReplaceFree_self
|
[230, 1]
|
[255, 17]
|
simp
|
v x : VarName
phi : Formula
phi_ih : fastReplaceFree v v phi = phi
⊢ (if v = x then exists_ x phi else exists_ x (fastReplaceFree v v phi)) = exists_ x phi
|
v x : VarName
phi : Formula
phi_ih : fastReplaceFree v v phi = phi
⊢ ¬v = x → fastReplaceFree v v phi = phi
|
Please generate a tactic in lean4 to solve the state.
STATE:
v x : VarName
phi : Formula
phi_ih : fastReplaceFree v v phi = phi
⊢ (if v = x then exists_ x phi else exists_ x (fastReplaceFree v v phi)) = exists_ x phi
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.fastReplaceFree_self
|
[230, 1]
|
[255, 17]
|
intro _
|
v x : VarName
phi : Formula
phi_ih : fastReplaceFree v v phi = phi
⊢ ¬v = x → fastReplaceFree v v phi = phi
|
v x : VarName
phi : Formula
phi_ih : fastReplaceFree v v phi = phi
a✝ : ¬v = x
⊢ fastReplaceFree v v phi = phi
|
Please generate a tactic in lean4 to solve the state.
STATE:
v x : VarName
phi : Formula
phi_ih : fastReplaceFree v v phi = phi
⊢ ¬v = x → fastReplaceFree v v phi = phi
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.fastReplaceFree_self
|
[230, 1]
|
[255, 17]
|
exact phi_ih
|
v x : VarName
phi : Formula
phi_ih : fastReplaceFree v v phi = phi
a✝ : ¬v = x
⊢ fastReplaceFree v v phi = phi
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v x : VarName
phi : Formula
phi_ih : fastReplaceFree v v phi = phi
a✝ : ¬v = x
⊢ fastReplaceFree v v phi = phi
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.not_free_in_fastReplaceFree_self
|
[258, 1]
|
[290, 10]
|
induction F
|
F : Formula
v t : VarName
h1 : ¬isFreeIn v F
⊢ fastReplaceFree v t F = F
|
case pred_const_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
h1 : ¬isFreeIn v (pred_const_ a✝¹ a✝)
⊢ fastReplaceFree v t (pred_const_ a✝¹ a✝) = pred_const_ a✝¹ a✝
case pred_var_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
h1 : ¬isFreeIn v (pred_var_ a✝¹ a✝)
⊢ fastReplaceFree v t (pred_var_ a✝¹ a✝) = pred_var_ a✝¹ a✝
case eq_
v t a✝¹ a✝ : VarName
h1 : ¬isFreeIn v (eq_ a✝¹ a✝)
⊢ fastReplaceFree v t (eq_ a✝¹ a✝) = eq_ a✝¹ a✝
case true_
v t : VarName
h1 : ¬isFreeIn v true_
⊢ fastReplaceFree v t true_ = true_
case false_
v t : VarName
h1 : ¬isFreeIn v false_
⊢ fastReplaceFree v t false_ = false_
case not_
v t : VarName
a✝ : Formula
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v a✝.not_
⊢ fastReplaceFree v t a✝.not_ = a✝.not_
case imp_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬isFreeIn v a✝¹ → fastReplaceFree v t a✝¹ = a✝¹
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v (a✝¹.imp_ a✝)
⊢ fastReplaceFree v t (a✝¹.imp_ a✝) = a✝¹.imp_ a✝
case and_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬isFreeIn v a✝¹ → fastReplaceFree v t a✝¹ = a✝¹
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v (a✝¹.and_ a✝)
⊢ fastReplaceFree v t (a✝¹.and_ a✝) = a✝¹.and_ a✝
case or_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬isFreeIn v a✝¹ → fastReplaceFree v t a✝¹ = a✝¹
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v (a✝¹.or_ a✝)
⊢ fastReplaceFree v t (a✝¹.or_ a✝) = a✝¹.or_ a✝
case iff_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬isFreeIn v a✝¹ → fastReplaceFree v t a✝¹ = a✝¹
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v (a✝¹.iff_ a✝)
⊢ fastReplaceFree v t (a✝¹.iff_ a✝) = a✝¹.iff_ a✝
case forall_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v (forall_ a✝¹ a✝)
⊢ fastReplaceFree v t (forall_ a✝¹ a✝) = forall_ a✝¹ a✝
case exists_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v (exists_ a✝¹ a✝)
⊢ fastReplaceFree v t (exists_ a✝¹ a✝) = exists_ a✝¹ a✝
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
h1 : ¬isFreeIn v (def_ a✝¹ a✝)
⊢ fastReplaceFree v t (def_ a✝¹ a✝) = def_ a✝¹ a✝
|
Please generate a tactic in lean4 to solve the state.
STATE:
F : Formula
v t : VarName
h1 : ¬isFreeIn v F
⊢ fastReplaceFree v t F = F
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.not_free_in_fastReplaceFree_self
|
[258, 1]
|
[290, 10]
|
any_goals
simp only [isFreeIn] at h1
simp only [fastReplaceFree]
|
case pred_const_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
h1 : ¬isFreeIn v (pred_const_ a✝¹ a✝)
⊢ fastReplaceFree v t (pred_const_ a✝¹ a✝) = pred_const_ a✝¹ a✝
case pred_var_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
h1 : ¬isFreeIn v (pred_var_ a✝¹ a✝)
⊢ fastReplaceFree v t (pred_var_ a✝¹ a✝) = pred_var_ a✝¹ a✝
case eq_
v t a✝¹ a✝ : VarName
h1 : ¬isFreeIn v (eq_ a✝¹ a✝)
⊢ fastReplaceFree v t (eq_ a✝¹ a✝) = eq_ a✝¹ a✝
case true_
v t : VarName
h1 : ¬isFreeIn v true_
⊢ fastReplaceFree v t true_ = true_
case false_
v t : VarName
h1 : ¬isFreeIn v false_
⊢ fastReplaceFree v t false_ = false_
case not_
v t : VarName
a✝ : Formula
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v a✝.not_
⊢ fastReplaceFree v t a✝.not_ = a✝.not_
case imp_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬isFreeIn v a✝¹ → fastReplaceFree v t a✝¹ = a✝¹
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v (a✝¹.imp_ a✝)
⊢ fastReplaceFree v t (a✝¹.imp_ a✝) = a✝¹.imp_ a✝
case and_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬isFreeIn v a✝¹ → fastReplaceFree v t a✝¹ = a✝¹
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v (a✝¹.and_ a✝)
⊢ fastReplaceFree v t (a✝¹.and_ a✝) = a✝¹.and_ a✝
case or_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬isFreeIn v a✝¹ → fastReplaceFree v t a✝¹ = a✝¹
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v (a✝¹.or_ a✝)
⊢ fastReplaceFree v t (a✝¹.or_ a✝) = a✝¹.or_ a✝
case iff_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬isFreeIn v a✝¹ → fastReplaceFree v t a✝¹ = a✝¹
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v (a✝¹.iff_ a✝)
⊢ fastReplaceFree v t (a✝¹.iff_ a✝) = a✝¹.iff_ a✝
case forall_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v (forall_ a✝¹ a✝)
⊢ fastReplaceFree v t (forall_ a✝¹ a✝) = forall_ a✝¹ a✝
case exists_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v (exists_ a✝¹ a✝)
⊢ fastReplaceFree v t (exists_ a✝¹ a✝) = exists_ a✝¹ a✝
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
h1 : ¬isFreeIn v (def_ a✝¹ a✝)
⊢ fastReplaceFree v t (def_ a✝¹ a✝) = def_ a✝¹ a✝
|
case pred_const_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
h1 : v ∉ a✝
⊢ pred_const_ a✝¹ (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 : v ∉ a✝
⊢ pred_var_ a✝¹ (List.map (fun x => if v = x then t else x) a✝) = pred_var_ a✝¹ a✝
case eq_
v t a✝¹ a✝ : VarName
h1 : ¬(v = a✝¹ ∨ v = a✝)
⊢ eq_ (if v = a✝¹ then t else a✝¹) (if v = a✝ then t else a✝) = eq_ a✝¹ a✝
case not_
v t : VarName
a✝ : Formula
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v a✝
⊢ (fastReplaceFree v t a✝).not_ = a✝.not_
case imp_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬isFreeIn v a✝¹ → fastReplaceFree v t a✝¹ = a✝¹
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬(isFreeIn v a✝¹ ∨ isFreeIn v a✝)
⊢ (fastReplaceFree v t a✝¹).imp_ (fastReplaceFree v t a✝) = a✝¹.imp_ a✝
case and_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬isFreeIn v a✝¹ → fastReplaceFree v t a✝¹ = a✝¹
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬(isFreeIn v a✝¹ ∨ isFreeIn v a✝)
⊢ (fastReplaceFree v t a✝¹).and_ (fastReplaceFree v t a✝) = a✝¹.and_ a✝
case or_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬isFreeIn v a✝¹ → fastReplaceFree v t a✝¹ = a✝¹
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬(isFreeIn v a✝¹ ∨ isFreeIn v a✝)
⊢ (fastReplaceFree v t a✝¹).or_ (fastReplaceFree v t a✝) = a✝¹.or_ a✝
case iff_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬isFreeIn v a✝¹ → fastReplaceFree v t a✝¹ = a✝¹
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬(isFreeIn v a✝¹ ∨ isFreeIn v a✝)
⊢ (fastReplaceFree v t a✝¹).iff_ (fastReplaceFree v t a✝) = a✝¹.iff_ a✝
case forall_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬(¬v = a✝¹ ∧ isFreeIn v a✝)
⊢ (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✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬(¬v = a✝¹ ∧ isFreeIn v a✝)
⊢ (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 : v ∉ a✝
⊢ def_ a✝¹ (List.map (fun x => if v = x then t else x) a✝) = def_ a✝¹ a✝
|
Please generate a tactic in lean4 to solve the state.
STATE:
case pred_const_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
h1 : ¬isFreeIn v (pred_const_ a✝¹ a✝)
⊢ fastReplaceFree v t (pred_const_ a✝¹ a✝) = pred_const_ a✝¹ a✝
case pred_var_
v t : VarName
a✝¹ : PredName
a✝ : List VarName
h1 : ¬isFreeIn v (pred_var_ a✝¹ a✝)
⊢ fastReplaceFree v t (pred_var_ a✝¹ a✝) = pred_var_ a✝¹ a✝
case eq_
v t a✝¹ a✝ : VarName
h1 : ¬isFreeIn v (eq_ a✝¹ a✝)
⊢ fastReplaceFree v t (eq_ a✝¹ a✝) = eq_ a✝¹ a✝
case true_
v t : VarName
h1 : ¬isFreeIn v true_
⊢ fastReplaceFree v t true_ = true_
case false_
v t : VarName
h1 : ¬isFreeIn v false_
⊢ fastReplaceFree v t false_ = false_
case not_
v t : VarName
a✝ : Formula
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v a✝.not_
⊢ fastReplaceFree v t a✝.not_ = a✝.not_
case imp_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬isFreeIn v a✝¹ → fastReplaceFree v t a✝¹ = a✝¹
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v (a✝¹.imp_ a✝)
⊢ fastReplaceFree v t (a✝¹.imp_ a✝) = a✝¹.imp_ a✝
case and_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬isFreeIn v a✝¹ → fastReplaceFree v t a✝¹ = a✝¹
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v (a✝¹.and_ a✝)
⊢ fastReplaceFree v t (a✝¹.and_ a✝) = a✝¹.and_ a✝
case or_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬isFreeIn v a✝¹ → fastReplaceFree v t a✝¹ = a✝¹
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v (a✝¹.or_ a✝)
⊢ fastReplaceFree v t (a✝¹.or_ a✝) = a✝¹.or_ a✝
case iff_
v t : VarName
a✝¹ a✝ : Formula
a_ih✝¹ : ¬isFreeIn v a✝¹ → fastReplaceFree v t a✝¹ = a✝¹
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v (a✝¹.iff_ a✝)
⊢ fastReplaceFree v t (a✝¹.iff_ a✝) = a✝¹.iff_ a✝
case forall_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v (forall_ a✝¹ a✝)
⊢ fastReplaceFree v t (forall_ a✝¹ a✝) = forall_ a✝¹ a✝
case exists_
v t a✝¹ : VarName
a✝ : Formula
a_ih✝ : ¬isFreeIn v a✝ → fastReplaceFree v t a✝ = a✝
h1 : ¬isFreeIn v (exists_ a✝¹ a✝)
⊢ fastReplaceFree v t (exists_ a✝¹ a✝) = exists_ a✝¹ a✝
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
h1 : ¬isFreeIn v (def_ a✝¹ a✝)
⊢ fastReplaceFree v t (def_ a✝¹ a✝) = def_ a✝¹ a✝
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.not_free_in_fastReplaceFree_self
|
[258, 1]
|
[290, 10]
|
case pred_const_ X xs | pred_var_ X xs | def_ X xs =>
simp
simp only [List.map_eq_self_iff]
simp
intro x a1 a2
subst a2
contradiction
|
v t : VarName
X : DefName
xs : List VarName
h1 : v ∉ xs
⊢ def_ X (List.map (fun x => if v = x then t else x) xs) = def_ X xs
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
X : DefName
xs : List VarName
h1 : v ∉ xs
⊢ def_ X (List.map (fun x => if v = x then t else x) xs) = def_ X xs
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.not_free_in_fastReplaceFree_self
|
[258, 1]
|
[290, 10]
|
case eq_ x y =>
simp
tauto
|
v t x y : VarName
h1 : ¬(v = x ∨ v = y)
⊢ eq_ (if v = x then t else x) (if v = y then t else y) = eq_ x y
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x y : VarName
h1 : ¬(v = x ∨ v = y)
⊢ eq_ (if v = x then t else x) (if v = y then t else y) = eq_ x y
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.not_free_in_fastReplaceFree_self
|
[258, 1]
|
[290, 10]
|
case not_ phi phi_ih =>
tauto
|
v t : VarName
phi : Formula
phi_ih : ¬isFreeIn v phi → fastReplaceFree v t phi = phi
h1 : ¬isFreeIn v phi
⊢ (fastReplaceFree v t phi).not_ = phi.not_
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
phi : Formula
phi_ih : ¬isFreeIn v phi → fastReplaceFree v t phi = phi
h1 : ¬isFreeIn v phi
⊢ (fastReplaceFree v t phi).not_ = phi.not_
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.not_free_in_fastReplaceFree_self
|
[258, 1]
|
[290, 10]
|
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
|
v t : VarName
phi psi : Formula
phi_ih : ¬isFreeIn v phi → fastReplaceFree v t phi = phi
psi_ih : ¬isFreeIn v psi → fastReplaceFree v t psi = psi
h1 : ¬(isFreeIn v phi ∨ isFreeIn v psi)
⊢ (fastReplaceFree v t phi).iff_ (fastReplaceFree v t psi) = phi.iff_ psi
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t : VarName
phi psi : Formula
phi_ih : ¬isFreeIn v phi → fastReplaceFree v t phi = phi
psi_ih : ¬isFreeIn v psi → fastReplaceFree v t psi = psi
h1 : ¬(isFreeIn v phi ∨ isFreeIn v psi)
⊢ (fastReplaceFree v t phi).iff_ (fastReplaceFree v t psi) = phi.iff_ psi
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.not_free_in_fastReplaceFree_self
|
[258, 1]
|
[290, 10]
|
case forall_ x phi phi_ih | exists_ x phi phi_ih =>
simp
tauto
|
v t x : VarName
phi : Formula
phi_ih : ¬isFreeIn v phi → fastReplaceFree v t phi = phi
h1 : ¬(¬v = x ∧ isFreeIn v phi)
⊢ (if v = x then exists_ x phi else exists_ x (fastReplaceFree v t phi)) = exists_ x phi
|
no goals
|
Please generate a tactic in lean4 to solve the state.
STATE:
v t x : VarName
phi : Formula
phi_ih : ¬isFreeIn v phi → fastReplaceFree v t phi = phi
h1 : ¬(¬v = x ∧ isFreeIn v phi)
⊢ (if v = x then exists_ x phi else exists_ x (fastReplaceFree v t phi)) = exists_ x phi
TACTIC:
|
https://github.com/pthomas505/FOL.git
|
097a4abea51b641d144539b9a0f7516f3b9d818c
|
FOL/NV/Sub/Var/One/Rec/ReplaceFree.lean
|
FOL.NV.Sub.Var.One.Rec.not_free_in_fastReplaceFree_self
|
[258, 1]
|
[290, 10]
|
simp only [isFreeIn] at h1
|
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
h1 : ¬isFreeIn v (def_ a✝¹ a✝)
⊢ fastReplaceFree v t (def_ a✝¹ a✝) = def_ a✝¹ a✝
|
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
h1 : v ∉ a✝
⊢ fastReplaceFree v t (def_ a✝¹ a✝) = def_ a✝¹ a✝
|
Please generate a tactic in lean4 to solve the state.
STATE:
case def_
v t : VarName
a✝¹ : DefName
a✝ : List VarName
h1 : ¬isFreeIn v (def_ a✝¹ a✝)
⊢ fastReplaceFree v t (def_ a✝¹ a✝) = def_ a✝¹ a✝
TACTIC:
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.