Theorem: FOL.NV.Sub.Pred.All.Rec.Option.Fresh.substitution_theorem_aux (FOL/NV/Sub/Pred/All/Rec/Option/Fresh/Sub.lean)

State before:
case s2.h1
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
x : VarName
a1 : isFreeIn x E_hd.q
⊢ Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs) x =
    Function.updateListITE V E_hd.args (List.map (V ∘ σ) xs) x

D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
s2 :
  Holds D I (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q ↔
    Holds D I (Function.updateListITE V E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q ↔
    Holds D I (Function.updateListITE V E_hd.args (List.map V (List.map σ xs))) E_tl E_hd.q
Tactic:
apply Function.updateListITE_map_mem_ext
State after:
case s2.h1.h1
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
x : VarName
a1 : isFreeIn x E_hd.q
⊢ ∀ y ∈ xs, (V ∘ σ) y = (V ∘ σ) y

case s2.h1.h2
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
x : VarName
a1 : isFreeIn x E_hd.q
⊢ E_hd.args.length = xs.length

case s2.h1.h3
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
x : VarName
a1 : isFreeIn x E_hd.q
⊢ x ∈ E_hd.args

D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
s2 :
  Holds D I (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q ↔
    Holds D I (Function.updateListITE V E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q ↔
    Holds D I (Function.updateListITE V E_hd.args (List.map V (List.map σ xs))) E_tl E_hd.q

State before:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
s2 :
  Holds D I (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q ↔
    Holds D I (Function.updateListITE V E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q ↔
    Holds D I (Function.updateListITE V E_hd.args (List.map V (List.map σ xs))) E_tl E_hd.q
Tactic:
simp
State after:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
s2 :
  Holds D I (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q ↔
    Holds D I (Function.updateListITE V E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q ↔
    Holds D I (Function.updateListITE V E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q

State before:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
s2 :
  Holds D I (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q ↔
    Holds D I (Function.updateListITE V E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q ↔
    Holds D I (Function.updateListITE V E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q
Tactic:
simp only [← s2]
State after:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
s2 :
  Holds D I (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q ↔
    Holds D I (Function.updateListITE V E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q ↔
    Holds D I (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q

State before:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
s2 :
  Holds D I (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q ↔
    Holds D I (Function.updateListITE V E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q ↔
    Holds D I (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q
Tactic:
clear s2
State after:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q ↔
    Holds D I (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q

State before:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q ↔
    Holds D I (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q
Tactic:
apply Holds_coincide_PredVar
State after:
case h1
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
⊢ (I' D I V'' (E_hd :: E_tl) τ).pred_const_ = I.pred_const_

case h2
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
⊢ ∀ (P : PredName) (ds : List D),
    predVarOccursIn P ds.length E_hd.q → ((I' D I V'' (E_hd :: E_tl) τ).pred_var_ P ds ↔ I.pred_var_ P ds)

State before:
case s2.h1.h1
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
x : VarName
a1 : isFreeIn x E_hd.q
⊢ ∀ y ∈ xs, (V ∘ σ) y = (V ∘ σ) y
Tactic:
simp
State after:
no goals

State before:
case s2.h1.h2
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
x : VarName
a1 : isFreeIn x E_hd.q
⊢ E_hd.args.length = xs.length
Tactic:
tauto
State after:
no goals

State before:
case s2.h1.h3
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
x : VarName
a1 : isFreeIn x E_hd.q
⊢ x ∈ E_hd.args
Tactic:
simp only [isFreeIn_iff_mem_freeVarSet] at a1
State after:
case s2.h1.h3
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
x : VarName
a1 : x ∈ E_hd.q.freeVarSet
⊢ x ∈ E_hd.args

State before:
case s2.h1.h3
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
x : VarName
a1 : x ∈ E_hd.q.freeVarSet
⊢ x ∈ E_hd.args
Tactic:
simp only [← List.mem_toFinset]
State after:
case s2.h1.h3
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
x : VarName
a1 : x ∈ E_hd.q.freeVarSet
⊢ x ∈ E_hd.args.toFinset

State before:
case s2.h1.h3
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
x : VarName
a1 : x ∈ E_hd.q.freeVarSet
⊢ x ∈ E_hd.args.toFinset
Tactic:
apply Finset.mem_of_subset E_hd.h1 a1
State after:
no goals

State before:
case h1
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
⊢ (I' D I V'' (E_hd :: E_tl) τ).pred_const_ = I.pred_const_
Tactic:
simp only [I']
State after:
case h1
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
⊢ (Interpretation.usingPred D I fun X ds =>
        if h : (τ X ds.length).isSome = true then
          if ds.length = ((τ X ds.length).get ⋯).1.length then
            Holds D I (Function.updateListITE V'' ((τ X ds.length).get ⋯).1 ds) (E_hd :: E_tl) ((τ X ds.length).get ⋯).2
          else I.pred_var_ X ds
        else I.pred_var_ X ds).pred_const_ =
    I.pred_const_

State before:
case h1
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
⊢ (Interpretation.usingPred D I fun X ds =>
        if h : (τ X ds.length).isSome = true then
          if ds.length = ((τ X ds.length).get ⋯).1.length then
            Holds D I (Function.updateListITE V'' ((τ X ds.length).get ⋯).1 ds) (E_hd :: E_tl) ((τ X ds.length).get ⋯).2
          else I.pred_var_ X ds
        else I.pred_var_ X ds).pred_const_ =
    I.pred_const_
Tactic:
simp only [Interpretation.usingPred]
State after:
no goals

State before:
case h2
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
⊢ ∀ (P : PredName) (ds : List D),
    predVarOccursIn P ds.length E_hd.q → ((I' D I V'' (E_hd :: E_tl) τ).pred_var_ P ds ↔ I.pred_var_ P ds)
Tactic:
intro P ds a1
State after:
case h2
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
P : PredName
ds : List D
a1 : predVarOccursIn P ds.length E_hd.q
⊢ (I' D I V'' (E_hd :: E_tl) τ).pred_var_ P ds ↔ I.pred_var_ P ds

State before:
case h2
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
P : PredName
ds : List D
a1 : predVarOccursIn P ds.length E_hd.q
⊢ (I' D I V'' (E_hd :: E_tl) τ).pred_var_ P ds ↔ I.pred_var_ P ds
Tactic:
simp only [predVarOccursIn_iff_mem_predVarSet] at a1
State after:
case h2
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
P : PredName
ds : List D
a1 : (P, ds.length) ∈ E_hd.q.predVarSet
⊢ (I' D I V'' (E_hd :: E_tl) τ).pred_var_ P ds ↔ I.pred_var_ P ds

State before:
case h2
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
P : PredName
ds : List D
a1 : (P, ds.length) ∈ E_hd.q.predVarSet
⊢ (I' D I V'' (E_hd :: E_tl) τ).pred_var_ P ds ↔ I.pred_var_ P ds
Tactic:
simp only [E_hd.h2] at a1
State after:
case h2
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
P : PredName
ds : List D
a1 : (P, ds.length) ∈ ∅
⊢ (I' D I V'' (E_hd :: E_tl) τ).pred_var_ P ds ↔ I.pred_var_ P ds

State before:
case h2
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
P : PredName
ds : List D
a1 : (P, ds.length) ∈ ∅
⊢ (I' D I V'' (E_hd :: E_tl) τ).pred_var_ P ds ↔ I.pred_var_ P ds
Tactic:
simp at a1
State after:
no goals

State before:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : ¬(X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length)
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q ↔
    Holds D I V E_tl (def_ X (List.map σ xs))
Tactic:
simp only [List.length_map] at c2
State after:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q ↔
    Holds D I V E_tl (def_ X (List.map σ xs))

State before:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : X = E_hd.name ∧ xs.length = E_hd.args.length
c2 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) (Function.updateListITE V' E_hd.args (List.map (V ∘ σ) xs)) E_tl E_hd.q ↔
    Holds D I V E_tl (def_ X (List.map σ xs))
Tactic:
contradiction
State after:
no goals

State before:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) V' E_tl (def_ X xs) ↔
    Holds D I (Function.updateListITE V E_hd.args (List.map V (List.map σ xs))) E_tl E_hd.q
Tactic:
simp only [List.length_map] at c2
State after:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : X = E_hd.name ∧ xs.length = E_hd.args.length
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) V' E_tl (def_ X xs) ↔
    Holds D I (Function.updateListITE V E_hd.args (List.map V (List.map σ xs))) E_tl E_hd.q

State before:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : X = E_hd.name ∧ xs.length = E_hd.args.length
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) V' E_tl (def_ X xs) ↔
    Holds D I (Function.updateListITE V E_hd.args (List.map V (List.map σ xs))) E_tl E_hd.q
Tactic:
contradiction
State after:
no goals

State before:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : ¬(X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length)
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs))
Tactic:
obtain s2 := E_ih V V' σ
State after:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : ¬(X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length)
s2 :
  (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
    (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
      (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs))

State before:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : ¬(X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length)
s2 :
  (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
    (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
      (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs))
Tactic:
simp only [isFreeIn] at s2
State after:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : ¬(X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length)
s2 :
  (∀ x ∈ xs, V' x = V (σ x)) →
    (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
      (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs))

State before:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : ¬(X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length)
s2 :
  (∀ x ∈ xs, V' x = V (σ x)) →
    (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
      (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs))
Tactic:
specialize s2 h1 h2
State after:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : ¬(X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length)
s2 : Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs))
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs))

State before:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : ¬(X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length)
s2 : Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs))
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs))
Tactic:
simp only [← s2]
State after:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : ¬(X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length)
s2 : Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs))
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) V' E_tl (def_ X xs) ↔ Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs)

State before:
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : ¬(X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length)
s2 : Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs))
⊢ Holds D (I' D I V'' (E_hd :: E_tl) τ) V' E_tl (def_ X xs) ↔ Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs)
Tactic:
apply Holds_coincide_PredVar
State after:
case h1
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : ¬(X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length)
s2 : Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs))
⊢ (I' D I V'' (E_hd :: E_tl) τ).pred_const_ = (I' D I V'' E_tl τ).pred_const_

case h2
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : ¬(X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length)
s2 : Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs))
⊢ ∀ (P : PredName) (ds : List D),
    predVarOccursIn P ds.length (def_ X xs) →
      ((I' D I V'' (E_hd :: E_tl) τ).pred_var_ P ds ↔ (I' D I V'' E_tl τ).pred_var_ P ds)

State before:
case h1
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : ¬(X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length)
s2 : Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs))
⊢ (I' D I V'' (E_hd :: E_tl) τ).pred_const_ = (I' D I V'' E_tl τ).pred_const_
Tactic:
simp only [I']
State after:
case h1
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : ¬(X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length)
s2 : Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs))
⊢ (Interpretation.usingPred D I fun X ds =>
        if h : (τ X ds.length).isSome = true then
          if ds.length = ((τ X ds.length).get ⋯).1.length then
            Holds D I (Function.updateListITE V'' ((τ X ds.length).get ⋯).1 ds) (E_hd :: E_tl) ((τ X ds.length).get ⋯).2
          else I.pred_var_ X ds
        else I.pred_var_ X ds).pred_const_ =
    (Interpretation.usingPred D I fun X ds =>
        if h : (τ X ds.length).isSome = true then
          if ds.length = ((τ X ds.length).get ⋯).1.length then
            Holds D I (Function.updateListITE V'' ((τ X ds.length).get ⋯).1 ds) E_tl ((τ X ds.length).get ⋯).2
          else I.pred_var_ X ds
        else I.pred_var_ X ds).pred_const_

State before:
case h1
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : ¬(X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length)
s2 : Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs))
⊢ (Interpretation.usingPred D I fun X ds =>
        if h : (τ X ds.length).isSome = true then
          if ds.length = ((τ X ds.length).get ⋯).1.length then
            Holds D I (Function.updateListITE V'' ((τ X ds.length).get ⋯).1 ds) (E_hd :: E_tl) ((τ X ds.length).get ⋯).2
          else I.pred_var_ X ds
        else I.pred_var_ X ds).pred_const_ =
    (Interpretation.usingPred D I fun X ds =>
        if h : (τ X ds.length).isSome = true then
          if ds.length = ((τ X ds.length).get ⋯).1.length then
            Holds D I (Function.updateListITE V'' ((τ X ds.length).get ⋯).1 ds) E_tl ((τ X ds.length).get ⋯).2
          else I.pred_var_ X ds
        else I.pred_var_ X ds).pred_const_
Tactic:
simp only [Interpretation.usingPred]
State after:
no goals

State before:
case h2
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : ¬(X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length)
s2 : Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs))
⊢ ∀ (P : PredName) (ds : List D),
    predVarOccursIn P ds.length (def_ X xs) →
      ((I' D I V'' (E_hd :: E_tl) τ).pred_var_ P ds ↔ (I' D I V'' E_tl τ).pred_var_ P ds)
Tactic:
intro P ds a1
State after:
case h2
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : ¬(X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length)
s2 : Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs))
P : PredName
ds : List D
a1 : predVarOccursIn P ds.length (def_ X xs)
⊢ (I' D I V'' (E_hd :: E_tl) τ).pred_var_ P ds ↔ (I' D I V'' E_tl τ).pred_var_ P ds

State before:
case h2
D : Type
I : Interpretation D
V'' : VarAssignment D
c : Char
τ : PredName → ℕ → Option (List VarName × Formula)
X : DefName
xs : List VarName
E_hd : Definition
E_tl : List Definition
E_ih :
  ∀ (V V' : VarAssignment D) (σ : VarName → VarName),
    (∀ (x : VarName), isFreeIn x (def_ X xs) → V' x = V (σ x)) →
      (∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x) →
        (Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs)))
V V' : VarAssignment D
σ : VarName → VarName
h1 : ∀ x ∈ xs, V' x = V (σ x)
h2 : ∀ x ∈ (def_ X xs).predVarSet.biUnion (predVarFreeVarSet τ), V'' x = V x
c1 : ¬(X = E_hd.name ∧ xs.length = E_hd.args.length)
c2 : ¬(X = E_hd.name ∧ (List.map σ xs).length = E_hd.args.length)
s2 : Holds D (I' D I V'' E_tl τ) V' E_tl (def_ X xs) ↔ Holds D I V E_tl (def_ X (List.map σ xs))
P : PredName
ds : List D
a1 : predVarOccursIn P ds.length (def_ X xs)
⊢ (I' D I V'' (E_hd :: E_tl) τ).pred_var_ P ds ↔ (I' D I V'' E_tl τ).pred_var_ P ds
Tactic:
simp only [predVarOccursIn] at a1
State after:
no goals