Theorem: FOL.NV.Sub.Pred.One.Ind.substitution_is_valid
Proof state before:
F F' : Formula
P : PredName
zs : List VarName
H : Formula
h1 : IsSub P zs H F F'
h2 : ∀ (D : Type) (I : Interpretation D) (V : VarAssignment D) (E : Env), Holds D I V E F
D : Type
I : Interpretation D
V : VarAssignment D
E : Env
J : Interpretation D :=
  { nonempty := ⋯, pred_const_ := I.pred_const_,
    pred_var_ := fun Q ds =>
      if Q = P ∧ ds.length = zs.length then Holds D I (Function.updateListITE V zs ds) E H else I.pred_var_ Q ds }
s1 :
  (∀ (Q : PredName) (ds : List D),
      Q = P ∧ ds.length = zs.length →
        (Holds D I (Function.updateListITE V zs ds) E H ↔
          if True ∧ ds.length = zs.length then Holds D I (Function.updateListITE V zs ds) E H else I.pred_var_ P ds)) →
    True →
      (∀ (Q : PredName) (ds : List D),
          ¬(Q = P ∧ ds.length = zs.length) →
            (I.pred_var_ Q ds ↔
              if Q = P ∧ ds.length = zs.length then Holds D I (Function.updateListITE V zs ds) E H
              else I.pred_var_ Q ds)) →
        (Holds D I V E F' ↔ Holds D J V E F)
⊢ Holds D I V E F' ↔ Holds D J V E F
Tactic:
apply s1
Proof state after:
case h2
F F' : Formula
P : PredName
zs : List VarName
H : Formula
h1 : IsSub P zs H F F'
h2 : ∀ (D : Type) (I : Interpretation D) (V : VarAssignment D) (E : Env), Holds D I V E F
D : Type
I : Interpretation D
V : VarAssignment D
E : Env
J : Interpretation D :=
  { nonempty := ⋯, pred_const_ := I.pred_const_,
    pred_var_ := fun Q ds =>
      if Q = P ∧ ds.length = zs.length then Holds D I (Function.updateListITE V zs ds) E H else I.pred_var_ Q ds }
s1 :
  (∀ (Q : PredName) (ds : List D),
      Q = P ∧ ds.length = zs.length →
        (Holds D I (Function.updateListITE V zs ds) E H ↔
          if True ∧ ds.length = zs.length then Holds D I (Function.updateListITE V zs ds) E H else I.pred_var_ P ds)) →
    True →
      (∀ (Q : PredName) (ds : List D),
          ¬(Q = P ∧ ds.length = zs.length) →
            (I.pred_var_ Q ds ↔
              if Q = P ∧ ds.length = zs.length then Holds D I (Function.updateListITE V zs ds) E H
              else I.pred_var_ Q ds)) →
        (Holds D I V E F' ↔ Holds D J V E F)
⊢ ∀ (Q : PredName) (ds : List D),
    Q = P ∧ ds.length = zs.length →
      (Holds D I (Function.updateListITE V zs ds) E H ↔
        if True ∧ ds.length = zs.length then Holds D I (Function.updateListITE V zs ds) E H else I.pred_var_ P ds)

case h3_const
F F' : Formula
P : PredName
zs : List VarName
H : Formula
h1 : IsSub P zs H F F'
h2 : ∀ (D : Type) (I : Interpretation D) (V : VarAssignment D) (E : Env), Holds D I V E F
D : Type
I : Interpretation D
V : VarAssignment D
E : Env
J : Interpretation D :=
  { nonempty := ⋯, pred_const_ := I.pred_const_,
    pred_var_ := fun Q ds =>
      if Q = P ∧ ds.length = zs.length then Holds D I (Function.updateListITE V zs ds) E H else I.pred_var_ Q ds }
s1 :
  (∀ (Q : PredName) (ds : List D),
      Q = P ∧ ds.length = zs.length →
        (Holds D I (Function.updateListITE V zs ds) E H ↔
          if True ∧ ds.length = zs.length then Holds D I (Function.updateListITE V zs ds) E H else I.pred_var_ P ds)) →
    True →
      (∀ (Q : PredName) (ds : List D),
          ¬(Q = P ∧ ds.length = zs.length) →
            (I.pred_var_ Q ds ↔
              if Q = P ∧ ds.length = zs.length then Holds D I (Function.updateListITE V zs ds) E H
              else I.pred_var_ Q ds)) →
        (Holds D I V E F' ↔ Holds D J V E F)
⊢ True

case h3_var
F F' : Formula
P : PredName
zs : List VarName
H : Formula
h1 : IsSub P zs H F F'
h2 : ∀ (D : Type) (I : Interpretation D) (V : VarAssignment D) (E : Env), Holds D I V E F
D : Type
I : Interpretation D
V : VarAssignment D
E : Env
J : Interpretation D :=
  { nonempty := ⋯, pred_const_ := I.pred_const_,
    pred_var_ := fun Q ds =>
      if Q = P ∧ ds.length = zs.length then Holds D I (Function.updateListITE V zs ds) E H else I.pred_var_ Q ds }
s1 :
  (∀ (Q : PredName) (ds : List D),
      Q = P ∧ ds.length = zs.length →
        (Holds D I (Function.updateListITE V zs ds) E H ↔
          if True ∧ ds.length = zs.length then Holds D I (Function.updateListITE V zs ds) E H else I.pred_var_ P ds)) →
    True →
      (∀ (Q : PredName) (ds : List D),
          ¬(Q = P ∧ ds.length = zs.length) →
            (I.pred_var_ Q ds ↔
              if Q = P ∧ ds.length = zs.length then Holds D I (Function.updateListITE V zs ds) E H
              else I.pred_var_ Q ds)) →
        (Holds D I V E F' ↔ Holds D J V E F)
⊢ ∀ (Q : PredName) (ds : List D),
    ¬(Q = P ∧ ds.length = zs.length) →
      (I.pred_var_ Q ds ↔
        if Q = P ∧ ds.length = zs.length then Holds D I (Function.updateListITE V zs ds) E H else I.pred_var_ Q ds)