internlm/Lean-Github huggingface dataset:
Theorem: FOL.NV.Sub.Pred.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1 : Var.All.Rec.admits (Function.updateListITE id zs xs) H ∧ ∀ x ∈ binders, ¬(isFreeIn x H ∧ x ∉ zs)
⊢ (if X = P ∧ xs.length = zs.length then Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H
    else I.pred_var_ X (List.map V xs)) ↔
    Holds D I V E_ref
      (if X = P ∧ xs.length = zs.length then Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H
      else pred_var_ X xs)
Tactic:
simp only [Sub.Var.All.Rec.admits] at h1
Proof state after:
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1 : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H ∧ ∀ x ∈ binders, ¬(isFreeIn x H ∧ x ∉ zs)
⊢ (if X = P ∧ xs.length = zs.length then Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H
    else I.pred_var_ X (List.map V xs)) ↔
    Holds D I V E_ref
      (if X = P ∧ xs.length = zs.length then Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H
      else pred_var_ X xs)
Theorem: FOL.NV.Sub.Pred.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1 : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H ∧ ∀ x ∈ binders, ¬(isFreeIn x H ∧ x ∉ zs)
⊢ (if X = P ∧ xs.length = zs.length then Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H
    else I.pred_var_ X (List.map V xs)) ↔
    Holds D I V E_ref
      (if X = P ∧ xs.length = zs.length then Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H
      else pred_var_ X xs)
Tactic:
simp at h1
Proof state after:
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1 : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H ∧ ∀ x ∈ binders, isFreeIn x H → x ∈ zs
⊢ (if X = P ∧ xs.length = zs.length then Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H
    else I.pred_var_ X (List.map V xs)) ↔
    Holds D I V E_ref
      (if X = P ∧ xs.length = zs.length then Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H
      else pred_var_ X xs)
Theorem: FOL.NV.Sub.Pred.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1 : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H ∧ ∀ x ∈ binders, isFreeIn x H → x ∈ zs
⊢ (if X = P ∧ xs.length = zs.length then Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H
    else I.pred_var_ X (List.map V xs)) ↔
    Holds D I V E_ref
      (if X = P ∧ xs.length = zs.length then Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H
      else pred_var_ X xs)
Tactic:
cases h1
Proof state after:
case intro
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
left✝ : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H
right✝ : ∀ x ∈ binders, isFreeIn x H → x ∈ zs
⊢ (if X = P ∧ xs.length = zs.length then Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H
    else I.pred_var_ X (List.map V xs)) ↔
    Holds D I V E_ref
      (if X = P ∧ xs.length = zs.length then Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H
      else pred_var_ X xs)
Theorem: FOL.NV.Sub.Pred.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1_left : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H
h1_right : ∀ x ∈ binders, isFreeIn x H → x ∈ zs
⊢ (if X = P ∧ xs.length = zs.length then Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H
    else I.pred_var_ X (List.map V xs)) ↔
    Holds D I V E_ref
      (if X = P ∧ xs.length = zs.length then Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H
      else pred_var_ X xs)
Tactic:
have s1 :
  Holds D I (V ∘ Function.updateListITE id zs xs) E_ref H ↔
    Holds D I V E_ref (Sub.Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H) :=
  by
  exact Sub.Var.All.Rec.substitution_theorem D I V E_ref (Function.updateListITE id zs xs) H h1_left
Proof state after:
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1_left : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H
h1_right : ∀ x ∈ binders, isFreeIn x H → x ∈ zs
s1 :
  Holds D I (V ∘ Function.updateListITE id zs xs) E_ref H ↔
    Holds D I V E_ref (Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H)
⊢ (if X = P ∧ xs.length = zs.length then Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H
    else I.pred_var_ X (List.map V xs)) ↔
    Holds D I V E_ref
      (if X = P ∧ xs.length = zs.length then Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H
      else pred_var_ X xs)
