internlm/Lean-Github huggingface dataset:
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
case h.h1
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
⊢ ∀ (v : VarName),
    isFreeIn v h1_phi →
      Function.updateITE (Function.updateITE V h1_v (V h1_t)) h1_x d v =
        Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t) v
Tactic:
intro x _
Proof state after:
case h.h1
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝¹ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
x : VarName
a✝ : isFreeIn x h1_phi
⊢ Function.updateITE (Function.updateITE V h1_v (V h1_t)) h1_x d x =
    Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t) x
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
case h.h1
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝¹ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
x : VarName
a✝ : isFreeIn x h1_phi
⊢ Function.updateITE (Function.updateITE V h1_v (V h1_t)) h1_x d x =
    Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t) x
Tactic:
simp only [Function.updateITE]
Proof state after:
case h.h1
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝¹ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
x : VarName
a✝ : isFreeIn x h1_phi
⊢ (if x = h1_x then d else if x = h1_v then V h1_t else V x) =
    if x = h1_v then if h1_t = h1_x then d else V h1_t else if x = h1_x then d else V x
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
case h.h1
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝¹ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
x : VarName
a✝ : isFreeIn x h1_phi
⊢ (if x = h1_x then d else if x = h1_v then V h1_t else V x) =
    if x = h1_v then if h1_t = h1_x then d else V h1_t else if x = h1_x then d else V x
Tactic:
simp only [eq_comm]
Proof state after:
case h.h1
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝¹ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
x : VarName
a✝ : isFreeIn x h1_phi
⊢ (if h1_x = x then d else if h1_v = x then V h1_t else V x) =
    if h1_v = x then if h1_x = h1_t then d else V h1_t else if h1_x = x then d else V x
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
case h.h1
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝¹ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
x : VarName
a✝ : isFreeIn x h1_phi
⊢ (if h1_x = x then d else if h1_v = x then V h1_t else V x) =
    if h1_v = x then if h1_x = h1_t then d else V h1_t else if h1_x = x then d else V x
Tactic:
split_ifs
Proof state after:
case pos
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝¹ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
x : VarName
a✝ : isFreeIn x h1_phi
h✝¹ : h1_x = x
h✝ : h1_v = x
⊢ d = V h1_t

case neg
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝¹ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
x : VarName
a✝ : isFreeIn x h1_phi
h✝¹ : h1_x = x
h✝ : ¬h1_v = x
⊢ d = d

case pos
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝¹ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
x : VarName
a✝ : isFreeIn x h1_phi
h✝¹ : ¬h1_x = x
h✝ : h1_v = x
⊢ V h1_t = V h1_t

case neg
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝¹ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
x : VarName
a✝ : isFreeIn x h1_phi
h✝¹ : ¬h1_x = x
h✝ : ¬h1_v = x
⊢ V x = V x
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
x : VarName
c1 : isFreeIn x h1_phi
c2 : h1_x = x
c3 : h1_v = x
⊢ d = V h1_t
Tactic:
case _ c1 c2 c3 =>
  subst c2
  cases h1_1
  case intro h1_1_left h1_1_right =>
    contradiction
Proof state after:
no goals
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝¹ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
x : VarName
a✝ : isFreeIn x h1_phi
h✝¹ : ¬h1_x = x
h✝ : ¬h1_v = x
⊢ V x = V x
Tactic:
case _ | _ | _ =>
  rfl
Proof state after:
no goals
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝ : IsSub h1_phi h1_v h1_t h1_phi'
h1_ih : ∀ (V : VarAssignment D), Holds D I (Function.updateITE V h1_v (V h1_t)) E h1_phi ↔ Holds D I V E h1_phi'
V : VarAssignment D
⊢ (∀ (d : D), Holds D I (Function.updateITE (Function.updateITE V h1_v (V h1_t)) h1_x d) E h1_phi) ↔
    ∀ (d : D), Holds D I (Function.updateITE V h1_x d) E h1_phi'
Tactic:
apply forall_congr'
Proof state after:
case h
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝ : IsSub h1_phi h1_v h1_t h1_phi'
h1_ih : ∀ (V : VarAssignment D), Holds D I (Function.updateITE V h1_v (V h1_t)) E h1_phi ↔ Holds D I V E h1_phi'
V : VarAssignment D
⊢ ∀ (a : D),
    Holds D I (Function.updateITE (Function.updateITE V h1_v (V h1_t)) h1_x a) E h1_phi ↔
      Holds D I (Function.updateITE V h1_x a) E h1_phi'
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝ : IsSub h1_phi h1_v h1_t h1_phi'
h1_ih : ∀ (V : VarAssignment D), Holds D I (Function.updateITE V h1_v (V h1_t)) E h1_phi ↔ Holds D I V E h1_phi'
V : VarAssignment D
⊢ (∃ d, Holds D I (Function.updateITE (Function.updateITE V h1_v (V h1_t)) h1_x d) E h1_phi) ↔
    ∃ d, Holds D I (Function.updateITE V h1_x d) E h1_phi'
