internlm/Lean-Github huggingface dataset:
Theorem: FOL.NV.Sub.Var.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tail✝ F ↔ Holds D I V tail✝ (fastReplaceFree v t F))
x : VarName
phi : Formula
phi_ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName),
    fastAdmitsAux v t binders phi →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) (head✝ :: tail✝) phi ↔
          Holds D I V (head✝ :: tail✝) (fastReplaceFree v t phi))
V : VarAssignment D
binders : Finset VarName
h2 : ∀ v ∉ binders, V' v = V v
c1 : ¬v = x
d : D
h1 : fastAdmitsAux v t (binders ∪ {x}) phi
⊢ ∀ v ∉ binders ∪ {x}, V' v = Function.updateITE V x d v
Tactic:
simp only [Function.updateITE]
Proof state after:
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tail✝ F ↔ Holds D I V tail✝ (fastReplaceFree v t F))
x : VarName
phi : Formula
phi_ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName),
    fastAdmitsAux v t binders phi →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) (head✝ :: tail✝) phi ↔
          Holds D I V (head✝ :: tail✝) (fastReplaceFree v t phi))
V : VarAssignment D
binders : Finset VarName
h2 : ∀ v ∉ binders, V' v = V v
c1 : ¬v = x
d : D
h1 : fastAdmitsAux v t (binders ∪ {x}) phi
⊢ ∀ v ∉ binders ∪ {x}, V' v = if v = x then d else V v
Theorem: FOL.NV.Sub.Var.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tail✝ F ↔ Holds D I V tail✝ (fastReplaceFree v t F))
x : VarName
phi : Formula
phi_ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName),
    fastAdmitsAux v t binders phi →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) (head✝ :: tail✝) phi ↔
          Holds D I V (head✝ :: tail✝) (fastReplaceFree v t phi))
V : VarAssignment D
binders : Finset VarName
h2 : ∀ v ∉ binders, V' v = V v
c1 : ¬v = x
d : D
h1 : fastAdmitsAux v t (binders ∪ {x}) phi
⊢ ∀ v ∉ binders ∪ {x}, V' v = if v = x then d else V v
Tactic:
simp
Proof state after:
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tail✝ F ↔ Holds D I V tail✝ (fastReplaceFree v t F))
x : VarName
phi : Formula
phi_ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName),
    fastAdmitsAux v t binders phi →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) (head✝ :: tail✝) phi ↔
          Holds D I V (head✝ :: tail✝) (fastReplaceFree v t phi))
V : VarAssignment D
binders : Finset VarName
h2 : ∀ v ∉ binders, V' v = V v
c1 : ¬v = x
d : D
h1 : fastAdmitsAux v t (binders ∪ {x}) phi
⊢ ∀ v ∉ binders, ¬v = x → V' v = if v = x then d else V v
Theorem: FOL.NV.Sub.Var.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tail✝ F ↔ Holds D I V tail✝ (fastReplaceFree v t F))
x : VarName
phi : Formula
phi_ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName),
    fastAdmitsAux v t binders phi →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) (head✝ :: tail✝) phi ↔
          Holds D I V (head✝ :: tail✝) (fastReplaceFree v t phi))
V : VarAssignment D
binders : Finset VarName
h2 : ∀ v ∉ binders, V' v = V v
c1 : ¬v = x
d : D
h1 : fastAdmitsAux v t (binders ∪ {x}) phi
⊢ ∀ v ∉ binders, ¬v = x → V' v = if v = x then d else V v
Tactic:
push_neg
Proof state after:
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tail✝ F ↔ Holds D I V tail✝ (fastReplaceFree v t F))
x : VarName
phi : Formula
phi_ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName),
    fastAdmitsAux v t binders phi →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) (head✝ :: tail✝) phi ↔
          Holds D I V (head✝ :: tail✝) (fastReplaceFree v t phi))
