Theorem: localRuleApp.decreases_DM (Pdl/LocalTableau.lean)

State before:
X : TNode
B : List TNode
lrA : LocalRuleApp X B
⊢ ∀ Y ∈ B, lt_TNode Y X
Tactic:
rcases lrA with ⟨Lcond,Rcond,Ocond,rule,preconP⟩
State after:
case mk
B : List TNode
L✝ R✝ : List Formula
ress✝ : List TNode
O✝ : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress✝
preconP : Lcond.Sublist L✝ ∧ Rcond.Sublist R✝ ∧ Ocond ⊆ O✝
hC✝ : B = applyLocalRule rule (L✝, R✝, O✝)
⊢ ∀ Y ∈ B, lt_TNode Y (L✝, R✝, O✝)

State before:
case mk
B : List TNode
L✝ R✝ : List Formula
ress✝ : List TNode
O✝ : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress✝
preconP : Lcond.Sublist L✝ ∧ Rcond.Sublist R✝ ∧ Ocond ⊆ O✝
hC✝ : B = applyLocalRule rule (L✝, R✝, O✝)
⊢ ∀ Y ∈ B, lt_TNode Y (L✝, R✝, O✝)
Tactic:
rename_i L R ress O B_def
State after:
case mk
B : List TNode
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
B_def : B = applyLocalRule rule (L, R, O)
⊢ ∀ Y ∈ B, lt_TNode Y (L, R, O)

State before:
case mk
B : List TNode
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
B_def : B = applyLocalRule rule (L, R, O)
⊢ ∀ Y ∈ B, lt_TNode Y (L, R, O)
Tactic:
subst B_def
State after:
case mk
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
⊢ ∀ Y ∈ applyLocalRule rule (L, R, O), lt_TNode Y (L, R, O)

State before:
case mk
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
⊢ ∀ Y ∈ applyLocalRule rule (L, R, O), lt_TNode Y (L, R, O)
Tactic:
intro RES RES_in
State after:
case mk
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
RES_in : RES ∈ applyLocalRule rule (L, R, O)
⊢ lt_TNode RES (L, R, O)