Tactic:
apply exists_congr
Proof state after:
case h
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝ : IsSub h1_phi h1_v h1_t h1_phi'
h1_ih : ∀ (V : VarAssignment D), Holds D I (Function.updateITE V h1_v (V h1_t)) E h1_phi ↔ Holds D I V E h1_phi'
V : VarAssignment D
⊢ ∀ (a : D),
    Holds D I (Function.updateITE (Function.updateITE V h1_v (V h1_t)) h1_x a) E h1_phi ↔
      Holds D I (Function.updateITE V h1_x a) E h1_phi'
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
x : VarName
c1 : isFreeIn x h1_phi
c2 : h1_x = x
c3 : h1_v = x
⊢ d = V h1_t
Tactic:
subst c2
Proof state after:
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
c1 : isFreeIn h1_x h1_phi
c3 : h1_v = h1_x
⊢ d = V h1_t
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
c1 : isFreeIn h1_x h1_phi
c3 : h1_v = h1_x
⊢ d = V h1_t
Tactic:
cases h1_1
Proof state after:
case intro
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_2 : ¬h1_x = h1_t
a✝ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
c1 : isFreeIn h1_x h1_phi
c3 : h1_v = h1_x
left✝ : ¬h1_v = h1_x
right✝ : isFreeIn h1_v h1_phi
⊢ d = V h1_t
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_2 : ¬h1_x = h1_t
a✝ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
c1 : isFreeIn h1_x h1_phi
c3 : h1_v = h1_x
h1_1_left : ¬h1_v = h1_x
h1_1_right : isFreeIn h1_v h1_phi
⊢ d = V h1_t
Tactic:
case intro h1_1_left h1_1_right =>
  contradiction
Proof state after:
no goals
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_2 : ¬h1_x = h1_t
a✝ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
c1 : isFreeIn h1_x h1_phi
c3 : h1_v = h1_x
h1_1_left : ¬h1_v = h1_x
h1_1_right : isFreeIn h1_v h1_phi
⊢ d = V h1_t
Tactic:
contradiction
Proof state after:
no goals
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_x : VarName
h1_phi : Formula
h1_v h1_t : VarName
h1_phi' : Formula
h1_1 : ¬h1_v = h1_x ∧ isFreeIn h1_v h1_phi
h1_2 : ¬h1_x = h1_t
a✝¹ : IsSub h1_phi h1_v h1_t h1_phi'
V : VarAssignment D
d : D
h1_ih :
  Holds D I (Function.updateITE (Function.updateITE V h1_x d) h1_v (Function.updateITE V h1_x d h1_t)) E h1_phi ↔
    Holds D I (Function.updateITE V h1_x d) E h1_phi'
x : VarName
a✝ : isFreeIn x h1_phi
h✝¹ : ¬h1_x = x
h✝ : ¬h1_v = x
⊢ V x = V x
Tactic:
rfl
Proof state after:
no goals
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
D : Type
I : Interpretation D
E : Env
v t : VarName
F F' : Formula
h1_X : DefName
h1_xs : List VarName
h1_v h1_t : VarName
V : VarAssignment D
⊢ Holds D I (Function.updateITE V h1_v (V h1_t)) E (def_ h1_X h1_xs) ↔
    Holds D I V E (def_ h1_X (List.map (fun x => if h1_v = x then h1_t else x) h1_xs))
Tactic:
induction E
Proof state after:
case nil
D : Type
I : Interpretation D
v t : VarName
F F' : Formula
h1_X : DefName
h1_xs : List VarName
h1_v h1_t : VarName
V : VarAssignment D
⊢ Holds D I (Function.updateITE V h1_v (V h1_t)) [] (def_ h1_X h1_xs) ↔
    Holds D I V [] (def_ h1_X (List.map (fun x => if h1_v = x then h1_t else x) h1_xs))

case cons
D : Type
I : Interpretation D
v t : VarName
F F' : Formula
h1_X : DefName
h1_xs : List VarName
h1_v h1_t : VarName
V : VarAssignment D
head✝ : Definition
tail✝ : List Definition
tail_ih✝ :
  Holds D I (Function.updateITE V h1_v (V h1_t)) tail✝ (def_ h1_X h1_xs) ↔
    Holds D I V tail✝ (def_ h1_X (List.map (fun x => if h1_v = x then h1_t else x) h1_xs))
