Theorem: Container.M.bisim.lemma1
Proof state before:
C : Container
R : M C → M C → Prop
h₀ :
  ∀ (x y : M C),
    R x y →
      ∃ node k₁ k₂,
        destruct x = { fst := node, snd := k₁ } ∧
          destruct y = { fst := node, snd := k₂ } ∧ ∀ (i : B C node), R (k₁ i) (k₂ i)
n : Nat
h✝ : ∀ (x y : M C), R x y → approx x n = approx y n
x y : M C
h₁ : R x y
h₂✝ : Approx.node (approx x (Nat.succ n)) = Container.M.node x
h₃✝ : Approx.node (approx y (Nat.succ n)) = Container.M.node y
nodex nodey node : C.A
k₁ k₂ : B C node → M C
eq₁ : destruct x = { fst := node, snd := k₁ }
eq₂ : destruct y = { fst := node, snd := k₂ }
kR : ∀ (i : B C node), R (k₁ i) (k₂ i)
cx : B C node → Approx C n
h₄ : approx x (Nat.succ n) = Approx.MStep node cx
h₂ : node = node
h₆ :
  ∀ (i : B C (Approx.node (Approx.MStep node cx))) (j : B C (destruct x).fst),
    HEq i j → cx i = approx (PSigma.snd (destruct x) j) n
cy : B C node → Approx C n
h₅ : approx y (Nat.succ n) = Approx.MStep node cy
h₃ : node = node
h₇ :
  ∀ (i : B C (Approx.node (Approx.MStep node cy))) (j : B C (destruct y).fst),
    HEq i j → cy i = approx (PSigma.snd (destruct y) j) n
i✝ : B C node
h : ∀ (i : B C (destruct x).fst) (j : B C node), HEq i j → PSigma.snd (destruct x) i = k₁ j
i : B C node
⊢ approx (PSigma.snd (destruct x) (cast (_ : B C node = B C (destruct x).fst) i)) n = approx (k₁ i) n

C : Container
R : M C → M C → Prop
h₀ :
  ∀ (x y : M C),
    R x y →
      ∃ node k₁ k₂,
        destruct x = { fst := node, snd := k₁ } ∧
          destruct y = { fst := node, snd := k₂ } ∧ ∀ (i : B C node), R (k₁ i) (k₂ i)
n : Nat
h✝ : ∀ (x y : M C), R x y → approx x n = approx y n
x y : M C
h₁ : R x y
h₂✝ : Approx.node (approx x (Nat.succ n)) = Container.M.node x
h₃✝ : Approx.node (approx y (Nat.succ n)) = Container.M.node y
nodex nodey node : C.A
k₁ k₂ : B C node → M C
eq₁ : destruct x = { fst := node, snd := k₁ }
eq₂ : destruct y = { fst := node, snd := k₂ }
kR : ∀ (i : B C node), R (k₁ i) (k₂ i)
cx : B C node → Approx C n
h₄ : approx x (Nat.succ n) = Approx.MStep node cx
h₂ : node = node
h₆ :
  ∀ (i : B C (Approx.node (Approx.MStep node cx))) (j : B C (destruct x).fst),
    HEq i j → cx i = approx (PSigma.snd (destruct x) j) n
cy : B C node → Approx C n
h₅ : approx y (Nat.succ n) = Approx.MStep node cy
h₃ : node = node
h₇ :
  ∀ (i : B C (Approx.node (Approx.MStep node cy))) (j : B C (destruct y).fst),
    HEq i j → cy i = approx (PSigma.snd (destruct y) j) n
i✝ : B C node
h : ∀ (i : B C (destruct x).fst) (j : B C node), HEq i j → PSigma.snd (destruct x) i = k₁ j
i : B C node
⊢ HEq i (cast (_ : B C node = B C (destruct x).fst) i)
Tactic:
. rw [h]
  apply cast_heq
Proof state after:
C : Container
R : M C → M C → Prop
h₀ :
  ∀ (x y : M C),
    R x y →
      ∃ node k₁ k₂,
        destruct x = { fst := node, snd := k₁ } ∧
          destruct y = { fst := node, snd := k₂ } ∧ ∀ (i : B C node), R (k₁ i) (k₂ i)
n : Nat
h✝ : ∀ (x y : M C), R x y → approx x n = approx y n
x y : M C
h₁ : R x y
h₂✝ : Approx.node (approx x (Nat.succ n)) = Container.M.node x
h₃✝ : Approx.node (approx y (Nat.succ n)) = Container.M.node y
nodex nodey node : C.A
k₁ k₂ : B C node → M C
eq₁ : destruct x = { fst := node, snd := k₁ }
eq₂ : destruct y = { fst := node, snd := k₂ }
kR : ∀ (i : B C node), R (k₁ i) (k₂ i)
cx : B C node → Approx C n
h₄ : approx x (Nat.succ n) = Approx.MStep node cx
h₂ : node = node
h₆ :
  ∀ (i : B C (Approx.node (Approx.MStep node cx))) (j : B C (destruct x).fst),
    HEq i j → cx i = approx (PSigma.snd (destruct x) j) n
cy : B C node → Approx C n
h₅ : approx y (Nat.succ n) = Approx.MStep node cy
h₃ : node = node
h₇ :
  ∀ (i : B C (Approx.node (Approx.MStep node cy))) (j : B C (destruct y).fst),
    HEq i j → cy i = approx (PSigma.snd (destruct y) j) n
i✝ : B C node
h : ∀ (i : B C (destruct x).fst) (j : B C node), HEq i j → PSigma.snd (destruct x) i = k₁ j
i : B C node
⊢ HEq i (cast (_ : B C node = B C (destruct x).fst) i)