State before:
case mk
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
RES_in : RES ∈ applyLocalRule rule (L, R, O)
⊢ lt_TNode RES (L, R, O)
Tactic:
simp [applyLocalRule] at RES_in
State after:
case mk
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
RES_in :
  ∃ a ∈ ress,
    (match a with
      | (Lnew, Rnew, Onew) =>
        match Onew with
        | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
        | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
        | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
      RES
⊢ lt_TNode RES (L, R, O)

State before:
case mk
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
RES_in :
  ∃ a ∈ ress,
    (match a with
      | (Lnew, Rnew, Onew) =>
        match Onew with
        | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
        | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
        | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
      RES
⊢ lt_TNode RES (L, R, O)
Tactic:
rcases RES_in with ⟨⟨Lnew,Rnew,Onew⟩, Y_in_ress, claim⟩
State after:
case mk.intro.mk.mk.intro
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match (Lnew, Rnew, Onew) with
    | (Lnew, Rnew, Onew) =>
      match Onew with
      | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
      | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
      | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
⊢ lt_TNode RES (L, R, O)

State before:
case mk.intro.mk.mk.intro
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match (Lnew, Rnew, Onew) with
    | (Lnew, Rnew, Onew) =>
      match Onew with
      | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
      | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
      | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
⊢ lt_TNode RES (L, R, O)
Tactic:
unfold lt_TNode
State after:
case mk.intro.mk.mk.intro
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match (Lnew, Rnew, Onew) with
    | (Lnew, Rnew, Onew) =>
      match Onew with
      | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
      | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
      | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
⊢ MultisetLT (node_to_multiset RES) (node_to_multiset (L, R, O))

State before:
case mk.intro.mk.mk.intro
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match (Lnew, Rnew, Onew) with
    | (Lnew, Rnew, Onew) =>
      match Onew with
      | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
      | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
      | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
⊢ MultisetLT (node_to_multiset RES) (node_to_multiset (L, R, O))
Tactic:
simp at claim
State after:
case mk.intro.mk.mk.intro
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
⊢ MultisetLT (node_to_multiset RES) (node_to_multiset (L, R, O))

State before:
case mk.intro.mk.mk.intro
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
⊢ MultisetLT (node_to_multiset RES) (node_to_multiset (L, R, O))
Tactic:
rw [MultisetLT.iff_MultisetLT']
State after:
case mk.intro.mk.mk.intro
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
⊢ MultisetLT' (node_to_multiset RES) (node_to_multiset (L, R, O))

State before:
case mk.intro.mk.mk.intro
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
⊢ MultisetLT' (node_to_multiset RES) (node_to_multiset (L, R, O))
Tactic:
unfold MultisetLT'
State after:
case mk.intro.mk.mk.intro
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
⊢ ∃ X Y Z, Y ≠ ∅ ∧ node_to_multiset RES = Z + X ∧ node_to_multiset (L, R, O) = Z + Y ∧ ∀ x ∈ X, ∃ y ∈ Y, x < y

State before:
case mk.intro.mk.mk.intro
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
⊢ ∃ X Y Z, Y ≠ ∅ ∧ node_to_multiset RES = Z + X ∧ node_to_multiset (L, R, O) = Z + Y ∧ ∀ x ∈ X, ∃ y ∈ Y, x < y
Tactic:
use node_to_multiset (Lnew, Rnew, Onew)
State after:
case h
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
⊢ ∃ Y Z,
    Y ≠ ∅ ∧
      node_to_multiset RES = Z + node_to_multiset (Lnew, Rnew, Onew) ∧
        node_to_multiset (L, R, O) = Z + Y ∧ ∀ x ∈ node_to_multiset (Lnew, Rnew, Onew), ∃ y ∈ Y, x < y

State before:
case h
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
⊢ ∃ Y Z,
    Y ≠ ∅ ∧
      node_to_multiset RES = Z + node_to_multiset (Lnew, Rnew, Onew) ∧
        node_to_multiset (L, R, O) = Z + Y ∧ ∀ x ∈ node_to_multiset (Lnew, Rnew, Onew), ∃ y ∈ Y, x < y
Tactic:
use node_to_multiset (Lcond, Rcond, Ocond)
State after:
case h
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
⊢ ∃ Z,
    node_to_multiset (Lcond, Rcond, Ocond) ≠ ∅ ∧
      node_to_multiset RES = Z + node_to_multiset (Lnew, Rnew, Onew) ∧
        node_to_multiset (L, R, O) = Z + node_to_multiset (Lcond, Rcond, Ocond) ∧
          ∀ x ∈ node_to_multiset (Lnew, Rnew, Onew), ∃ y ∈ node_to_multiset (Lcond, Rcond, Ocond), x < y

State before:
case h
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
⊢ ∃ Z,
    node_to_multiset (Lcond, Rcond, Ocond) ≠ ∅ ∧
      node_to_multiset RES = Z + node_to_multiset (Lnew, Rnew, Onew) ∧
        node_to_multiset (L, R, O) = Z + node_to_multiset (Lcond, Rcond, Ocond) ∧
          ∀ x ∈ node_to_multiset (Lnew, Rnew, Onew), ∃ y ∈ node_to_multiset (Lcond, Rcond, Ocond), x < y
Tactic:
let Z := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
State after:
case h
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
⊢ ∃ Z,
    node_to_multiset (Lcond, Rcond, Ocond) ≠ ∅ ∧
      node_to_multiset RES = Z + node_to_multiset (Lnew, Rnew, Onew) ∧
        node_to_multiset (L, R, O) = Z + node_to_multiset (Lcond, Rcond, Ocond) ∧
          ∀ x ∈ node_to_multiset (Lnew, Rnew, Onew), ∃ y ∈ node_to_multiset (Lcond, Rcond, Ocond), x < y

State before:
case h
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
⊢ ∃ Z,
    node_to_multiset (Lcond, Rcond, Ocond) ≠ ∅ ∧
      node_to_multiset RES = Z + node_to_multiset (Lnew, Rnew, Onew) ∧
        node_to_multiset (L, R, O) = Z + node_to_multiset (Lcond, Rcond, Ocond) ∧
          ∀ x ∈ node_to_multiset (Lnew, Rnew, Onew), ∃ y ∈ node_to_multiset (Lcond, Rcond, Ocond), x < y
Tactic:
use Z
State after:
case h
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
⊢ node_to_multiset (Lcond, Rcond, Ocond) ≠ ∅ ∧
    node_to_multiset RES = Z + node_to_multiset (Lnew, Rnew, Onew) ∧
      node_to_multiset (L, R, O) = Z + node_to_multiset (Lcond, Rcond, Ocond) ∧
        ∀ x ∈ node_to_multiset (Lnew, Rnew, Onew), ∃ y ∈ node_to_multiset (Lcond, Rcond, Ocond), x < y

State before:
case h
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
⊢ node_to_multiset (Lcond, Rcond, Ocond) ≠ ∅ ∧
    node_to_multiset RES = Z + node_to_multiset (Lnew, Rnew, Onew) ∧
      node_to_multiset (L, R, O) = Z + node_to_multiset (Lcond, Rcond, Ocond) ∧
        ∀ x ∈ node_to_multiset (Lnew, Rnew, Onew), ∃ y ∈ node_to_multiset (Lcond, Rcond, Ocond), x < y
Tactic:
have Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, Onew) := by
  sorry
State after:
case h
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, Onew)
⊢ node_to_multiset (Lcond, Rcond, Ocond) ≠ ∅ ∧
    node_to_multiset RES = Z + node_to_multiset (Lnew, Rnew, Onew) ∧
      node_to_multiset (L, R, O) = Z + node_to_multiset (Lcond, Rcond, Ocond) ∧
        ∀ x ∈ node_to_multiset (Lnew, Rnew, Onew), ∃ y ∈ node_to_multiset (Lcond, Rcond, Ocond), x < y

State before:
case h
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, Onew)
⊢ node_to_multiset (Lcond, Rcond, Ocond) ≠ ∅ ∧
    node_to_multiset RES = Z + node_to_multiset (Lnew, Rnew, Onew) ∧
      node_to_multiset (L, R, O) = Z + node_to_multiset (Lcond, Rcond, Ocond) ∧
        ∀ x ∈ node_to_multiset (Lnew, Rnew, Onew), ∃ y ∈ node_to_multiset (Lcond, Rcond, Ocond), x < y
