calc lengthOfTNode c
= lengthOfSet (L \ Lcond ∪ res.1) + lengthOfSet (R \ Rcond ∪ res.2) :=
    by subst def_c; simp
_ ≤ lengthOfSet (L \ Lcond ∪ res.1) + lengthOfSet R :=
    by rw [hyp.2]; simp [Finset.sum_le_sum_of_subset]
_ < lengthOfSet L + lengthOfSet R :=
    by have := localRuleAppDecreasesLengthSide L Lcond res.1 hyp.1 precondProofL; aesop
_ = lengthOfTNode (L, R) := by simp
L R : Finset Formula
c : TNode
ress : List SubPair
Lcond Rcond : Finset Formula
rule : LocalRule (Lcond, Rcond) ress
precondProofL : Lcond ⊆ L
precondProofR : Rcond ⊆ R
lrApp : LocalRuleApp (L, R) (applyLocalRule rule (L, R))
res : SubPair
res_in_ress : res ∈ ress
def_c : (L \ Lcond ∪ res.1, R \ Rcond ∪ res.2) = c
this : Lcond ∩ res.1 = ∅ ∧ Rcond ∩ res.2 = ∅
hyp : lengthOf res.1 < lengthOf Lcond ∧ res.2 = ∅
⊢ lengthOfTNode c < lengthOfTNode (L, R)
no goals