Theorem: Execution.State.Over.exists_allowed_of_acyclic_has_unprocessed (ReactorModel/Execution/Theorems/StateOver.lean)

State before:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
⊢ (invImage
        (fun a =>
          PSigma.casesOn a fun i snd =>
            PSigma.casesOn snd fun a snd =>
              PSigma.casesOn snd fun h₁ snd =>
                let_fun fin := ⋯;
                (Set.Finite.toFinset fin).card)
        instWellFoundedRelation).1
    { fst := w✝, snd := { fst := a, snd := { fst := ⋯, snd := h₂ } } }
    { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } }
Tactic:
simp_wf
State after:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
⊢ (Set.Finite.toFinset ⋯).card < (Set.Finite.toFinset ⋯).card

State before:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
⊢ (Set.Finite.toFinset ⋯).card < (Set.Finite.toFinset ⋯).card
Tactic:
refine Finset.card_lt_card $ Set.Finite.toFinset_strictMono ?_
State after:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
⊢ dependencies s.rtr w✝ \ s.progress ⊂ dependencies s.rtr i \ s.progress

State before:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
⊢ dependencies s.rtr w✝ \ s.progress ⊂ dependencies s.rtr i \ s.progress
Tactic:
have h := mem_dependencies_ssubset a $ s.rtr_eq ▸ h₁
State after:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊂ dependencies rtr i
⊢ dependencies s.rtr w✝ \ s.progress ⊂ dependencies s.rtr i \ s.progress

State before:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊂ dependencies rtr i
⊢ dependencies s.rtr w✝ \ s.progress ⊂ dependencies s.rtr i \ s.progress
Tactic:
simp [ssubset_iff_subset_ne, s.rtr_eq] at h ⊢
State after:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊆ dependencies rtr i ∧ ¬dependencies rtr w✝ = dependencies rtr i
⊢ dependencies rtr w✝ \ s.progress ⊆ dependencies rtr i \ s.progress ∧
    ¬dependencies rtr w✝ \ s.progress = dependencies rtr i \ s.progress

State before:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊆ dependencies rtr i ∧ ¬dependencies rtr w✝ = dependencies rtr i
⊢ dependencies rtr w✝ \ s.progress ⊆ dependencies rtr i \ s.progress ∧
    ¬dependencies rtr w✝ \ s.progress = dependencies rtr i \ s.progress
Tactic:
refine ⟨?subset, ?ne⟩
State after:
case subset
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊆ dependencies rtr i ∧ ¬dependencies rtr w✝ = dependencies rtr i
⊢ dependencies rtr w✝ \ s.progress ⊆ dependencies rtr i \ s.progress

case ne
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊆ dependencies rtr i ∧ ¬dependencies rtr w✝ = dependencies rtr i
⊢ ¬dependencies rtr w✝ \ s.progress = dependencies rtr i \ s.progress

State before:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊆ dependencies rtr i ∧ ¬dependencies rtr w✝ = dependencies rtr i
⊢ dependencies rtr w✝ \ s.progress ⊆ dependencies rtr i \ s.progress
Tactic:
case subset =>
  intro x hx
  simp [Set.mem_diff] at hx ⊢
  exact ⟨h.left hx.left, hx.right⟩
State after:
no goals

State before:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊆ dependencies rtr i ∧ ¬dependencies rtr w✝ = dependencies rtr i
⊢ ¬dependencies rtr w✝ \ s.progress = dependencies rtr i \ s.progress
Tactic:
case ne =>
  simp [Set.ext_iff]
  refine ⟨_, h₂, ?_⟩
  rw [iff_true_right $ s.rtr_eq ▸ h₁]
  exact a _
State after:
no goals

State before:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊆ dependencies rtr i ∧ ¬dependencies rtr w✝ = dependencies rtr i
⊢ dependencies rtr w✝ \ s.progress ⊆ dependencies rtr i \ s.progress
Tactic:
intro x hx
State after:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊆ dependencies rtr i ∧ ¬dependencies rtr w✝ = dependencies rtr i
x : Component.idType Component.rcn
hx : x ∈ dependencies rtr w✝ \ s.progress
⊢ x ∈ dependencies rtr i \ s.progress

