Theorem: endNodesOfLocalRuleLT (Bml/Tableau.lean)

State before:
Z LR : TNode
a✝ : List TNode
lrApp : LocalRuleApp LR a✝
subTabs : (c : TNode) → c ∈ a✝ → LocalTableau c
⊢ Z ∈ endNodesOf ⟨LR, fromRule lrApp subTabs⟩ → lengthOfTNode Z < lengthOfTNode LR
Tactic:
intro Z_endOf_LR
State after:
Z LR : TNode
a✝ : List TNode
lrApp : LocalRuleApp LR a✝
subTabs : (c : TNode) → c ∈ a✝ → LocalTableau c
Z_endOf_LR : Z ∈ endNodesOf ⟨LR, fromRule lrApp subTabs⟩
⊢ lengthOfTNode Z < lengthOfTNode LR

State before:
Z LR : TNode
a✝ : List TNode
lrApp : LocalRuleApp LR a✝
subTabs : (c : TNode) → c ∈ a✝ → LocalTableau c
Z_endOf_LR : Z ∈ endNodesOf ⟨LR, fromRule lrApp subTabs⟩
⊢ lengthOfTNode Z < lengthOfTNode LR
Tactic:
simp at Z_endOf_LR
State after:
Z LR : TNode
a✝ : List TNode
lrApp : LocalRuleApp LR a✝
subTabs : (c : TNode) → c ∈ a✝ → LocalTableau c
Z_endOf_LR : ∃ l, (∃ a, ∃ (h : a ∈ a✝), endNodesOf ⟨a, subTabs a ⋯⟩ = l) ∧ Z ∈ l
⊢ lengthOfTNode Z < lengthOfTNode LR

State before:
Z LR : TNode
a✝ : List TNode
lrApp : LocalRuleApp LR a✝
subTabs : (c : TNode) → c ∈ a✝ → LocalTableau c
Z_endOf_LR : ∃ l, (∃ a, ∃ (h : a ∈ a✝), endNodesOf ⟨a, subTabs a ⋯⟩ = l) ∧ Z ∈ l
⊢ lengthOfTNode Z < lengthOfTNode LR
Tactic:
rcases Z_endOf_LR with ⟨ZS, ⟨c, c_in_C, endNodes_c_eq_ZS⟩, Z_in_ZS⟩
State after:
case intro.intro.intro.intro
Z LR : TNode
a✝ : List TNode
lrApp : LocalRuleApp LR a✝
subTabs : (c : TNode) → c ∈ a✝ → LocalTableau c
ZS : List TNode
Z_in_ZS : Z ∈ ZS
c : TNode
c_in_C : c ∈ a✝
endNodes_c_eq_ZS : endNodesOf ⟨c, subTabs c ⋯⟩ = ZS
⊢ lengthOfTNode Z < lengthOfTNode LR

State before:
case intro.intro.intro.intro
Z LR : TNode
a✝ : List TNode
lrApp : LocalRuleApp LR a✝
subTabs : (c : TNode) → c ∈ a✝ → LocalTableau c
ZS : List TNode
Z_in_ZS : Z ∈ ZS
c : TNode
c_in_C : c ∈ a✝
endNodes_c_eq_ZS : endNodesOf ⟨c, subTabs c ⋯⟩ = ZS
⊢ lengthOfTNode Z < lengthOfTNode LR
Tactic:
subst endNodes_c_eq_ZS
State after:
case intro.intro.intro.intro
Z LR : TNode
a✝ : List TNode
lrApp : LocalRuleApp LR a✝
subTabs : (c : TNode) → c ∈ a✝ → LocalTableau c
c : TNode
c_in_C : c ∈ a✝
Z_in_ZS : Z ∈ endNodesOf ⟨c, subTabs c ⋯⟩
⊢ lengthOfTNode Z < lengthOfTNode LR

State before:
case intro.intro.intro.intro
Z LR : TNode
a✝ : List TNode
lrApp : LocalRuleApp LR a✝
subTabs : (c : TNode) → c ∈ a✝ → LocalTableau c
c : TNode
c_in_C : c ∈ a✝
Z_in_ZS : Z ∈ endNodesOf ⟨c, subTabs c ⋯⟩
⊢ lengthOfTNode Z < lengthOfTNode LR
Tactic:
have := localRuleAppDecreasesLength lrApp c c_in_C
State after:
case intro.intro.intro.intro
Z LR : TNode
a✝ : List TNode
lrApp : LocalRuleApp LR a✝
subTabs : (c : TNode) → c ∈ a✝ → LocalTableau c
c : TNode
c_in_C : c ∈ a✝
Z_in_ZS : Z ∈ endNodesOf ⟨c, subTabs c ⋯⟩
this : lengthOfTNode c < lengthOfTNode (LR.1, LR.2)
⊢ lengthOfTNode Z < lengthOfTNode LR

State before:
case intro.intro.intro.intro
Z LR : TNode
a✝ : List TNode
lrApp : LocalRuleApp LR a✝
subTabs : (c : TNode) → c ∈ a✝ → LocalTableau c
c : TNode
c_in_C : c ∈ a✝
Z_in_ZS : Z ∈ endNodesOf ⟨c, subTabs c ⋯⟩
this : lengthOfTNode c < lengthOfTNode (LR.1, LR.2)
⊢ lengthOfTNode Z < lengthOfTNode LR
Tactic:
calc
  lengthOfTNode Z ≤ lengthOfTNode c := endNodesOfLEQ Z_in_ZS
  _ < lengthOfTNode LR := this
State after:
no goals