V : VarAssignment D
binders : Finset VarName
h2 : ∀ v ∉ binders, V' v = V v
c1 : ¬v = x
d : D
h1 : fastAdmitsAux v t (binders ∪ {x}) phi
⊢ ∀ v ∉ binders, v ≠ x → V' v = if v = x then d else V v
Theorem: FOL.NV.Sub.Var.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tail✝ F ↔ Holds D I V tail✝ (fastReplaceFree v t F))
x : VarName
phi : Formula
phi_ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName),
    fastAdmitsAux v t binders phi →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) (head✝ :: tail✝) phi ↔
          Holds D I V (head✝ :: tail✝) (fastReplaceFree v t phi))
V : VarAssignment D
binders : Finset VarName
h2 : ∀ v ∉ binders, V' v = V v
c1 : ¬v = x
d : D
h1 : fastAdmitsAux v t (binders ∪ {x}) phi
⊢ ∀ v ∉ binders, v ≠ x → V' v = if v = x then d else V v
Tactic:
intros v' a1 a2
Proof state after:
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tail✝ F ↔ Holds D I V tail✝ (fastReplaceFree v t F))
x : VarName
phi : Formula
phi_ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName),
    fastAdmitsAux v t binders phi →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) (head✝ :: tail✝) phi ↔
          Holds D I V (head✝ :: tail✝) (fastReplaceFree v t phi))
V : VarAssignment D
binders : Finset VarName
h2 : ∀ v ∉ binders, V' v = V v
c1 : ¬v = x
d : D
h1 : fastAdmitsAux v t (binders ∪ {x}) phi
v' : VarName
a1 : v' ∉ binders
a2 : v' ≠ x
⊢ V' v' = if v' = x then d else V v'
Theorem: FOL.NV.Sub.Var.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tail✝ F ↔ Holds D I V tail✝ (fastReplaceFree v t F))
x : VarName
phi : Formula
phi_ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName),
    fastAdmitsAux v t binders phi →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) (head✝ :: tail✝) phi ↔
          Holds D I V (head✝ :: tail✝) (fastReplaceFree v t phi))
V : VarAssignment D
binders : Finset VarName
h2 : ∀ v ∉ binders, V' v = V v
c1 : ¬v = x
d : D
h1 : fastAdmitsAux v t (binders ∪ {x}) phi
v' : VarName
a1 : v' ∉ binders
a2 : v' ≠ x
⊢ V' v' = if v' = x then d else V v'
Tactic:
simp only [if_neg a2]
Proof state after:
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tail✝ F ↔ Holds D I V tail✝ (fastReplaceFree v t F))
x : VarName
phi : Formula
phi_ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName),
    fastAdmitsAux v t binders phi →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) (head✝ :: tail✝) phi ↔
          Holds D I V (head✝ :: tail✝) (fastReplaceFree v t phi))
V : VarAssignment D
binders : Finset VarName
h2 : ∀ v ∉ binders, V' v = V v
c1 : ¬v = x
d : D
h1 : fastAdmitsAux v t (binders ∪ {x}) phi
v' : VarName
a1 : v' ∉ binders
a2 : v' ≠ x
⊢ V' v' = V v'
Theorem: FOL.NV.Sub.Var.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tail✝ F ↔ Holds D I V tail✝ (fastReplaceFree v t F))
x : VarName
phi : Formula
phi_ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName),
    fastAdmitsAux v t binders phi →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) (head✝ :: tail✝) phi ↔
          Holds D I V (head✝ :: tail✝) (fastReplaceFree v t phi))