Theorem: FOL.NV.Sub.Pred.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1_left : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H
h1_right : ∀ x ∈ binders, isFreeIn x H → x ∈ zs
s1 :
  Holds D I (V ∘ Function.updateListITE id zs xs) E_ref H ↔
    Holds D I V E_ref (Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H)
⊢ (if X = P ∧ xs.length = zs.length then Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H
    else I.pred_var_ X (List.map V xs)) ↔
    Holds D I V E_ref
      (if X = P ∧ xs.length = zs.length then Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H
      else pred_var_ X xs)
Tactic:
simp only [Function.updateListITE_comp] at s1
Proof state after:
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1_left : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H
h1_right : ∀ x ∈ binders, isFreeIn x H → x ∈ zs
s1 :
  Holds D I (Function.updateListITE (V ∘ id) zs (List.map V xs)) E_ref H ↔
    Holds D I V E_ref (Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H)
⊢ (if X = P ∧ xs.length = zs.length then Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H
    else I.pred_var_ X (List.map V xs)) ↔
    Holds D I V E_ref
      (if X = P ∧ xs.length = zs.length then Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H
      else pred_var_ X xs)
Theorem: FOL.NV.Sub.Pred.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1_left : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H
h1_right : ∀ x ∈ binders, isFreeIn x H → x ∈ zs
s1 :
  Holds D I (Function.updateListITE (V ∘ id) zs (List.map V xs)) E_ref H ↔
    Holds D I V E_ref (Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H)
⊢ (if X = P ∧ xs.length = zs.length then Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H
    else I.pred_var_ X (List.map V xs)) ↔
    Holds D I V E_ref
      (if X = P ∧ xs.length = zs.length then Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H
      else pred_var_ X xs)
Tactic:
simp at s1
Proof state after:
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1_left : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H
h1_right : ∀ x ∈ binders, isFreeIn x H → x ∈ zs
s1 :
  Holds D I (Function.updateListITE V zs (List.map V xs)) E_ref H ↔
    Holds D I V E_ref (Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H)
⊢ (if X = P ∧ xs.length = zs.length then Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H
    else I.pred_var_ X (List.map V xs)) ↔
    Holds D I V E_ref
      (if X = P ∧ xs.length = zs.length then Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H
      else pred_var_ X xs)
Theorem: FOL.NV.Sub.Pred.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1_left : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H
h1_right : ∀ x ∈ binders, isFreeIn x H → x ∈ zs
s1 :
  Holds D I (Function.updateListITE V zs (List.map V xs)) E_ref H ↔
    Holds D I V E_ref (Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H)
s2 :
  Holds D I (Function.updateListITE V zs (List.map V xs)) E_ref H ↔
    Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H
⊢ (if X = P ∧ xs.length = zs.length then Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H
    else I.pred_var_ X (List.map V xs)) ↔
    Holds D I V E_ref
      (if X = P ∧ xs.length = zs.length then Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H
      else pred_var_ X xs)
Tactic:
simp only [s2] at s1
Proof state after:
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1_left : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H
h1_right : ∀ x ∈ binders, isFreeIn x H → x ∈ zs
s2 :
  Holds D I (Function.updateListITE V zs (List.map V xs)) E_ref H ↔
    Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H
s1 :
  Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H ↔
    Holds D I V E_ref (Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H)
⊢ (if X = P ∧ xs.length = zs.length then Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H
    else I.pred_var_ X (List.map V xs)) ↔
    Holds D I V E_ref
      (if X = P ∧ xs.length = zs.length then Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H
      else pred_var_ X xs)
Theorem: FOL.NV.Sub.Pred.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1_left : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H
h1_right : ∀ x ∈ binders, isFreeIn x H → x ∈ zs
s2 :
  Holds D I (Function.updateListITE V zs (List.map V xs)) E_ref H ↔
    Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H
s1 :
  Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H ↔
    Holds D I V E_ref (Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H)
c2 : X = P ∧ xs.length = zs.length
⊢ Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H ↔
    Holds D I V E_ref (Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H)
Tactic:
case pos c2 =>
  exact s1