State before:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊆ dependencies rtr i ∧ ¬dependencies rtr w✝ = dependencies rtr i
x : Component.idType Component.rcn
hx : x ∈ dependencies rtr w✝ \ s.progress
⊢ x ∈ dependencies rtr i \ s.progress
Tactic:
simp [Set.mem_diff] at hx ⊢
State after:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊆ dependencies rtr i ∧ ¬dependencies rtr w✝ = dependencies rtr i
x : Component.idType Component.rcn
hx : x ∈ dependencies rtr w✝ ∧ x ∉ s.progress
⊢ x ∈ dependencies rtr i ∧ x ∉ s.progress

State before:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊆ dependencies rtr i ∧ ¬dependencies rtr w✝ = dependencies rtr i
x : Component.idType Component.rcn
hx : x ∈ dependencies rtr w✝ ∧ x ∉ s.progress
⊢ x ∈ dependencies rtr i ∧ x ∉ s.progress
Tactic:
exact ⟨h.left hx.left, hx.right⟩
State after:
no goals

State before:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊆ dependencies rtr i ∧ ¬dependencies rtr w✝ = dependencies rtr i
⊢ ¬dependencies rtr w✝ \ s.progress = dependencies rtr i \ s.progress
Tactic:
simp [Set.ext_iff]
State after:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊆ dependencies rtr i ∧ ¬dependencies rtr w✝ = dependencies rtr i
⊢ ∃ x ∉ s.progress, ¬(x ∈ dependencies rtr w✝ ↔ x ∈ dependencies rtr i)

State before:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊆ dependencies rtr i ∧ ¬dependencies rtr w✝ = dependencies rtr i
⊢ ∃ x ∉ s.progress, ¬(x ∈ dependencies rtr w✝ ↔ x ∈ dependencies rtr i)
Tactic:
refine ⟨_, h₂, ?_⟩
State after:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊆ dependencies rtr i ∧ ¬dependencies rtr w✝ = dependencies rtr i
⊢ ¬(w✝ ∈ dependencies rtr w✝ ↔ w✝ ∈ dependencies rtr i)

State before:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊆ dependencies rtr i ∧ ¬dependencies rtr w✝ = dependencies rtr i
⊢ ¬(w✝ ∈ dependencies rtr w✝ ↔ w✝ ∈ dependencies rtr i)
Tactic:
rw [iff_true_right $ s.rtr_eq ▸ h₁]
State after:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊆ dependencies rtr i ∧ ¬dependencies rtr w✝ = dependencies rtr i
⊢ w✝ ∉ dependencies rtr w✝

State before:
α : Type
inst✝¹ : Hierarchical α
inst✝ : Reactor.Finite α
rtr : α
s : State.Over rtr
_x✝ :
  (i : Component.idType Component.rcn) ×'
    (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝⁴ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y _x✝ →
      ∃ i, Allows s.toState i
i : Component.idType Component.rcn
a✝³ : (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝² :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := a✝³ } →
      ∃ i, Allows s.toState i
a : Dependency.Acyclic rtr
h₁✝¹ : (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress
a✝¹ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := h₁✝¹ } } →
      ∃ i, Allows s.toState i
h₁✝ : i ∈ s.rtr[Component.rcn]
h₂✝ : i ∉ s.progress
a✝ :
  ∀
    (y :
      (i : Component.idType Component.rcn) ×'
        (_ : Dependency.Acyclic rtr) ×' (_ : i ∈ s.rtr[Component.rcn]) ×' i ∉ s.progress),
    (invImage
            (fun a =>
              PSigma.casesOn a fun i snd =>
                PSigma.casesOn snd fun a snd =>
                  PSigma.casesOn snd fun h₁ snd =>
                    let_fun fin := ⋯;
                    (Set.Finite.toFinset fin).card)
            instWellFoundedRelation).1
        y { fst := i, snd := { fst := a, snd := { fst := h₁✝, snd := h₂✝ } } } →
      ∃ i, Allows s.toState i
h✝ : ¬dependencies s.rtr i \ s.progress = ∅
w✝ : ID
hd : w✝ ∈ dependencies s.rtr i \ s.progress
h₁ : w✝ ∈ dependencies s.rtr i
h₂ : w✝ ∉ s.progress
h : dependencies rtr w✝ ⊆ dependencies rtr i ∧ ¬dependencies rtr w✝ = dependencies rtr i
⊢ w✝ ∉ dependencies rtr w✝
Tactic:
exact a _
State after:
no goals