Tactic:
split_ands
State after:
case h.refine_1
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, Onew)
⊢ node_to_multiset (Lcond, Rcond, Ocond) ≠ ∅

case h.refine_2.refine_1
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, Onew)
⊢ node_to_multiset RES = Z + node_to_multiset (Lnew, Rnew, Onew)

case h.refine_2.refine_2.refine_1
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, Onew)
⊢ node_to_multiset (L, R, O) = Z + node_to_multiset (Lcond, Rcond, Ocond)

case h.refine_2.refine_2.refine_2
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, Onew)
⊢ ∀ x ∈ node_to_multiset (Lnew, Rnew, Onew), ∃ y ∈ node_to_multiset (Lcond, Rcond, Ocond), x < y

State before:
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
⊢ Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, Onew)
Tactic:
sorry
State after:
no goals

State before:
case h.refine_1
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, Onew)
⊢ node_to_multiset (Lcond, Rcond, Ocond) ≠ ∅
Tactic:
exact (LocalRule.cond_non_empty rule : node_to_multiset (Lcond, Rcond, Ocond) ≠ ∅)
State after:
no goals

State before:
case h.refine_2.refine_1
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, Onew)
⊢ node_to_multiset RES = Z + node_to_multiset (Lnew, Rnew, Onew)
Tactic:
rw [Z_eq]
State after:
case h.refine_2.refine_1
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, Onew)
⊢ node_to_multiset RES =
    node_to_multiset RES - node_to_multiset (Lnew, Rnew, Onew) + node_to_multiset (Lnew, Rnew, Onew)

State before:
case h.refine_2.refine_1
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, Onew)
⊢ node_to_multiset RES =
    node_to_multiset RES - node_to_multiset (Lnew, Rnew, Onew) + node_to_multiset (Lnew, Rnew, Onew)
Tactic:
apply Multiset.sub_add_of_subset_eq
State after:
case h.refine_2.refine_1.h
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, Onew)
⊢ node_to_multiset (Lnew, Rnew, Onew) ≤ node_to_multiset RES

