url
stringclasses
147 values
commit
stringclasses
147 values
file_path
stringlengths
7
101
full_name
stringlengths
1
94
start
stringlengths
6
10
end
stringlengths
6
11
tactic
stringlengths
1
11.2k
state_before
stringlengths
3
2.09M
state_after
stringlengths
6
2.09M
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma0
[121, 1]
[131, 52]
apply HEq.symm
case h C : Container x : M C n : Nat i : B C (Approx.node (approx x (Nat.succ n))) j : B C (destruct x).fst heq : HEq i j this : B C (destruct x).fst = B C (Approx.node (approx x (Nat.succ n))) ⊢ HEq j i
case h.h C : Container x : M C n : Nat i : B C (Approx.node (approx x (Nat.succ n))) j : B C (destruct x).fst heq : HEq i j this : B C (destruct x).fst = B C (Approx.node (approx x (Nat.succ n))) ⊢ HEq i j
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma0
[121, 1]
[131, 52]
assumption
case h.h C : Container x : M C n : Nat i : B C (Approx.node (approx x (Nat.succ n))) j : B C (destruct x).fst heq : HEq i j this : B C (destruct x).fst = B C (Approx.node (approx x (Nat.succ n))) ⊢ HEq i j
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
intro x y n 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) ⊢ ∀ (x y : M C) (n : Nat), R x y → approx x n = approx y 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) x y : M C n : Nat h₁ : R x y ⊢ approx x n = approx y n
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
induction n generalizing x y
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) x y : M C n : Nat h₁ : R x y ⊢ approx x n = approx y n
case zero 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) x y : M C h₁ : R x y ⊢ approx x Nat.zero = approx y Nat.zero case succ 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 n_ih✝ : ∀ (x y : M C), R x y → approx x n✝ = approx y n✝ x y : M C h₁ : R x y ⊢ approx x (Nat.succ n✝) = approx y (Nat.succ n✝)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
case zero => cases x.approx 0 cases y.approx 0 rfl
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) x y : M C h₁ : R x y ⊢ approx x Nat.zero = approx y Nat.zero
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
case succ n h => have h₂ := x.node_thm n have h₃ := y.node_thm n cases h₄: x.approx (.succ n) with | MStep nodex cx => cases h₅: y.approx (.succ n) with | MStep nodey cy => have ⟨node, k₁, k₂, eq₁, eq₂, kR⟩ := h₀ _ _ h₁ have h₂ : (Approx.MStep nodex cx).node = node := by have := congrArg (λ x => x.1) eq₁ simp only [destruct] at this rw [h₄] at h₂ rw [←this] exact h₂ have h₃ : (Approx.MStep nodey cy).node = node := by have := congrArg (λ x => x.1) eq₂ simp only [destruct] at this rw [h₅] at h₃ rw [←this] exact h₃ simp [Approx.node] at h₂ h₃ have h₂ := Eq.symm h₂ have h₃ := Eq.symm h₃ have h₆ := bisim.lemma0 x n have h₇ := bisim.lemma0 y n rw [h₄] at h₆ rw [h₅] at h₇ simp only [Approx.children] at h₇ h₆ induction h₂ induction h₃ suffices h₈ : ∀ i: C.B node, cx i = cy i by have : cx = cy := by funext i apply h₈ rw [this] intro i have h₆ : ∀ i, cx i = (k₁ i).approx n := by have h : ∀ i j, HEq i j → (x.destruct.snd i) = k₁ j := by rw [eq₁] intro i j heq cases heq rfl intro i rw [h₆ i (cast (by simp [congrArg (λ x => x.1) eq₁]) i)] . rw [h] apply cast_heq . apply HEq.symm apply cast_heq have h₇ : ∀ i, cy i = (k₂ i).approx n := by have h : ∀ i j, HEq i j → (y.destruct.snd i) = k₂ j := by rw [eq₂] intro i j heq cases heq rfl intro i rw [h₇ i (cast (by simp [congrArg (λ x => x.1) eq₂]) i)] . rw [h] apply cast_heq . apply HEq.symm apply cast_heq rw [h₆, h₇] apply h apply kR
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 ⊢ approx x (Nat.succ n) = approx y (Nat.succ n)
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
cases x.approx 0
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) x y : M C h₁ : R x y ⊢ approx x Nat.zero = approx y Nat.zero
case MStop 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) x y : M C h₁ : R x y ⊢ Approx.MStop = approx y Nat.zero
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
cases y.approx 0
case MStop 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) x y : M C h₁ : R x y ⊢ Approx.MStop = approx y Nat.zero
case MStop.MStop 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) x y : M C h₁ : R x y ⊢ Approx.MStop = Approx.MStop
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
rfl
case MStop.MStop 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) x y : M C h₁ : R x y ⊢ Approx.MStop = Approx.MStop
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
have h₂ := x.node_thm 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 ⊢ approx x (Nat.succ n) = approx y (Nat.succ 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)) = node x ⊢ approx x (Nat.succ n) = approx y (Nat.succ n)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
have h₃ := y.node_thm 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)) = node x ⊢ approx x (Nat.succ n) = approx y (Nat.succ 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)) = node x h₃ : Approx.node (approx y (Nat.succ n)) = node y ⊢ approx x (Nat.succ n) = approx y (Nat.succ n)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
cases h₄: x.approx (.succ n) with | MStep nodex cx => cases h₅: y.approx (.succ n) with | MStep nodey cy => have ⟨node, k₁, k₂, eq₁, eq₂, kR⟩ := h₀ _ _ h₁ have h₂ : (Approx.MStep nodex cx).node = node := by have := congrArg (λ x => x.1) eq₁ simp only [destruct] at this rw [h₄] at h₂ rw [←this] exact h₂ have h₃ : (Approx.MStep nodey cy).node = node := by have := congrArg (λ x => x.1) eq₂ simp only [destruct] at this rw [h₅] at h₃ rw [←this] exact h₃ simp [Approx.node] at h₂ h₃ have h₂ := Eq.symm h₂ have h₃ := Eq.symm h₃ have h₆ := bisim.lemma0 x n have h₇ := bisim.lemma0 y n rw [h₄] at h₆ rw [h₅] at h₇ simp only [Approx.children] at h₇ h₆ induction h₂ induction h₃ suffices h₈ : ∀ i: C.B node, cx i = cy i by have : cx = cy := by funext i apply h₈ rw [this] intro i have h₆ : ∀ i, cx i = (k₁ i).approx n := by have h : ∀ i j, HEq i j → (x.destruct.snd i) = k₁ j := by rw [eq₁] intro i j heq cases heq rfl intro i rw [h₆ i (cast (by simp [congrArg (λ x => x.1) eq₁]) i)] . rw [h] apply cast_heq . apply HEq.symm apply cast_heq have h₇ : ∀ i, cy i = (k₂ i).approx n := by have h : ∀ i j, HEq i j → (y.destruct.snd i) = k₂ j := by rw [eq₂] intro i j heq cases heq rfl intro i rw [h₇ i (cast (by simp [congrArg (λ x => x.1) eq₂]) i)] . rw [h] apply cast_heq . apply HEq.symm apply cast_heq rw [h₆, h₇] apply h apply kR
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)) = node x h₃ : Approx.node (approx y (Nat.succ n)) = node y ⊢ approx x (Nat.succ n) = approx y (Nat.succ n)
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
cases h₅: y.approx (.succ n) with | MStep nodey cy => have ⟨node, k₁, k₂, eq₁, eq₂, kR⟩ := h₀ _ _ h₁ have h₂ : (Approx.MStep nodex cx).node = node := by have := congrArg (λ x => x.1) eq₁ simp only [destruct] at this rw [h₄] at h₂ rw [←this] exact h₂ have h₃ : (Approx.MStep nodey cy).node = node := by have := congrArg (λ x => x.1) eq₂ simp only [destruct] at this rw [h₅] at h₃ rw [←this] exact h₃ simp [Approx.node] at h₂ h₃ have h₂ := Eq.symm h₂ have h₃ := Eq.symm h₃ have h₆ := bisim.lemma0 x n have h₇ := bisim.lemma0 y n rw [h₄] at h₆ rw [h₅] at h₇ simp only [Approx.children] at h₇ h₆ induction h₂ induction h₃ suffices h₈ : ∀ i: C.B node, cx i = cy i by have : cx = cy := by funext i apply h₈ rw [this] intro i have h₆ : ∀ i, cx i = (k₁ i).approx n := by have h : ∀ i j, HEq i j → (x.destruct.snd i) = k₁ j := by rw [eq₁] intro i j heq cases heq rfl intro i rw [h₆ i (cast (by simp [congrArg (λ x => x.1) eq₁]) i)] . rw [h] apply cast_heq . apply HEq.symm apply cast_heq have h₇ : ∀ i, cy i = (k₂ i).approx n := by have h : ∀ i j, HEq i j → (y.destruct.snd i) = k₂ j := by rw [eq₂] intro i j heq cases heq rfl intro i rw [h₇ i (cast (by simp [congrArg (λ x => x.1) eq₂]) i)] . rw [h] apply cast_heq . apply HEq.symm apply cast_heq rw [h₆, h₇] apply h apply kR
case MStep 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)) = node x h₃ : Approx.node (approx y (Nat.succ n)) = node y nodex : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx ⊢ Approx.MStep nodex cx = approx y (Nat.succ n)
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
have ⟨node, k₁, k₂, eq₁, eq₂, kR⟩ := h₀ _ _ h₁
case MStep.MStep 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)) = node x h₃ : Approx.node (approx y (Nat.succ n)) = node y nodex : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
have h₂ : (Approx.MStep nodex cx).node = node := by have := congrArg (λ x => x.1) eq₁ simp only [destruct] at this rw [h₄] at h₂ rw [←this] exact h₂
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂ : Approx.node (Approx.MStep nodex cx) = node ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
have h₃ : (Approx.MStep nodey cy).node = node := by have := congrArg (λ x => x.1) eq₂ simp only [destruct] at this rw [h₅] at h₃ rw [←this] exact h₃
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂ : Approx.node (Approx.MStep nodex cx) = node ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂ : Approx.node (Approx.MStep nodex cx) = node h₃ : Approx.node (Approx.MStep nodey cy) = node ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
simp [Approx.node] at h₂ h₃
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂ : Approx.node (Approx.MStep nodex cx) = node h₃ : Approx.node (Approx.MStep nodey cy) = node ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂ : nodex = node h₃ : nodey = node ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
have h₂ := Eq.symm h₂
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂ : nodex = node h₃ : nodey = node ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂✝ : nodex = node h₃ : nodey = node h₂ : node = nodex ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
have h₃ := Eq.symm h₃
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂✝ : nodex = node h₃ : nodey = node h₂ : node = nodex ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂✝ : nodex = node h₃✝ : nodey = node h₂ : node = nodex h₃ : node = nodey ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
have h₆ := bisim.lemma0 x n
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂✝ : nodex = node h₃✝ : nodey = node h₂ : node = nodex h₃ : node = nodey ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂✝ : nodex = node h₃✝ : nodey = node h₂ : node = nodex h₃ : node = nodey h₆ : ∀ (i : B C (Approx.node (approx x (Nat.succ n)))) (j : B C (destruct x).fst), HEq i j → Approx.children (approx x (Nat.succ n)) i = approx (PSigma.snd (destruct x) j) n ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
have h₇ := bisim.lemma0 y n
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂✝ : nodex = node h₃✝ : nodey = node h₂ : node = nodex h₃ : node = nodey h₆ : ∀ (i : B C (Approx.node (approx x (Nat.succ n)))) (j : B C (destruct x).fst), HEq i j → Approx.children (approx x (Nat.succ n)) i = approx (PSigma.snd (destruct x) j) n ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂✝ : nodex = node h₃✝ : nodey = node h₂ : node = nodex h₃ : node = nodey h₆ : ∀ (i : B C (Approx.node (approx x (Nat.succ n)))) (j : B C (destruct x).fst), HEq i j → Approx.children (approx x (Nat.succ n)) i = approx (PSigma.snd (destruct x) j) n h₇ : ∀ (i : B C (Approx.node (approx y (Nat.succ n)))) (j : B C (destruct y).fst), HEq i j → Approx.children (approx y (Nat.succ n)) i = approx (PSigma.snd (destruct y) j) n ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
rw [h₄] at h₆
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂✝ : nodex = node h₃✝ : nodey = node h₂ : node = nodex h₃ : node = nodey h₆ : ∀ (i : B C (Approx.node (approx x (Nat.succ n)))) (j : B C (destruct x).fst), HEq i j → Approx.children (approx x (Nat.succ n)) i = approx (PSigma.snd (destruct x) j) n h₇ : ∀ (i : B C (Approx.node (approx y (Nat.succ n)))) (j : B C (destruct y).fst), HEq i j → Approx.children (approx y (Nat.succ n)) i = approx (PSigma.snd (destruct y) j) n ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂✝ : nodex = node h₃✝ : nodey = node h₂ : node = nodex h₃ : node = nodey h₆ : ∀ (i : B C (Approx.node (Approx.MStep nodex cx))) (j : B C (destruct x).fst), HEq i j → Approx.children (Approx.MStep nodex cx) i = approx (PSigma.snd (destruct x) j) n h₇ : ∀ (i : B C (Approx.node (approx y (Nat.succ n)))) (j : B C (destruct y).fst), HEq i j → Approx.children (approx y (Nat.succ n)) i = approx (PSigma.snd (destruct y) j) n ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
rw [h₅] at h₇
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂✝ : nodex = node h₃✝ : nodey = node h₂ : node = nodex h₃ : node = nodey h₆ : ∀ (i : B C (Approx.node (Approx.MStep nodex cx))) (j : B C (destruct x).fst), HEq i j → Approx.children (Approx.MStep nodex cx) i = approx (PSigma.snd (destruct x) j) n h₇ : ∀ (i : B C (Approx.node (approx y (Nat.succ n)))) (j : B C (destruct y).fst), HEq i j → Approx.children (approx y (Nat.succ n)) i = approx (PSigma.snd (destruct y) j) n ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂✝ : nodex = node h₃✝ : nodey = node h₂ : node = nodex h₃ : node = nodey h₆ : ∀ (i : B C (Approx.node (Approx.MStep nodex cx))) (j : B C (destruct x).fst), HEq i j → Approx.children (Approx.MStep nodex cx) i = approx (PSigma.snd (destruct x) j) n h₇ : ∀ (i : B C (Approx.node (Approx.MStep nodey cy))) (j : B C (destruct y).fst), HEq i j → Approx.children (Approx.MStep nodey cy) i = approx (PSigma.snd (destruct y) j) n ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
simp only [Approx.children] at h₇ h₆
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂✝ : nodex = node h₃✝ : nodey = node h₂ : node = nodex h₃ : node = nodey h₆ : ∀ (i : B C (Approx.node (Approx.MStep nodex cx))) (j : B C (destruct x).fst), HEq i j → Approx.children (Approx.MStep nodex cx) i = approx (PSigma.snd (destruct x) j) n h₇ : ∀ (i : B C (Approx.node (Approx.MStep nodey cy))) (j : B C (destruct y).fst), HEq i j → Approx.children (Approx.MStep nodey cy) i = approx (PSigma.snd (destruct y) j) n ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂✝ : nodex = node h₃✝ : nodey = node h₂ : node = nodex h₃ : node = nodey h₆ : ∀ (i : B C (Approx.node (Approx.MStep nodex cx))) (j : B C (destruct x).fst), HEq i j → cx i = approx (PSigma.snd (destruct x) j) n h₇ : ∀ (i : B C (Approx.node (Approx.MStep nodey cy))) (j : B C (destruct y).fst), HEq i j → cy i = approx (PSigma.snd (destruct y) j) n ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
induction h₂
case MStep.MStep 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂✝ : nodex = node h₃✝ : nodey = node h₂ : node = nodex h₃ : node = nodey h₆ : ∀ (i : B C (Approx.node (Approx.MStep nodex cx))) (j : B C (destruct x).fst), HEq i j → cx i = approx (PSigma.snd (destruct x) j) n h₇ : ∀ (i : B C (Approx.node (Approx.MStep nodey cy))) (j : B C (destruct y).fst), HEq i j → cy i = approx (PSigma.snd (destruct y) j) n ⊢ Approx.MStep nodex cx = Approx.MStep nodey cy
case MStep.MStep.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 : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₃✝ : nodey = node h₃ : node = nodey h₇ : ∀ (i : B C (Approx.node (Approx.MStep nodey cy))) (j : B C (destruct y).fst), HEq i j → cy i = approx (PSigma.snd (destruct y) j) n 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 ⊢ Approx.MStep node cx = Approx.MStep nodey cy
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
induction h₃
case MStep.MStep.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 : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₃✝ : nodey = node h₃ : node = nodey h₇ : ∀ (i : B C (Approx.node (Approx.MStep nodey cy))) (j : B C (destruct y).fst), HEq i j → cy i = approx (PSigma.snd (destruct y) j) n 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 ⊢ Approx.MStep node cx = Approx.MStep nodey cy
case MStep.MStep.refl.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 ⊢ Approx.MStep node cx = Approx.MStep node cy
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
suffices h₈ : ∀ i: C.B node, cx i = cy i by have : cx = cy := by funext i apply h₈ rw [this]
case MStep.MStep.refl.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 ⊢ Approx.MStep node cx = Approx.MStep node cy
case MStep.MStep.refl.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), cx i = cy i
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
intro i
case MStep.MStep.refl.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), cx i = cy i
case MStep.MStep.refl.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 ⊢ cx i = cy i
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
have h₆ : ∀ i, cx i = (k₁ i).approx n := by have h : ∀ i j, HEq i j → (x.destruct.snd i) = k₁ j := by rw [eq₁] intro i j heq cases heq rfl intro i rw [h₆ i (cast (by simp [congrArg (λ x => x.1) eq₁]) i)] . rw [h] apply cast_heq . apply HEq.symm apply cast_heq
case MStep.MStep.refl.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 ⊢ cx i = cy i
case MStep.MStep.refl.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 h₆ : ∀ (i : B C node), cx i = approx (k₁ i) n ⊢ cx i = cy i
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
have h₇ : ∀ i, cy i = (k₂ i).approx n := by have h : ∀ i j, HEq i j → (y.destruct.snd i) = k₂ j := by rw [eq₂] intro i j heq cases heq rfl intro i rw [h₇ i (cast (by simp [congrArg (λ x => x.1) eq₂]) i)] . rw [h] apply cast_heq . apply HEq.symm apply cast_heq
case MStep.MStep.refl.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 h₆ : ∀ (i : B C node), cx i = approx (k₁ i) n ⊢ cx i = cy i
case MStep.MStep.refl.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 h₆ : ∀ (i : B C node), cx i = approx (k₁ i) n h₇ : ∀ (i : B C node), cy i = approx (k₂ i) n ⊢ cx i = cy i
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
rw [h₆, h₇]
case MStep.MStep.refl.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 h₆ : ∀ (i : B C node), cx i = approx (k₁ i) n h₇ : ∀ (i : B C node), cy i = approx (k₂ i) n ⊢ cx i = cy i
case MStep.MStep.refl.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 h₆ : ∀ (i : B C node), cx i = approx (k₁ i) n h₇ : ∀ (i : B C node), cy i = approx (k₂ i) n ⊢ approx (k₁ i) n = approx (k₂ i) n
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
apply h
case MStep.MStep.refl.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 h₆ : ∀ (i : B C node), cx i = approx (k₁ i) n h₇ : ∀ (i : B C node), cy i = approx (k₂ i) n ⊢ approx (k₁ i) n = approx (k₂ i) n
case MStep.MStep.refl.refl.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 node), cx i = approx (k₁ i) n h₇ : ∀ (i : B C node), cy i = approx (k₂ i) n ⊢ R (k₁ i) (k₂ i)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
apply kR
case MStep.MStep.refl.refl.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 node), cx i = approx (k₁ i) n h₇ : ∀ (i : B C node), cy i = approx (k₂ i) n ⊢ R (k₁ i) (k₂ i)
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
have := congrArg (λ x => x.1) eq₁
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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) ⊢ Approx.node (Approx.MStep nodex cx) = node
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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) this : (fun x => x.fst) (destruct x) = (fun x => x.fst) { fst := node, snd := k₁ } ⊢ Approx.node (Approx.MStep nodex cx) = node
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
simp only [destruct] at this
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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) this : (fun x => x.fst) (destruct x) = (fun x => x.fst) { fst := node, snd := k₁ } ⊢ Approx.node (Approx.MStep nodex cx) = node
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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) this : Container.M.node x = node ⊢ Approx.node (Approx.MStep nodex cx) = node
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
rw [h₄] at 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) this : Container.M.node x = node ⊢ Approx.node (Approx.MStep nodex cx) = node
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 y (Nat.succ n)) = Container.M.node y nodex : C.A cx : B C nodex → Approx C n h₂ : Approx.node (Approx.MStep nodex cx) = Container.M.node x h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) this : Container.M.node x = node ⊢ Approx.node (Approx.MStep nodex cx) = node
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
rw [←this]
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 y (Nat.succ n)) = Container.M.node y nodex : C.A cx : B C nodex → Approx C n h₂ : Approx.node (Approx.MStep nodex cx) = Container.M.node x h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) this : Container.M.node x = node ⊢ Approx.node (Approx.MStep nodex cx) = node
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 y (Nat.succ n)) = Container.M.node y nodex : C.A cx : B C nodex → Approx C n h₂ : Approx.node (Approx.MStep nodex cx) = Container.M.node x h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) this : Container.M.node x = node ⊢ Approx.node (Approx.MStep nodex cx) = Container.M.node x
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
exact 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 y (Nat.succ n)) = Container.M.node y nodex : C.A cx : B C nodex → Approx C n h₂ : Approx.node (Approx.MStep nodex cx) = Container.M.node x h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) this : Container.M.node x = node ⊢ Approx.node (Approx.MStep nodex cx) = Container.M.node x
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
have := congrArg (λ x => x.1) eq₂
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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂ : Approx.node (Approx.MStep nodex cx) = node ⊢ Approx.node (Approx.MStep nodey cy) = node
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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂ : Approx.node (Approx.MStep nodex cx) = node this : (fun x => x.fst) (destruct y) = (fun x => x.fst) { fst := node, snd := k₂ } ⊢ Approx.node (Approx.MStep nodey cy) = node
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
simp only [destruct] at this
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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂ : Approx.node (Approx.MStep nodex cx) = node this : (fun x => x.fst) (destruct y) = (fun x => x.fst) { fst := node, snd := k₂ } ⊢ Approx.node (Approx.MStep nodey cy) = node
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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂ : Approx.node (Approx.MStep nodex cx) = node this : Container.M.node y = node ⊢ Approx.node (Approx.MStep nodey cy) = node
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
rw [h₅] at 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 : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂ : Approx.node (Approx.MStep nodex cx) = node this : Container.M.node y = node ⊢ Approx.node (Approx.MStep nodey cy) = node
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 nodex : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₃ : Approx.node (Approx.MStep nodey cy) = Container.M.node y h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂ : Approx.node (Approx.MStep nodex cx) = node this : Container.M.node y = node ⊢ Approx.node (Approx.MStep nodey cy) = node
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
rw [←this]
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 nodex : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₃ : Approx.node (Approx.MStep nodey cy) = Container.M.node y h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂ : Approx.node (Approx.MStep nodex cx) = node this : Container.M.node y = node ⊢ Approx.node (Approx.MStep nodey cy) = node
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 nodex : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₃ : Approx.node (Approx.MStep nodey cy) = Container.M.node y h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂ : Approx.node (Approx.MStep nodex cx) = node this : Container.M.node y = node ⊢ Approx.node (Approx.MStep nodey cy) = Container.M.node y
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
exact 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 nodex : C.A cx : B C nodex → Approx C n h₄ : approx x (Nat.succ n) = Approx.MStep nodex cx nodey : C.A cy : B C nodey → Approx C n h₃ : Approx.node (Approx.MStep nodey cy) = Container.M.node y h₅ : approx y (Nat.succ n) = Approx.MStep nodey cy 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) h₂ : Approx.node (Approx.MStep nodex cx) = node this : Container.M.node y = node ⊢ Approx.node (Approx.MStep nodey cy) = Container.M.node y
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
have : cx = cy := by funext i apply 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 h₈ : ∀ (i : B C node), cx i = cy i ⊢ Approx.MStep node cx = Approx.MStep node cy
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 h₈ : ∀ (i : B C node), cx i = cy i this : cx = cy ⊢ Approx.MStep node cx = Approx.MStep node cy
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
rw [this]
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 h₈ : ∀ (i : B C node), cx i = cy i this : cx = cy ⊢ Approx.MStep node cx = Approx.MStep node cy
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
funext i
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 h₈ : ∀ (i : B C node), cx i = cy i ⊢ cx = cy
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 h₈ : ∀ (i : B C node), cx i = cy i i : B C node ⊢ cx i = cy i
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
apply h₈
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 h₈ : ∀ (i : B C node), cx i = cy i i : B C node ⊢ cx i = cy i
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
have h : ∀ i j, HEq i j → (x.destruct.snd i) = k₁ j := by rw [eq₁] intro i j heq cases heq rfl
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 node), cx i = 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), cx i = approx (k₁ i) n
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
intro i
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), cx i = 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 ⊢ cx i = approx (k₁ i) n
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
rw [h₆ i (cast (by simp [congrArg (λ x => x.1) eq₁]) i)]
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 ⊢ cx i = 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 ⊢ 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)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
. rw [h] apply cast_heq
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)
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)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
. apply HEq.symm apply cast_heq
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)
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
rw [eq₁]
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 (destruct x).fst) (j : B C node), HEq i j → PSigma.snd (destruct x) i = k₁ j
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 i j → PSigma.snd { fst := node, snd := k₁ } i = k₁ j
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
intro i j heq
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 i j → PSigma.snd { fst := node, snd := k₁ } i = k₁ j
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
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
cases heq
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
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
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
rfl
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
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
simp [congrArg (λ x => x.1) eq₁]
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
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
rw [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 ⊢ approx (PSigma.snd (destruct x) (cast (_ : B C node = B C (destruct x).fst) i)) n = approx (k₁ i) n
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
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
apply cast_heq
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
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
apply HEq.symm
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)
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
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
apply cast_heq
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
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
have h : ∀ i j, HEq i j → (y.destruct.snd i) = k₂ j := by rw [eq₂] intro i j heq cases heq rfl
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
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
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
intro i
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
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
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
rw [h₇ i (cast (by simp [congrArg (λ x => x.1) eq₂]) i)]
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
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 ⊢ approx (PSigma.snd (destruct y) (cast (_ : B C node = B C (destruct y).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 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)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
. rw [h] apply cast_heq
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 ⊢ approx (PSigma.snd (destruct y) (cast (_ : B C node = B C (destruct y).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 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)
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)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
. apply HEq.symm apply cast_heq
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)
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
rw [eq₂]
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
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
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
intro i j heq
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
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 : HEq i j ⊢ PSigma.snd { fst := node, snd := k₂ } i = k₂ j
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
cases heq
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 : HEq i j ⊢ PSigma.snd { fst := node, snd := k₂ } i = k₂ j
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 h₆ : ∀ (i : B C node), cx i = approx (k₁ i) n i : B C { fst := node, snd := k₂ }.fst ⊢ PSigma.snd { fst := node, snd := k₂ } i = k₂ i
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
rfl
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 h₆ : ∀ (i : B C node), cx i = approx (k₁ i) n i : B C { fst := node, snd := k₂ }.fst ⊢ PSigma.snd { fst := node, snd := k₂ } i = k₂ i
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
simp [congrArg (λ x => x.1) eq₂]
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 ⊢ B C node = B C (destruct y).fst
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
rw [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 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 ⊢ approx (PSigma.snd (destruct y) (cast (_ : B C node = B C (destruct y).fst) i)) n = approx (k₂ i) n
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 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 (cast (_ : B C node = B C (destruct y).fst) i) i
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
apply cast_heq
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 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 (cast (_ : B C node = B C (destruct y).fst) i) i
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
apply HEq.symm
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)
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 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 (cast (_ : B C node = B C (destruct y).fst) i) i
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim.lemma1
[136, 1]
[219, 17]
apply cast_heq
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 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 (cast (_ : B C node = B C (destruct y).fst) i) i
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim
[221, 1]
[232, 35]
intro x y 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) ⊢ ∀ (x y : M C), R x y → x = y
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) x y : M C h₁ : R x y ⊢ x = y
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim
[221, 1]
[232, 35]
suffices h₂: x.approx = y.approx by cases x cases y simp only at h₂ simp [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) x y : M C h₁ : R x y ⊢ x = y
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) x y : M C h₁ : R x y ⊢ x.approx = y.approx
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim
[221, 1]
[232, 35]
funext 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) x y : M C h₁ : R x y ⊢ x.approx = y.approx
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) x y : M C h₁ : R x y n : Nat ⊢ approx x n = approx y n
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim
[221, 1]
[232, 35]
apply bisim.lemma1 R h₀ x y n h₁
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) x y : M C h₁ : R x y n : Nat ⊢ approx x n = approx y n
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim
[221, 1]
[232, 35]
cases x
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) x y : M C h₁ : R x y h₂ : x.approx = y.approx ⊢ x = y
case mk 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) y : M C approx✝ : (n : Nat) → Approx C n agrees✝ : ∀ (n : Nat), Agree (approx✝ n) (approx✝ (Nat.succ n)) h₁ : R { approx := approx✝, agrees := agrees✝ } y h₂ : { approx := approx✝, agrees := agrees✝ }.approx = y.approx ⊢ { approx := approx✝, agrees := agrees✝ } = y
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim
[221, 1]
[232, 35]
cases y
case mk 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) y : M C approx✝ : (n : Nat) → Approx C n agrees✝ : ∀ (n : Nat), Agree (approx✝ n) (approx✝ (Nat.succ n)) h₁ : R { approx := approx✝, agrees := agrees✝ } y h₂ : { approx := approx✝, agrees := agrees✝ }.approx = y.approx ⊢ { approx := approx✝, agrees := agrees✝ } = y
case mk.mk 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) approx✝¹ : (n : Nat) → Approx C n agrees✝¹ : ∀ (n : Nat), Agree (approx✝¹ n) (approx✝¹ (Nat.succ n)) approx✝ : (n : Nat) → Approx C n agrees✝ : ∀ (n : Nat), Agree (approx✝ n) (approx✝ (Nat.succ n)) h₁ : R { approx := approx✝¹, agrees := agrees✝¹ } { approx := approx✝, agrees := agrees✝ } h₂ : { approx := approx✝¹, agrees := agrees✝¹ }.approx = { approx := approx✝, agrees := agrees✝ }.approx ⊢ { approx := approx✝¹, agrees := agrees✝¹ } = { approx := approx✝, agrees := agrees✝ }
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim
[221, 1]
[232, 35]
simp only at h₂
case mk.mk 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) approx✝¹ : (n : Nat) → Approx C n agrees✝¹ : ∀ (n : Nat), Agree (approx✝¹ n) (approx✝¹ (Nat.succ n)) approx✝ : (n : Nat) → Approx C n agrees✝ : ∀ (n : Nat), Agree (approx✝ n) (approx✝ (Nat.succ n)) h₁ : R { approx := approx✝¹, agrees := agrees✝¹ } { approx := approx✝, agrees := agrees✝ } h₂ : { approx := approx✝¹, agrees := agrees✝¹ }.approx = { approx := approx✝, agrees := agrees✝ }.approx ⊢ { approx := approx✝¹, agrees := agrees✝¹ } = { approx := approx✝, agrees := agrees✝ }
case mk.mk 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) approx✝¹ : (n : Nat) → Approx C n agrees✝¹ : ∀ (n : Nat), Agree (approx✝¹ n) (approx✝¹ (Nat.succ n)) approx✝ : (n : Nat) → Approx C n agrees✝ : ∀ (n : Nat), Agree (approx✝ n) (approx✝ (Nat.succ n)) h₁ : R { approx := approx✝¹, agrees := agrees✝¹ } { approx := approx✝, agrees := agrees✝ } h₂ : approx✝¹ = approx✝ ⊢ { approx := approx✝¹, agrees := agrees✝¹ } = { approx := approx✝, agrees := agrees✝ }
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/M.lean
Container.M.bisim
[221, 1]
[232, 35]
simp [h₂]
case mk.mk 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) approx✝¹ : (n : Nat) → Approx C n agrees✝¹ : ∀ (n : Nat), Agree (approx✝¹ n) (approx✝¹ (Nat.succ n)) approx✝ : (n : Nat) → Approx C n agrees✝ : ∀ (n : Nat), Agree (approx✝ n) (approx✝ (Nat.succ n)) h₁ : R { approx := approx✝¹, agrees := agrees✝¹ } { approx := approx✝, agrees := agrees✝ } h₂ : approx✝¹ = approx✝ ⊢ { approx := approx✝¹, agrees := agrees✝¹ } = { approx := approx✝, agrees := agrees✝ }
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/QPF/FreeMonads.lean
Free.by_cases
[106, 15]
[113, 17]
intro x
F : Type u → Type u inst : QPF F R : Type u motive : Free F R → Sort u_1 pure : (r : R) → motive (Pure.pure r) free : (f : F (Free F R)) → motive (Free.free f) ⊢ (x : Free F R) → motive x
F : Type u → Type u inst : QPF F R : Type u motive : Free F R → Sort u_1 pure : (r : R) → motive (Pure.pure r) free : (f : F (Free F R)) → motive (Free.free f) x : Free F R ⊢ motive x
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/QPF/FreeMonads.lean
Free.by_cases
[106, 15]
[113, 17]
rw [←construct_destruct x]
F : Type u → Type u inst : QPF F R : Type u motive : Free F R → Sort u_1 pure : (r : R) → motive (Pure.pure r) free : (f : F (Free F R)) → motive (Free.free f) x : Free F R ⊢ motive x
F : Type u → Type u inst : QPF F R : Type u motive : Free F R → Sort u_1 pure : (r : R) → motive (Pure.pure r) free : (f : F (Free F R)) → motive (Free.free f) x : Free F R ⊢ motive (construct (destruct x))
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/QPF/FreeMonads.lean
Free.by_cases
[106, 15]
[113, 17]
cases destruct x with | Pure r => exact pure r | Free f => exact free f
F : Type u → Type u inst : QPF F R : Type u motive : Free F R → Sort u_1 pure : (r : R) → motive (Pure.pure r) free : (f : F (Free F R)) → motive (Free.free f) x : Free F R ⊢ motive (construct (destruct x))
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/QPF/FreeMonads.lean
Free.by_cases
[106, 15]
[113, 17]
exact pure r
case Pure F : Type u → Type u inst : QPF F R : Type u motive : Free F R → Sort u_1 pure : (r : R) → motive (Pure.pure r) free : (f : F (Free F R)) → motive (Free.free f) x : Free F R r : R ⊢ motive (construct (FreeF.Pure r))
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/QPF/FreeMonads.lean
Free.by_cases
[106, 15]
[113, 17]
exact free f
case Free F : Type u → Type u inst : QPF F R : Type u motive : Free F R → Sort u_1 pure : (r : R) → motive (Pure.pure r) free : (f : F (Free F R)) → motive (Free.free f) x : Free F R f : F (Free F R) ⊢ motive (construct (FreeF.Free f))
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/QPF/FreeMonads.lean
Free.destruct_pure
[115, 9]
[116, 34]
simp [pure, destruct_construct]
F : Type u → Type u inst : QPF F R : Type u r : R ⊢ destruct (pure r) = FreeF.Pure r
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/QPF/FreeMonads.lean
Free.destruct_free
[118, 9]
[119, 34]
simp [free, destruct_construct]
F : Type u → Type u inst : QPF F R : Type u f : F (Free F R) ⊢ destruct (free f) = FreeF.Free f
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/QPF/FreeMonads.lean
Free.bind_inr.internal
[186, 1]
[205, 10]
apply QPF.M.bisim (λ x y => corec (bind.automaton k) (.inr x) = y)
F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S ⊢ ∀ (x y : Free F S), corec (bind.automaton k) (Sum.inr x) = y → x = y
F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S ⊢ ∀ (x y : QPF.M (FreeF F S)), corec (bind.automaton k) (Sum.inr x) = y → QPF.M.liftr (FreeF F S) (fun x y => corec (bind.automaton k) (Sum.inr x) = y) (QPF.M.destruct x) (QPF.M.destruct y)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/QPF/FreeMonads.lean
Free.bind_inr.internal
[186, 1]
[205, 10]
. intro x y h₁ induction h₁ rw [corec, QPF.M.destruct_corec] conv => congr . skip . skip . rhs simp only [bind.automaton] exists (λ x => ⟨⟨x, corec (bind.automaton k) (.inr x)⟩, by rfl⟩) <$> destruct x rw [destruct] constructor . simp only [←QPF.map_comp, Function.comp] apply Eq.trans _ (QPF.map_id _) rfl . simp only [←QPF.map_comp, Function.comp] rfl
F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S ⊢ ∀ (x y : QPF.M (FreeF F S)), corec (bind.automaton k) (Sum.inr x) = y → QPF.M.liftr (FreeF F S) (fun x y => corec (bind.automaton k) (Sum.inr x) = y) (QPF.M.destruct x) (QPF.M.destruct y)
no goals
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/QPF/FreeMonads.lean
Free.bind_inr.internal
[186, 1]
[205, 10]
intro x y h₁
F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S ⊢ ∀ (x y : QPF.M (FreeF F S)), corec (bind.automaton k) (Sum.inr x) = y → QPF.M.liftr (FreeF F S) (fun x y => corec (bind.automaton k) (Sum.inr x) = y) (QPF.M.destruct x) (QPF.M.destruct y)
F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S x y : QPF.M (FreeF F S) h₁ : corec (bind.automaton k) (Sum.inr x) = y ⊢ QPF.M.liftr (FreeF F S) (fun x y => corec (bind.automaton k) (Sum.inr x) = y) (QPF.M.destruct x) (QPF.M.destruct y)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/QPF/FreeMonads.lean
Free.bind_inr.internal
[186, 1]
[205, 10]
induction h₁
F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S x y : QPF.M (FreeF F S) h₁ : corec (bind.automaton k) (Sum.inr x) = y ⊢ QPF.M.liftr (FreeF F S) (fun x y => corec (bind.automaton k) (Sum.inr x) = y) (QPF.M.destruct x) (QPF.M.destruct y)
case refl F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S x y : QPF.M (FreeF F S) ⊢ QPF.M.liftr (FreeF F S) (fun x y => corec (bind.automaton k) (Sum.inr x) = y) (QPF.M.destruct x) (QPF.M.destruct (corec (bind.automaton k) (Sum.inr x)))
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/QPF/FreeMonads.lean
Free.bind_inr.internal
[186, 1]
[205, 10]
rw [corec, QPF.M.destruct_corec]
case refl F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S x y : QPF.M (FreeF F S) ⊢ QPF.M.liftr (FreeF F S) (fun x y => corec (bind.automaton k) (Sum.inr x) = y) (QPF.M.destruct x) (QPF.M.destruct (corec (bind.automaton k) (Sum.inr x)))
case refl F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S x y : QPF.M (FreeF F S) ⊢ QPF.M.liftr (FreeF F S) (fun x y => QPF.M.corec (bind.automaton k) (Sum.inr x) = y) (QPF.M.destruct x) ((fun x => QPF.M.corec (bind.automaton k) x) <$> bind.automaton k (Sum.inr x))
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/QPF/FreeMonads.lean
Free.bind_inr.internal
[186, 1]
[205, 10]
conv => congr . skip . skip . rhs simp only [bind.automaton]
case refl F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S x y : QPF.M (FreeF F S) ⊢ QPF.M.liftr (FreeF F S) (fun x y => QPF.M.corec (bind.automaton k) (Sum.inr x) = y) (QPF.M.destruct x) ((fun x => QPF.M.corec (bind.automaton k) x) <$> bind.automaton k (Sum.inr x))
case refl F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S x y : QPF.M (FreeF F S) ⊢ QPF.M.liftr (FreeF F S) (fun x y => QPF.M.corec (bind.automaton k) (Sum.inr x) = y) (QPF.M.destruct x) ((fun x => QPF.M.corec (bind.automaton k) x) <$> Sum.inr <$> destruct x)
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/QPF/FreeMonads.lean
Free.bind_inr.internal
[186, 1]
[205, 10]
exists (λ x => ⟨⟨x, corec (bind.automaton k) (.inr x)⟩, by rfl⟩) <$> destruct x
case refl F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S x y : QPF.M (FreeF F S) ⊢ QPF.M.liftr (FreeF F S) (fun x y => QPF.M.corec (bind.automaton k) (Sum.inr x) = y) (QPF.M.destruct x) ((fun x => QPF.M.corec (bind.automaton k) x) <$> Sum.inr <$> destruct x)
case refl F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S x y : QPF.M (FreeF F S) ⊢ (fun x => (↑x).fst) <$> (fun x => { val := (x, corec (bind.automaton k) (Sum.inr x)), property := (_ : QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst) = QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst)) }) <$> destruct x = QPF.M.destruct x ∧ (fun x => (↑x).snd) <$> (fun x => { val := (x, corec (bind.automaton k) (Sum.inr x)), property := (_ : QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst) = QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst)) }) <$> destruct x = (fun x => QPF.M.corec (bind.automaton k) x) <$> Sum.inr <$> destruct x
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/QPF/FreeMonads.lean
Free.bind_inr.internal
[186, 1]
[205, 10]
rw [destruct]
case refl F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S x y : QPF.M (FreeF F S) ⊢ (fun x => (↑x).fst) <$> (fun x => { val := (x, corec (bind.automaton k) (Sum.inr x)), property := (_ : QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst) = QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst)) }) <$> destruct x = QPF.M.destruct x ∧ (fun x => (↑x).snd) <$> (fun x => { val := (x, corec (bind.automaton k) (Sum.inr x)), property := (_ : QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst) = QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst)) }) <$> destruct x = (fun x => QPF.M.corec (bind.automaton k) x) <$> Sum.inr <$> destruct x
case refl F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S x y : QPF.M (FreeF F S) ⊢ (fun x => (↑x).fst) <$> (fun x => { val := (x, corec (bind.automaton k) (Sum.inr x)), property := (_ : QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst) = QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst)) }) <$> QPF.M.destruct x = QPF.M.destruct x ∧ (fun x => (↑x).snd) <$> (fun x => { val := (x, corec (bind.automaton k) (Sum.inr x)), property := (_ : QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst) = QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst)) }) <$> QPF.M.destruct x = (fun x => QPF.M.corec (bind.automaton k) x) <$> Sum.inr <$> QPF.M.destruct x
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/QPF/FreeMonads.lean
Free.bind_inr.internal
[186, 1]
[205, 10]
constructor
case refl F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S x y : QPF.M (FreeF F S) ⊢ (fun x => (↑x).fst) <$> (fun x => { val := (x, corec (bind.automaton k) (Sum.inr x)), property := (_ : QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst) = QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst)) }) <$> QPF.M.destruct x = QPF.M.destruct x ∧ (fun x => (↑x).snd) <$> (fun x => { val := (x, corec (bind.automaton k) (Sum.inr x)), property := (_ : QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst) = QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst)) }) <$> QPF.M.destruct x = (fun x => QPF.M.corec (bind.automaton k) x) <$> Sum.inr <$> QPF.M.destruct x
case refl.left F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S x y : QPF.M (FreeF F S) ⊢ (fun x => (↑x).fst) <$> (fun x => { val := (x, corec (bind.automaton k) (Sum.inr x)), property := (_ : QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst) = QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst)) }) <$> QPF.M.destruct x = QPF.M.destruct x case refl.right F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S x y : QPF.M (FreeF F S) ⊢ (fun x => (↑x).snd) <$> (fun x => { val := (x, corec (bind.automaton k) (Sum.inr x)), property := (_ : QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst) = QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst)) }) <$> QPF.M.destruct x = (fun x => QPF.M.corec (bind.automaton k) x) <$> Sum.inr <$> QPF.M.destruct x
https://github.com/RemyCiterin/LeanCoInd.git
69d305ae769624f460f9c1ee6a0351917f4b74cf
CoInd/QPF/FreeMonads.lean
Free.bind_inr.internal
[186, 1]
[205, 10]
. simp only [←QPF.map_comp, Function.comp] apply Eq.trans _ (QPF.map_id _) rfl
case refl.left F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S x y : QPF.M (FreeF F S) ⊢ (fun x => (↑x).fst) <$> (fun x => { val := (x, corec (bind.automaton k) (Sum.inr x)), property := (_ : QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst) = QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst)) }) <$> QPF.M.destruct x = QPF.M.destruct x case refl.right F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S x y : QPF.M (FreeF F S) ⊢ (fun x => (↑x).snd) <$> (fun x => { val := (x, corec (bind.automaton k) (Sum.inr x)), property := (_ : QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst) = QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst)) }) <$> QPF.M.destruct x = (fun x => QPF.M.corec (bind.automaton k) x) <$> Sum.inr <$> QPF.M.destruct x
case refl.right F : Type u → Type u inst : QPF F R S : Type u k : R → Free F S x y : QPF.M (FreeF F S) ⊢ (fun x => (↑x).snd) <$> (fun x => { val := (x, corec (bind.automaton k) (Sum.inr x)), property := (_ : QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst) = QPF.M.corec (bind.automaton k) (Sum.inr (x, corec (bind.automaton k) (Sum.inr x)).fst)) }) <$> QPF.M.destruct x = (fun x => QPF.M.corec (bind.automaton k) x) <$> Sum.inr <$> QPF.M.destruct x