Theorem: localRuleApp.decreases_DM
Proof state before:
case h.refine_2.refine_1.h.none.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, Ocond)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, none with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, none) = RES
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝ : NegLoadFormula ⊕ NegLoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some val✝) - node_to_multiset (Lcond, Rcond, Ocond)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, some val✝ with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some val✝) = RES
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inl.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
RES : TNode
Lnew Rnew : List Formula
val✝ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inl val✝)) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝.1))) = RES
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, Ocond)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, none with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some (Sum.inl val✝))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl val✝)) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inl.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
RES : TNode
Lnew Rnew : List Formula
val✝¹ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inl val✝¹)) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝¹.1))) = RES
val✝ : NegLoadFormula ⊕ NegLoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some val✝) - node_to_multiset (Lcond, Rcond, Ocond)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, some val✝ with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some (Sum.inl val✝¹))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl val✝¹)) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inr.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
RES : TNode
Lnew Rnew : List Formula
val✝ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inr val✝)) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝.1))) = RES
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, Ocond)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, none with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some (Sum.inr val✝))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr val✝)) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inr.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
RES : TNode
Lnew Rnew : List Formula
val✝¹ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inr val✝¹)) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝¹.1))) = RES
val✝ : NegLoadFormula ⊕ NegLoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some val✝) - node_to_multiset (Lcond, Rcond, Ocond)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, some val✝ with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some (Sum.inr val✝¹))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr val✝¹)) ≤ node_to_multiset RES
Tactic:
all_goals try (rename_i cond; cases cond)
Proof state after:
case h.refine_2.refine_1.h.none.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, Ocond)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, none with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, none) = RES
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝ : NegLoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl val✝)) - node_to_multiset (Lcond, Rcond, Ocond)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, some (Sum.inl val✝) with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl val✝)) = RES
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝ : NegLoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr val✝)) - node_to_multiset (Lcond, Rcond, Ocond)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, some (Sum.inr val✝) with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr val✝)) = RES
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inl.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
RES : TNode
Lnew Rnew : List Formula
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, Ocond)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, none with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
a✝ : LoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inl (~'a✝))) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'(~'a✝).1))) = RES
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some (Sum.inl (~'a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl (~'a✝))) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inl.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
RES : TNode
Lnew Rnew : List Formula
val✝¹ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inl val✝¹)) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝¹.1))) = RES
val✝ : NegLoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl val✝)) - node_to_multiset (Lcond, Rcond, Ocond)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, some (Sum.inl val✝) with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some (Sum.inl val✝¹))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl val✝¹)) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inl.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
RES : TNode
Lnew Rnew : List Formula
val✝¹ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inl val✝¹)) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝¹.1))) = RES
val✝ : NegLoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr val✝)) - node_to_multiset (Lcond, Rcond, Ocond)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, some (Sum.inr val✝) with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some (Sum.inl val✝¹))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl val✝¹)) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inr.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
RES : TNode
Lnew Rnew : List Formula
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, Ocond)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, none with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
a✝ : LoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inr (~'a✝))) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'(~'a✝).1))) = RES
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some (Sum.inr (~'a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr (~'a✝))) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inr.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
RES : TNode
Lnew Rnew : List Formula
val✝¹ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inr val✝¹)) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝¹.1))) = RES
val✝ : NegLoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl val✝)) - node_to_multiset (Lcond, Rcond, Ocond)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, some (Sum.inl val✝) with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some (Sum.inr val✝¹))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr val✝¹)) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inr.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
RES : TNode
Lnew Rnew : List Formula
val✝¹ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inr val✝¹)) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝¹.1))) = RES
val✝ : NegLoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr val✝)) - node_to_multiset (Lcond, Rcond, Ocond)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, some (Sum.inr val✝) with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some (Sum.inr val✝¹))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr val✝¹)) ≤ node_to_multiset RES