State before:
case h.refine_2.refine_1.h
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Onew : Option (NegLoadFormula ⊕ NegLoadFormula)
Y_in_ress : (Lnew, Rnew, Onew) ∈ ress
claim :
  (match Onew with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, Onew)
⊢ node_to_multiset (Lnew, Rnew, Onew) ≤ node_to_multiset RES
Tactic:
cases Onew
State after:
case h.refine_2.refine_1.h.none
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
Y_in_ress : (Lnew, Rnew, none) ∈ ress
claim :
  (match none with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    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
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
val✝ : NegLoadFormula ⊕ NegLoadFormula
Y_in_ress : (Lnew, Rnew, some val✝) ∈ ress
claim :
  (match some val✝ with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some val✝)
⊢ node_to_multiset (Lnew, Rnew, some val✝) ≤ node_to_multiset RES

State before:
case h.refine_2.refine_1.h.none
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
Y_in_ress : (Lnew, Rnew, none) ∈ ress
claim :
  (match none with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    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
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
val✝ : NegLoadFormula ⊕ NegLoadFormula
Y_in_ress : (Lnew, Rnew, some val✝) ∈ ress
claim :
  (match some val✝ with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some val✝)
⊢ node_to_multiset (Lnew, Rnew, some val✝) ≤ node_to_multiset RES
Tactic:
all_goals try (rename_i f; cases f)
State after:
case h.refine_2.refine_1.h.none
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
Y_in_ress : (Lnew, Rnew, none) ∈ ress
claim :
  (match none with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    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
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
val✝ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inl val✝)) ∈ ress
claim :
  (match some (Sum.inl val✝) with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
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
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
val✝ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inr val✝)) ∈ ress
claim :
  (match some (Sum.inr val✝) with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
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

State before:
case h.refine_2.refine_1.h.none
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
Y_in_ress : (Lnew, Rnew, none) ∈ ress
claim :
  (match none with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    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
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
val✝ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inl val✝)) ∈ ress
claim :
  (match some (Sum.inl val✝) with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
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
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
Lcond Rcond : List Formula
Ocond : Option (NegLoadFormula ⊕ NegLoadFormula)
rule : LocalRule (Lcond, Rcond, Ocond) ress
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ Ocond ⊆ O
RES : TNode
Lnew Rnew : List Formula
Z : Multiset Formula := node_to_multiset (L, R, O) - node_to_multiset (Lcond, Rcond, Ocond)
val✝ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inr val✝)) ∈ ress
claim :
  (match some (Sum.inr val✝) with
    | none => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O)
    | some (Sum.inl (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'χ)))
    | some (Sum.inr (~'χ)) => (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'χ)))) =
    RES
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 simp_all
State after:
case h.refine_2.refine_1.h.none
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
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, O) - node_to_multiset (Lcond, Rcond, Ocond)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, O with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
Y_in_ress : (Lnew, Rnew, none) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O) = 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
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
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, O) - node_to_multiset (Lcond, Rcond, Ocond)
val✝ : NegLoadFormula
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, O with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
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_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
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
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, O) - node_to_multiset (Lcond, Rcond, Ocond)
val✝ : NegLoadFormula
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, O with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
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_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