V : VarAssignment D
binders : Finset VarName
h2 : ∀ v ∉ binders, V' v = V v
c1 : ¬v = x
d : D
h1 : fastAdmitsAux v t (binders ∪ {x}) phi
v' : VarName
a1 : v' ∉ binders
a2 : v' ≠ x
⊢ V' v' = V v'
Tactic:
exact h2 v' a1
Proof state after:
no goals
Theorem: FOL.NV.Sub.Var.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
hd : Definition
tl : List Definition
ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tl F ↔ Holds D I V tl (fastReplaceFree v t F))
X : DefName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h1 : v ∈ xs → t ∉ binders
h2 : ∀ v ∉ binders, V' v = V v
⊢ (if X = hd.name ∧ xs.length = hd.args.length then
      Holds D I
        (Function.updateListITE (Function.updateITE V v (V' t)) hd.args (List.map (Function.updateITE V v (V' t)) xs))
        tl hd.q
    else Holds D I (Function.updateITE V v (V' t)) tl (def_ X xs)) ↔
    if X = hd.name ∧ (List.map (fun x => if v = x then t else x) xs).length = hd.args.length then
      Holds D I (Function.updateListITE V hd.args (List.map V (List.map (fun x => if v = x then t else x) xs))) tl hd.q
    else Holds D I V tl (def_ X (List.map (fun x => if v = x then t else x) xs))
Tactic:
unfold Function.updateITE
Proof state after:
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
hd : Definition
tl : List Definition
ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tl F ↔ Holds D I V tl (fastReplaceFree v t F))
X : DefName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h1 : v ∈ xs → t ∉ binders
h2 : ∀ v ∉ binders, V' v = V v
⊢ (if X = hd.name ∧ xs.length = hd.args.length then
      Holds D I
        (Function.updateListITE (fun c => if c = v then V' t else V c) hd.args
          (List.map (fun c => if c = v then V' t else V c) xs))
        tl hd.q
    else Holds D I (fun c => if c = v then V' t else V c) tl (def_ X xs)) ↔
    if X = hd.name ∧ (List.map (fun x => if v = x then t else x) xs).length = hd.args.length then
      Holds D I (Function.updateListITE V hd.args (List.map V (List.map (fun x => if v = x then t else x) xs))) tl hd.q
    else Holds D I V tl (def_ X (List.map (fun x => if v = x then t else x) xs))
Theorem: FOL.NV.Sub.Var.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
hd : Definition
tl : List Definition
ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tl F ↔ Holds D I V tl (fastReplaceFree v t F))
X : DefName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h1 : v ∈ xs → t ∉ binders
h2 : ∀ v ∉ binders, V' v = V v
⊢ X = hd.name ∧ xs.length = hd.args.length ↔
    X = hd.name ∧ (List.map (fun x => if v = x then t else x) xs).length = hd.args.length
Tactic:
case _ =>
  simp
Proof state after:
no goals
Theorem: FOL.NV.Sub.Var.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
hd : Definition
tl : List Definition
ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tl F ↔ Holds D I V tl (fastReplaceFree v t F))
X : DefName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h1 : v ∈ xs → t ∉ binders
h2 : ∀ v ∉ binders, V' v = V v
⊢ X = hd.name ∧ xs.length = hd.args.length ↔
    X = hd.name ∧ (List.map (fun x => if v = x then t else x) xs).length = hd.args.length
Tactic:
simp
Proof state after:
no goals
Theorem: FOL.NV.Sub.Var.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
hd : Definition
tl : List Definition
ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tl F ↔ Holds D I V tl (fastReplaceFree v t F))
X : DefName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h1 : v ∈ xs → t ∉ binders
h2 : ∀ v ∉ binders, V' v = V v
c1 : X = hd.name ∧ (List.map (fun x => if v = x then t else x) xs).length = hd.args.length
⊢ Holds D I
      (Function.updateListITE (fun c => if c = v then V' t else V c) hd.args
        (List.map (fun c => if c = v then V' t else V c) xs))
      tl hd.q ↔
    Holds D I (Function.updateListITE V hd.args (List.map V (List.map (fun x => if v = x then t else x) xs))) tl hd.q
Tactic:
apply Holds_coincide_Var
Proof state after:
case h1
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
hd : Definition
tl : List Definition
ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tl F ↔ Holds D I V tl (fastReplaceFree v t F))
X : DefName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h1 : v ∈ xs → t ∉ binders
h2 : ∀ v ∉ binders, V' v = V v
c1 : X = hd.name ∧ (List.map (fun x => if v = x then t else x) xs).length = hd.args.length
⊢ ∀ (v_1 : VarName),
    isFreeIn v_1 hd.q →
      Function.updateListITE (fun c => if c = v then V' t else V c) hd.args
          (List.map (fun c => if c = v then V' t else V c) xs) v_1 =
        Function.updateListITE V hd.args (List.map V (List.map (fun x => if v = x then t else x) xs)) v_1
Theorem: FOL.NV.Sub.Var.One.Rec.substitution_theorem_aux
Proof state before:
case h1
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
hd : Definition
tl : List Definition
ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tl F ↔ Holds D I V tl (fastReplaceFree v t F))
X : DefName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h1 : v ∈ xs → t ∉ binders
h2 : ∀ v ∉ binders, V' v = V v
c1 : X = hd.name ∧ (List.map (fun x => if v = x then t else x) xs).length = hd.args.length
⊢ ∀ (v_1 : VarName),
    isFreeIn v_1 hd.q →
      Function.updateListITE (fun c => if c = v then V' t else V c) hd.args
          (List.map (fun c => if c = v then V' t else V c) xs) v_1 =
        Function.updateListITE V hd.args (List.map V (List.map (fun x => if v = x then t else x) xs)) v_1
Tactic:
intro v' a1
Proof state after:
case h1
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
hd : Definition
tl : List Definition
ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tl F ↔ Holds D I V tl (fastReplaceFree v t F))
X : DefName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h1 : v ∈ xs → t ∉ binders
h2 : ∀ v ∉ binders, V' v = V v
c1 : X = hd.name ∧ (List.map (fun x => if v = x then t else x) xs).length = hd.args.length
v' : VarName
a1 : isFreeIn v' hd.q
⊢ Function.updateListITE (fun c => if c = v then V' t else V c) hd.args
      (List.map (fun c => if c = v then V' t else V c) xs) v' =
    Function.updateListITE V hd.args (List.map V (List.map (fun x => if v = x then t else x) xs)) v'
Theorem: FOL.NV.Sub.Var.One.Rec.substitution_theorem_aux
Proof state before:
case h1
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
hd : Definition
tl : List Definition
ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tl F ↔ Holds D I V tl (fastReplaceFree v t F))
X : DefName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h1 : v ∈ xs → t ∉ binders
h2 : ∀ v ∉ binders, V' v = V v
c1 : X = hd.name ∧ (List.map (fun x => if v = x then t else x) xs).length = hd.args.length
v' : VarName
a1 : isFreeIn v' hd.q
⊢ Function.updateListITE (fun c => if c = v then V' t else V c) hd.args
      (List.map (fun c => if c = v then V' t else V c) xs) v' =
    Function.updateListITE V hd.args (List.map V (List.map (fun x => if v = x then t else x) xs)) v'
Tactic:
simp
Proof state after:
case h1
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
hd : Definition
tl : List Definition
ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tl F ↔ Holds D I V tl (fastReplaceFree v t F))
X : DefName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h1 : v ∈ xs → t ∉ binders
h2 : ∀ v ∉ binders, V' v = V v
c1 : X = hd.name ∧ (List.map (fun x => if v = x then t else x) xs).length = hd.args.length
v' : VarName
a1 : isFreeIn v' hd.q
⊢ Function.updateListITE (fun c => if c = v then V' t else V c) hd.args
      (List.map (fun c => if c = v then V' t else V c) xs) v' =
    Function.updateListITE V hd.args (List.map (V ∘ fun x => if v = x then t else x) xs) v'
Theorem: FOL.NV.Sub.Var.One.Rec.substitution_theorem_aux
Proof state before:
case h1
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
hd : Definition
tl : List Definition
ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tl F ↔ Holds D I V tl (fastReplaceFree v t F))
X : DefName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h1 : v ∈ xs → t ∉ binders
h2 : ∀ v ∉ binders, V' v = V v
c1 : X = hd.name ∧ (List.map (fun x => if v = x then t else x) xs).length = hd.args.length
v' : VarName
a1 : isFreeIn v' hd.q
⊢ Function.updateListITE (fun c => if c = v then V' t else V c) hd.args
      (List.map (fun c => if c = v then V' t else V c) xs) v' =
    Function.updateListITE V hd.args (List.map (V ∘ fun x => if v = x then t else x) xs) v'
Tactic:
simp only [eq_comm]
Proof state after:
case h1
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
hd : Definition
tl : List Definition
ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tl F ↔ Holds D I V tl (fastReplaceFree v t F))
X : DefName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h1 : v ∈ xs → t ∉ binders
h2 : ∀ v ∉ binders, V' v = V v
c1 : X = hd.name ∧ (List.map (fun x => if v = x then t else x) xs).length = hd.args.length
v' : VarName
a1 : isFreeIn v' hd.q
⊢ Function.updateListITE (fun c => if v = c then V' t else V c) hd.args
      (List.map (fun c => if v = c then V' t else V c) xs) v' =
    Function.updateListITE V hd.args (List.map (V ∘ fun x => if v = x then t else x) xs) v'
Theorem: FOL.NV.Sub.Var.One.Rec.substitution_theorem_aux
Proof state before:
case h1
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
hd : Definition
tl : List Definition
ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tl F ↔ Holds D I V tl (fastReplaceFree v t F))
X : DefName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h1 : v ∈ xs → t ∉ binders
h2 : ∀ v ∉ binders, V' v = V v
c1 : X = hd.name ∧ (List.map (fun x => if v = x then t else x) xs).length = hd.args.length
v' : VarName
a1 : isFreeIn v' hd.q
⊢ Function.updateListITE (fun c => if v = c then V' t else V c) hd.args
      (List.map (fun c => if v = c then V' t else V c) xs) v' =
    Function.updateListITE V hd.args (List.map (V ∘ fun x => if v = x then t else x) xs) v'
Tactic:
have s1 :
  (List.map (fun (x : VarName) =>
    if v = x then V' t else V x) xs) =
      (List.map (V ∘ fun (x : VarName) =>
        if v = x then t else x) xs)
Proof state after:
case s1
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
hd : Definition
tl : List Definition
ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tl F ↔ Holds D I V tl (fastReplaceFree v t F))
X : DefName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h1 : v ∈ xs → t ∉ binders
h2 : ∀ v ∉ binders, V' v = V v
c1 : X = hd.name ∧ (List.map (fun x => if v = x then t else x) xs).length = hd.args.length
v' : VarName
a1 : isFreeIn v' hd.q
⊢ List.map (fun x => if v = x then V' t else V x) xs = List.map (V ∘ fun x => if v = x then t else x) xs

case h1
D : Type
I : Interpretation D
V' : VarAssignment D
v t : VarName
hd : Definition
tl : List Definition
ih :
  ∀ (V : VarAssignment D) (binders : Finset VarName) (F : Formula),
    fastAdmitsAux v t binders F →
      (∀ v ∉ binders, V' v = V v) →
        (Holds D I (Function.updateITE V v (V' t)) tl F ↔ Holds D I V tl (fastReplaceFree v t F))
X : DefName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h1 : v ∈ xs → t ∉ binders
h2 : ∀ v ∉ binders, V' v = V v
c1 : X = hd.name ∧ (List.map (fun x => if v = x then t else x) xs).length = hd.args.length
v' : VarName
a1 : isFreeIn v' hd.q
s1 : List.map (fun x => if v = x then V' t else V x) xs = List.map (V ∘ fun x => if v = x then t else x) xs
⊢ Function.updateListITE (fun c => if v = c then V' t else V c) hd.args
      (List.map (fun c => if v = c then V' t else V c) xs) v' =
    Function.updateListITE V hd.args (List.map (V ∘ fun x => if v = x then t else x) xs) v'