⊢ Holds D I (Function.updateITE V h1_v (V h1_t)) (head✝ :: tail✝) (def_ h1_X h1_xs) ↔
    Holds D I V (head✝ :: tail✝) (def_ h1_X (List.map (fun x => if h1_v = x then h1_t else x) h1_xs))
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
D : Type
I : Interpretation D
v t : VarName
F F' : Formula
h1_X : DefName
h1_xs : List VarName
h1_v h1_t : VarName
V : VarAssignment D
⊢ Holds D I (Function.updateITE V h1_v (V h1_t)) [] (def_ h1_X h1_xs) ↔
    Holds D I V [] (def_ h1_X (List.map (fun x => if h1_v = x then h1_t else x) h1_xs))
Tactic:
case nil =>
  simp only [Holds]
Proof state after:
no goals
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
D : Type
I : Interpretation D
v t : VarName
F F' : Formula
h1_X : DefName
h1_xs : List VarName
h1_v h1_t : VarName
V : VarAssignment D
⊢ Holds D I (Function.updateITE V h1_v (V h1_t)) [] (def_ h1_X h1_xs) ↔
    Holds D I V [] (def_ h1_X (List.map (fun x => if h1_v = x then h1_t else x) h1_xs))
Tactic:
simp only [Holds]
Proof state after:
no goals
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
D : Type
I : Interpretation D
v t : VarName
F F' : Formula
h1_X : DefName
h1_xs : List VarName
h1_v h1_t : VarName
V : VarAssignment D
hd : Definition
tl : List Definition
ih :
  Holds D I (Function.updateITE V h1_v (V h1_t)) tl (def_ h1_X h1_xs) ↔
    Holds D I V tl (def_ h1_X (List.map (fun x => if h1_v = x then h1_t else x) h1_xs))
⊢ Holds D I (Function.updateITE V h1_v (V h1_t)) (hd :: tl) (def_ h1_X h1_xs) ↔
    Holds D I V (hd :: tl) (def_ h1_X (List.map (fun x => if h1_v = x then h1_t else x) h1_xs))
Tactic:
simp only [Holds]
Proof state after:
D : Type
I : Interpretation D
v t : VarName
F F' : Formula
h1_X : DefName
h1_xs : List VarName
h1_v h1_t : VarName
V : VarAssignment D
hd : Definition
tl : List Definition
ih :
  Holds D I (Function.updateITE V h1_v (V h1_t)) tl (def_ h1_X h1_xs) ↔
    Holds D I V tl (def_ h1_X (List.map (fun x => if h1_v = x then h1_t else x) h1_xs))
⊢ (if h1_X = hd.name ∧ h1_xs.length = hd.args.length then
      Holds D I
        (Function.updateListITE (Function.updateITE V h1_v (V h1_t)) hd.args
          (List.map (Function.updateITE V h1_v (V h1_t)) h1_xs))
        tl hd.q
    else Holds D I (Function.updateITE V h1_v (V h1_t)) tl (def_ h1_X h1_xs)) ↔
    if h1_X = hd.name ∧ (List.map (fun x => if h1_v = x then h1_t else x) h1_xs).length = hd.args.length then
      Holds D I (Function.updateListITE V hd.args (List.map V (List.map (fun x => if h1_v = x then h1_t else x) h1_xs)))
        tl hd.q
    else Holds D I V tl (def_ h1_X (List.map (fun x => if h1_v = x then h1_t else x) h1_xs))
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
D : Type
I : Interpretation D
v t : VarName
F F' : Formula
h1_X : DefName
h1_xs : List VarName
h1_v h1_t : VarName
V : VarAssignment D
hd : Definition
tl : List Definition
ih :
  Holds D I (Function.updateITE V h1_v (V h1_t)) tl (def_ h1_X h1_xs) ↔
    Holds D I V tl (def_ h1_X (List.map (fun x => if h1_v = x then h1_t else x) h1_xs))
c1 : h1_X = hd.name ∧ h1_xs.length = hd.args.length
c2 : ¬(h1_X = hd.name ∧ (List.map (fun x => if h1_v = x then h1_t else x) h1_xs).length = hd.args.length)
⊢ Holds D I
      (Function.updateListITE (Function.updateITE V h1_v (V h1_t)) hd.args
        (List.map (Function.updateITE V h1_v (V h1_t)) h1_xs))
      tl hd.q ↔
    Holds D I V tl (def_ h1_X (List.map (fun x => if h1_v = x then h1_t else x) h1_xs))