State before:
case h.refine_2.refine_1.h.none
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
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, O) - node_to_multiset (Lcond, Rcond, Ocond)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, O with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
Y_in_ress : (Lnew, Rnew, none) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, O) = 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
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
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, O) - node_to_multiset (Lcond, Rcond, Ocond)
val✝ : NegLoadFormula
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, O with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
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_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
L R : List Formula
ress : List TNode
O : Option (NegLoadFormula ⊕ NegLoadFormula)
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, O) - node_to_multiset (Lcond, Rcond, Ocond)
val✝ : NegLoadFormula
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match Ocond, O with
      | none, x => True
      | some val, none => False
      | some f, some g => f = g
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_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 cases O
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
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

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)
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

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.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
Tactic:
all_goals cases Ocond
State after:
case h.refine_2.refine_1.h.none.none.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, none) = RES
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.none.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, none) = RES
val✝ : NegLoadFormula ⊕ NegLoadFormula
rule : LocalRule (Lcond, Rcond, some val✝) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, some val✝)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some val✝, 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inl.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl val✝)) = RES
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl val✝)) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inl.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl val✝¹)) = RES
val✝ : NegLoadFormula ⊕ NegLoadFormula
rule : LocalRule (Lcond, Rcond, some val✝) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some val✝)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some val✝, 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inr.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr val✝)) = RES
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr val✝)) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inr.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr val✝¹)) = RES
val✝ : NegLoadFormula ⊕ NegLoadFormula
rule : LocalRule (Lcond, Rcond, some val✝) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some val✝)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some val✝, 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inl.none.neg.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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 (~'a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl (~'a✝))) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inl.none.neg.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
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
val✝ : NegLoadFormula ⊕ NegLoadFormula
rule : LocalRule (Lcond, Rcond, some val✝) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, some val✝)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some val✝, 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 (~'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.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl val✝)) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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.inl.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
val✝ : NegLoadFormula ⊕ NegLoadFormula
rule : LocalRule (Lcond, Rcond, some val✝) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some val✝)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some val✝, 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.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr val✝)) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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.inl.some.inr.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
val✝ : NegLoadFormula ⊕ NegLoadFormula
rule : LocalRule (Lcond, Rcond, some val✝) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some val✝)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some val✝, 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.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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 (~'a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr (~'a✝))) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inr.none.neg.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
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
val✝ : NegLoadFormula ⊕ NegLoadFormula
rule : LocalRule (Lcond, Rcond, some val✝) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, some val✝)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some val✝, 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 (~'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.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl val✝)) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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.inl.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
val✝ : NegLoadFormula ⊕ NegLoadFormula
rule : LocalRule (Lcond, Rcond, some val✝) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some val✝)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some val✝, 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.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr val✝)) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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

case h.refine_2.refine_1.h.some.inr.some.inr.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
val✝ : NegLoadFormula ⊕ NegLoadFormula
rule : LocalRule (Lcond, Rcond, some val✝) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some val✝)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some val✝, 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

State before:
case h.refine_2.refine_1.h.none.none.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, none) = RES
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.none.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, none) = RES
val✝ : NegLoadFormula ⊕ NegLoadFormula
rule : LocalRule (Lcond, Rcond, some val✝) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, some val✝)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some val✝, 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inl.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl val✝)) = RES
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl val✝)) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inl.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl val✝¹)) = RES
val✝ : NegLoadFormula ⊕ NegLoadFormula
rule : LocalRule (Lcond, Rcond, some val✝) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some val✝)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some val✝, 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inr.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr val✝)) = RES
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr val✝)) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inr.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr val✝¹)) = RES
val✝ : NegLoadFormula ⊕ NegLoadFormula
rule : LocalRule (Lcond, Rcond, some val✝) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some val✝)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some val✝, 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inl.none.neg.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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 (~'a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl (~'a✝))) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inl.none.neg.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
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
val✝ : NegLoadFormula ⊕ NegLoadFormula
rule : LocalRule (Lcond, Rcond, some val✝) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, some val✝)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some val✝, 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 (~'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.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl val✝)) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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.inl.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
val✝ : NegLoadFormula ⊕ NegLoadFormula
rule : LocalRule (Lcond, Rcond, some val✝) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some val✝)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some val✝, 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.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr val✝)) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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.inl.some.inr.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
val✝ : NegLoadFormula ⊕ NegLoadFormula
rule : LocalRule (Lcond, Rcond, some val✝) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some val✝)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some val✝, 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.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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 (~'a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr (~'a✝))) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inr.none.neg.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
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
val✝ : NegLoadFormula ⊕ NegLoadFormula
rule : LocalRule (Lcond, Rcond, some val✝) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, some val✝)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some val✝, 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 (~'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.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl val✝)) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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.inl.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
val✝ : NegLoadFormula ⊕ NegLoadFormula
rule : LocalRule (Lcond, Rcond, some val✝) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some val✝)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some val✝, 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.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr val✝)) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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