Proof state after:
no goals
Theorem: FOL.NV.Sub.Pred.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1_left : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H
h1_right : ∀ x ∈ binders, isFreeIn x H → x ∈ zs
s2 :
  Holds D I (Function.updateListITE V zs (List.map V xs)) E_ref H ↔
    Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H
s1 :
  Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H ↔
    Holds D I V E_ref (Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H)
h✝ : ¬(X = P ∧ xs.length = zs.length)
⊢ Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H ↔
    Holds D I V E_ref (Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H)
Tactic:
case neg _ =>
  exact s1
Proof state after:
no goals
Theorem: FOL.NV.Sub.Pred.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1_left : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H
h1_right : ∀ x ∈ binders, isFreeIn x H → x ∈ zs
⊢ Holds D I (V ∘ Function.updateListITE id zs xs) E_ref H ↔
    Holds D I V E_ref (Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H)
Tactic:
exact Sub.Var.All.Rec.substitution_theorem D I V E_ref (Function.updateListITE id zs xs) H h1_left
Proof state after:
no goals
Theorem: FOL.NV.Sub.Pred.One.Rec.substitution_theorem_aux
Proof state before:
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1_left : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H
h1_right : ∀ x ∈ binders, isFreeIn x H → x ∈ zs
s1 :
  Holds D I (Function.updateListITE V zs (List.map V xs)) E_ref H ↔
    Holds D I V E_ref (Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H)
⊢ Holds D I (Function.updateListITE V zs (List.map V xs)) E_ref H ↔
    Holds D I (Function.updateListITE V' zs (List.map V xs)) E_ref H
Tactic:
apply Holds_coincide_Var
Proof state after:
case h1
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1_left : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H
h1_right : ∀ x ∈ binders, isFreeIn x H → x ∈ zs
s1 :
  Holds D I (Function.updateListITE V zs (List.map V xs)) E_ref H ↔
    Holds D I V E_ref (Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H)
⊢ ∀ (v : VarName),
    isFreeIn v H → Function.updateListITE V zs (List.map V xs) v = Function.updateListITE V' zs (List.map V xs) v
Theorem: FOL.NV.Sub.Pred.One.Rec.substitution_theorem_aux
Proof state before:
case h1
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1_left : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H
h1_right : ∀ x ∈ binders, isFreeIn x H → x ∈ zs
s1 :
  Holds D I (Function.updateListITE V zs (List.map V xs)) E_ref H ↔
    Holds D I V E_ref (Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H)
⊢ ∀ (v : VarName),
    isFreeIn v H → Function.updateListITE V zs (List.map V xs) v = Function.updateListITE V' zs (List.map V xs) v
Tactic:
intro v a1
Proof state after:
case h1
D : Type
I : Interpretation D
V' : VarAssignment D
P : PredName
zs : List VarName
H : Formula
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  ∀ (V : VarAssignment D) (F : Formula) (binders : Finset VarName),
    admitsAux P zs H binders F →
      (∀ x ∉ binders, V x = V' x) →
        let E_ref := tail✝;
        Holds D (I' D I V' E_ref P zs H) V E_ref F ↔ Holds D I V E_ref (replace P zs H F)
E_ref : Env := head✝ :: tail✝
X : PredName
xs : List VarName
V : VarAssignment D
binders : Finset VarName
h2 : ∀ x ∉ binders, V x = V' x
c1 : X = P ∧ xs.length = zs.length
h1_left : Var.All.Rec.admitsAux (Function.updateListITE id zs xs) ∅ H
h1_right : ∀ x ∈ binders, isFreeIn x H → x ∈ zs
s1 :
  Holds D I (Function.updateListITE V zs (List.map V xs)) E_ref H ↔
    Holds D I V E_ref (Var.All.Rec.fastReplaceFree (Function.updateListITE id zs xs) H)
v : VarName
a1 : isFreeIn v H
⊢ Function.updateListITE V zs (List.map V xs) v = Function.updateListITE V' zs (List.map V xs) v