internlm/Lean-Github huggingface dataset:
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
i : B C { fst := node, snd := k₁ }.fst
j : B C node
heq : HEq i j
⊢ PSigma.snd { fst := node, snd := k₁ } i = k₁ j
Tactic:
cases heq
Proof state after:
case refl
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
i : B C { fst := node, snd := k₁ }.fst
⊢ PSigma.snd { fst := node, snd := k₁ } i = k₁ i
Theorem: Container.M.bisim.lemma1
Proof state before:
case refl
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
i : B C { fst := node, snd := k₁ }.fst
⊢ PSigma.snd { fst := node, snd := k₁ } i = k₁ i
Tactic:
rfl
Proof state after:
no goals
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
⊢ B C node = B C (destruct x).fst
Tactic:
simp [congrArg (λ x => x.1) eq₁]
Proof state after:
no goals
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
Tactic:
rw [h]
Proof state after:
case a
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 (cast (_ : B C node = B C (destruct x).fst) i) i
Theorem: Container.M.bisim.lemma1
Proof state before:
case a
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 (cast (_ : B C node = B C (destruct x).fst) i) i
Tactic:
apply cast_heq
Proof state after:
no goals
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
⊢ HEq i (cast (_ : B C node = B C (destruct x).fst) i)
Tactic:
apply HEq.symm
Proof state after:
case h
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 (cast (_ : B C node = B C (destruct x).fst) i) i
Theorem: Container.M.bisim.lemma1
Proof state before:
case h
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 (cast (_ : B C node = B C (destruct x).fst) i) i
Tactic:
apply cast_heq
Proof state after:
no goals
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 node), cx i = approx (k₁ i) n
⊢ ∀ (i : B C node), cy i = approx (k₂ i) n
Tactic:
have h : ∀ i j, HEq i j → (y.destruct.snd i) = k₂ j := by
  rw [eq₂]
  intro i j heq
  cases heq
  rfl
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 node), cx i = approx (k₁ i) n
h : ∀ (i : B C (destruct y).fst) (j : B C node), HEq i j → PSigma.snd (destruct y) i = k₂ j
⊢ ∀ (i : B C node), cy i = approx (k₂ i) n
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 node), cx i = approx (k₁ i) n
h : ∀ (i : B C (destruct y).fst) (j : B C node), HEq i j → PSigma.snd (destruct y) i = k₂ j
⊢ ∀ (i : B C node), cy i = approx (k₂ i) n
Tactic:
intro i
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 node), cx i = approx (k₁ i) n
h : ∀ (i : B C (destruct y).fst) (j : B C node), HEq i j → PSigma.snd (destruct y) i = k₂ j
i : B C node
⊢ cy i = approx (k₂ i) n
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 node), cx i = approx (k₁ i) n
h : ∀ (i : B C (destruct y).fst) (j : B C node), HEq i j → PSigma.snd (destruct y) i = k₂ j
i : B C node
⊢ HEq i (cast (_ : B C node = B C (destruct y).fst) i)
Tactic:
. apply HEq.symm
  apply cast_heq
Proof state after:
no goals
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 node), cx i = approx (k₁ i) n
⊢ ∀ (i : B C (destruct y).fst) (j : B C node), HEq i j → PSigma.snd (destruct y) i = k₂ j
Tactic:
rw [eq₂]
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 node), cx i = approx (k₁ i) n
⊢ ∀ (i : B C { fst := node, snd := k₂ }.fst) (j : B C node), HEq i j → PSigma.snd { fst := node, snd := k₂ } i = k₂ j