case h.refine_2.refine_1.h.some.inr.some.inr.some
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
val✝ : NegLoadFormula ⊕ NegLoadFormula
rule : LocalRule (Lcond, Rcond, some val✝) ress
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some val✝)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some val✝, 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
Tactic:
all_goals try (rename_i cond; cases cond)
State after:
case h.refine_2.refine_1.h.none.none.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, none) = RES
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.none.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, none) = RES
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inl val✝), 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.none.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, none) = RES
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inr val✝), 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inl.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'a✝))) = RES
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, some (Sum.inl (~'a✝)) 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inl.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl val✝¹)) = RES
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inl val✝), 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inl.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl val✝¹)) = RES
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inr val✝), 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inr.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'a✝))) = RES
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, some (Sum.inr (~'a✝)) 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inr.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr val✝¹)) = RES
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inl val✝), 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inr.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr val✝¹)) = RES
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inr val✝), 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

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

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

case h.refine_2.refine_1.h.some.inl.none.neg.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
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
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inl val✝), 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 (~'a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl (~'a✝))) ≤ node_to_multiset RES

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

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

case h.refine_2.refine_1.h.some.inr.none.neg.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
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
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inl val✝), 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 (~'a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr (~'a✝))) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inr.none.neg.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
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
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inr val✝), 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 (~'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.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, some (Sum.inl (~'a✝)) 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.inl.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inl val✝), 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.inl.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inr val✝), 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.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, some (Sum.inr (~'a✝)) 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.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inl val✝), 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

case h.refine_2.refine_1.h.some.inr.some.inr.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inr val✝), 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

State before:
case h.refine_2.refine_1.h.none.none.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, none) = RES
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.none.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, none) = RES
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inl val✝), 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.none.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, none) = RES
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inr val✝), 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inl.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'a✝))) = RES
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, some (Sum.inl (~'a✝)) 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inl.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl val✝¹)) = RES
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inl val✝), 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inl.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl val✝¹)) = RES
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inr val✝), 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inr.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'a✝))) = RES
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, some (Sum.inr (~'a✝)) 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inr.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr val✝¹)) = RES
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inl val✝), 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.none.some.inr.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr val✝¹)) = RES
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inr val✝), 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, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset RES

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

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

case h.refine_2.refine_1.h.some.inl.none.neg.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
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
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inl val✝), 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 (~'a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl (~'a✝))) ≤ node_to_multiset RES

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

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

case h.refine_2.refine_1.h.some.inr.none.neg.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
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
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inl val✝), 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 (~'a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr (~'a✝))) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inr.none.neg.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
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
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inr val✝), 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 (~'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.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, some (Sum.inl (~'a✝)) 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.inl.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inl val✝), 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.inl.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inr val✝), 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.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match none, some (Sum.inr (~'a✝)) 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.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inl val✝), 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

case h.refine_2.refine_1.h.some.inr.some.inr.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP :
  Lcond.Sublist L ∧
    Rcond.Sublist R ∧
      match some (Sum.inr val✝), 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
Tactic:
all_goals try simp_all
State after:
case h.refine_2.refine_1.h.none.none.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, none) = RES
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
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.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'a✝))) = RES
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
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.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl val✝¹)) = RES
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
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.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'a✝))) = RES
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
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.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr val✝¹)) = RES
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
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.none.load
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
a✝¹ : Program
a✝ : Formula
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Y_in_ress : (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) = RES
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inl.none.neg.none.box
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
a✝¹ : Program
a✝ : LoadFormula
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Y_in_ress : (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) = RES
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inl.some.inl.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
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.inl.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
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.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
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.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
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.none.load
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
a✝¹ : Program
a✝ : Formula
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Y_in_ress : (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) = RES
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inr.none.neg.none.box
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
a✝¹ : Program
a✝ : LoadFormula
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Y_in_ress : (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) = RES
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inr.some.inl.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
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.inl.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
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.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
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.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
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

State before:
case h.refine_2.refine_1.h.none.none.none
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, none) = RES
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
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.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'a✝))) = RES
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
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.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl val✝¹)) = RES
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
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.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'a✝))) = RES
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
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.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ : NegLoadFormula
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr val✝¹)) = RES
val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
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.none.load
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
a✝¹ : Program
a✝ : Formula
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Y_in_ress : (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) = RES
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inl.none.neg.none.box
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
a✝¹ : Program
a✝ : LoadFormula
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Y_in_ress : (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) = RES
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inl.some.inl.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
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.inl.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
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.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
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.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
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.none.load
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
a✝¹ : Program
a✝ : Formula
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Y_in_ress : (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) = RES
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inr.none.neg.none.box
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
RES : TNode
Lnew Rnew : List Formula
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
a✝¹ : Program
a✝ : LoadFormula
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Y_in_ress : (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) ∈ ress
claim : (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) = RES
Z_eq : Z = node_to_multiset RES - node_to_multiset (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) ≤ node_to_multiset RES