Tactic:
case _ c1 c2 =>
  simp only [List.length_map] at c2
  contradiction
Proof state after:
no goals
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
D : Type
I : Interpretation D
v t : VarName
F F' : Formula
h1_X : DefName
h1_xs : List VarName
h1_v h1_t : VarName
V : VarAssignment D
hd : Definition
tl : List Definition
ih :
  Holds D I (Function.updateITE V h1_v (V h1_t)) tl (def_ h1_X h1_xs) ↔
    Holds D I V tl (def_ h1_X (List.map (fun x => if h1_v = x then h1_t else x) h1_xs))
c1 : ¬(h1_X = hd.name ∧ h1_xs.length = hd.args.length)
c2 : h1_X = hd.name ∧ (List.map (fun x => if h1_v = x then h1_t else x) h1_xs).length = hd.args.length
⊢ Holds D I (Function.updateITE V h1_v (V h1_t)) tl (def_ h1_X h1_xs) ↔
    Holds D I (Function.updateListITE V hd.args (List.map V (List.map (fun x => if h1_v = x then h1_t else x) h1_xs)))
      tl hd.q
Tactic:
case _ c1 c2 =>
  simp at c2
  contradiction
Proof state after:
no goals
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
D : Type
I : Interpretation D
v t : VarName
F F' : Formula
h1_X : DefName
h1_xs : List VarName
h1_v h1_t : VarName
V : VarAssignment D
hd : Definition
tl : List Definition
ih :
  Holds D I (Function.updateITE V h1_v (V h1_t)) tl (def_ h1_X h1_xs) ↔
    Holds D I V tl (def_ h1_X (List.map (fun x => if h1_v = x then h1_t else x) h1_xs))
c1 : ¬(h1_X = hd.name ∧ h1_xs.length = hd.args.length)
c2 : ¬(h1_X = hd.name ∧ (List.map (fun x => if h1_v = x then h1_t else x) h1_xs).length = hd.args.length)
⊢ Holds D I (Function.updateITE V h1_v (V h1_t)) tl (def_ h1_X h1_xs) ↔
    Holds D I V tl (def_ h1_X (List.map (fun x => if h1_v = x then h1_t else x) h1_xs))
Tactic:
case _ c1 c2 =>
  exact ih
Proof state after:
no goals
Theorem: FOL.NV.Sub.Var.One.Ind.substitution_theorem
Proof state before:
D : Type
I : Interpretation D
v t : VarName
F F' : Formula
h1_X : DefName
h1_xs : List VarName
h1_v h1_t : VarName
V : VarAssignment D
hd : Definition
tl : List Definition
ih :
  Holds D I (Function.updateITE V h1_v (V h1_t)) tl (def_ h1_X h1_xs) ↔
    Holds D I V tl (def_ h1_X (List.map (fun x => if h1_v = x then h1_t else x) h1_xs))
c1 : h1_X = hd.name ∧ h1_xs.length = hd.args.length
c2 : h1_X = hd.name ∧ (List.map (fun x => if h1_v = x then h1_t else x) h1_xs).length = hd.args.length
⊢ Holds D I
      (Function.updateListITE (Function.updateITE V h1_v (V h1_t)) hd.args
        (List.map (Function.updateITE V h1_v (V h1_t)) h1_xs))
      tl hd.q ↔
    Holds D I (Function.updateListITE V hd.args (List.map V (List.map (fun x => if h1_v = x then h1_t else x) h1_xs)))
      tl hd.q
Tactic:
simp
Proof state after:
D : Type
I : Interpretation D
v t : VarName
F F' : Formula
h1_X : DefName
h1_xs : List VarName
h1_v h1_t : VarName
V : VarAssignment D
hd : Definition
tl : List Definition
ih :
  Holds D I (Function.updateITE V h1_v (V h1_t)) tl (def_ h1_X h1_xs) ↔
    Holds D I V tl (def_ h1_X (List.map (fun x => if h1_v = x then h1_t else x) h1_xs))
c1 : h1_X = hd.name ∧ h1_xs.length = hd.args.length
c2 : h1_X = hd.name ∧ (List.map (fun x => if h1_v = x then h1_t else x) h1_xs).length = hd.args.length
⊢ Holds D I
      (Function.updateListITE (Function.updateITE V h1_v (V h1_t)) hd.args
        (List.map (Function.updateITE V h1_v (V h1_t)) h1_xs))
      tl hd.q ↔
    Holds D I (Function.updateListITE V hd.args (List.map (V ∘ fun x => if h1_v = x then h1_t else x) h1_xs)) tl hd.q