case h.refine_2.refine_1.h.some.inr.some.inl.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
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.inl.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
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.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
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.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond : List Formula
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✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
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 subst claim
State after:
case h.refine_2.refine_1.h.none.none.none
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Z_eq : Z = node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, none) - node_to_multiset (Lnew, Rnew, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, none)

case h.refine_2.refine_1.h.none.some.inl.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'a✝))) -
      node_to_multiset (Lnew, Rnew, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'a✝)))

case h.refine_2.refine_1.h.none.some.inl.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl val✝¹)) -
      node_to_multiset (Lnew, Rnew, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl val✝¹))

case h.refine_2.refine_1.h.none.some.inr.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'a✝))) -
      node_to_multiset (Lnew, Rnew, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'a✝)))

case h.refine_2.refine_1.h.none.some.inr.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr val✝¹)) -
      node_to_multiset (Lnew, Rnew, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr val✝¹))

case h.refine_2.refine_1.h.some.inl.none.neg.none.load
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
a✝¹ : Program
a✝ : Formula
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Y_in_ress : (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) ∈ ress
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝)))

case h.refine_2.refine_1.h.some.inl.none.neg.none.box
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
a✝¹ : Program
a✝ : LoadFormula
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Y_in_ress : (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) ∈ ress
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝)))

case h.refine_2.refine_1.h.some.inl.some.inl.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
val✝ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inl val✝)) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝.1))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inl val✝))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl val✝)) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝.1)))

case h.refine_2.refine_1.h.some.inl.some.inl.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
val✝² : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inl val✝²)) ∈ ress
val✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝².1))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inl val✝²))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl val✝²)) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝².1)))

case h.refine_2.refine_1.h.some.inl.some.inr.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
val✝ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inl val✝)) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝.1))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inl val✝))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl val✝)) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝.1)))

case h.refine_2.refine_1.h.some.inl.some.inr.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
val✝² : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inl val✝²)) ∈ ress
val✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝².1))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inl val✝²))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl val✝²)) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝².1)))

case h.refine_2.refine_1.h.some.inr.none.neg.none.load
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
a✝¹ : Program
a✝ : Formula
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Y_in_ress : (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) ∈ ress
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝)))

case h.refine_2.refine_1.h.some.inr.none.neg.none.box
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
a✝¹ : Program
a✝ : LoadFormula
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Y_in_ress : (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) ∈ ress
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝)))

case h.refine_2.refine_1.h.some.inr.some.inl.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
val✝ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inr val✝)) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝.1))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inr val✝))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr val✝)) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝.1)))

case h.refine_2.refine_1.h.some.inr.some.inl.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
val✝² : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inr val✝²)) ∈ ress
val✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝².1))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inr val✝²))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr val✝²)) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝².1)))

case h.refine_2.refine_1.h.some.inr.some.inr.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
val✝ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inr val✝)) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝.1))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inr val✝))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr val✝)) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝.1)))

case h.refine_2.refine_1.h.some.inr.some.inr.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
val✝² : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inr val✝²)) ∈ ress
val✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝².1))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inr val✝²))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr val✝²)) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝².1)))

State before:
case h.refine_2.refine_1.h.none.none.none
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Z_eq : Z = node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, none) - node_to_multiset (Lnew, Rnew, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤ node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, none)

case h.refine_2.refine_1.h.none.some.inl.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'a✝))) -
      node_to_multiset (Lnew, Rnew, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'a✝)))

case h.refine_2.refine_1.h.none.some.inl.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl val✝¹)) -
      node_to_multiset (Lnew, Rnew, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl val✝¹))

case h.refine_2.refine_1.h.none.some.inr.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'a✝))) -
      node_to_multiset (Lnew, Rnew, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'a✝)))

case h.refine_2.refine_1.h.none.some.inr.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
Y_in_ress : (Lnew, Rnew, none) ∈ ress
val✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr val✝¹)) -
      node_to_multiset (Lnew, Rnew, none)
⊢ node_to_multiset (Lnew, Rnew, none) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr val✝¹))

case h.refine_2.refine_1.h.some.inl.none.neg.none.load
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
a✝¹ : Program
a✝ : Formula
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Y_in_ress : (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) ∈ ress
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝)))

case h.refine_2.refine_1.h.some.inl.none.neg.none.box
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
a✝¹ : Program
a✝ : LoadFormula
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Y_in_ress : (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) ∈ ress
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝))) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'⌊a✝¹⌋a✝)))

case h.refine_2.refine_1.h.some.inl.some.inl.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
val✝ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inl val✝)) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝.1))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inl val✝))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl val✝)) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝.1)))

case h.refine_2.refine_1.h.some.inl.some.inl.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
val✝² : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inl val✝²)) ∈ ress
val✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝².1))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inl val✝²))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl val✝²)) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝².1)))

case h.refine_2.refine_1.h.some.inl.some.inr.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
val✝ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inl val✝)) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝.1))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inl val✝))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl val✝)) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝.1)))

case h.refine_2.refine_1.h.some.inl.some.inr.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
val✝² : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inl val✝²)) ∈ ress
val✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝².1))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inl val✝²))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inl val✝²)) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inl (~'val✝².1)))

case h.refine_2.refine_1.h.some.inr.none.neg.none.load
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
a✝¹ : Program
a✝ : Formula
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Y_in_ress : (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) ∈ ress
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝)))

case h.refine_2.refine_1.h.some.inr.none.neg.none.box
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
rule : LocalRule (Lcond, Rcond, none) ress
Z : Multiset Formula := node_to_multiset (L, R, none) - node_to_multiset (Lcond, Rcond, none)
a✝¹ : Program
a✝ : LoadFormula
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Y_in_ress : (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) ∈ ress
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝)))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝))) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'⌊a✝¹⌋a✝)))

case h.refine_2.refine_1.h.some.inr.some.inl.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
val✝ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inr val✝)) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inl (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝.1))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inr val✝))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr val✝)) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝.1)))

case h.refine_2.refine_1.h.some.inr.some.inl.some.inl
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
val✝² : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inr val✝²)) ∈ ress
val✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inl val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inl val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inl val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝².1))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inr val✝²))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr val✝²)) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝².1)))

case h.refine_2.refine_1.h.some.inr.some.inr.none.neg
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
val✝ : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inr val✝)) ∈ ress
rule : LocalRule (Lcond, Rcond, none) ress
a✝ : LoadFormula
Z : Multiset Formula := node_to_multiset (L, R, some (Sum.inr (~'a✝))) - node_to_multiset (Lcond, Rcond, none)
preconP : Lcond.Sublist L ∧ Rcond.Sublist R
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝.1))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inr val✝))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr val✝)) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝.1)))

case h.refine_2.refine_1.h.some.inr.some.inr.some.inr
L R : List Formula
ress : List TNode
Lcond Rcond Lnew Rnew : List Formula
val✝² : NegLoadFormula
Y_in_ress : (Lnew, Rnew, some (Sum.inr val✝²)) ∈ ress
val✝¹ val✝ : NegLoadFormula
rule : LocalRule (Lcond, Rcond, some (Sum.inr val✝)) ress
Z : Multiset Formula :=
  node_to_multiset (L, R, some (Sum.inr val✝¹)) - node_to_multiset (Lcond, Rcond, some (Sum.inr val✝))
preconP : Lcond.Sublist L ∧ Rcond.Sublist R ∧ val✝ = val✝¹
Z_eq :
  Z =
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝².1))) -
      node_to_multiset (Lnew, Rnew, some (Sum.inr val✝²))
⊢ node_to_multiset (Lnew, Rnew, some (Sum.inr val✝²)) ≤
    node_to_multiset (L.diff Lcond ++ Lnew, R.diff Rcond ++ Rnew, some (Sum.inr (~'val✝².1)))
Tactic:
all_goals
  simp [node_to_multiset]
  try apply List.Sublist.subperm
  try simp_all
  sorry
State after:
no goals