Theorem: PFunctor.M.eq_of_bisim
File: Mathlib/Data/PFunctor/Univariate/M.lean

tactic: inhabit M F
state_before: F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
R : F.M → F.M → Prop
inst✝ : Nonempty F.M
bisim : IsBisimulation R
⊢ ∀ (s₁ s₂ : F.M), R s₁ s₂ → s₁ = s₂
state_after: F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
R : F.M → F.M → Prop
inst✝ : Nonempty F.M
bisim : IsBisimulation R
inhabited_h : Inhabited F.M
⊢ ∀ (s₁ s₂ : F.M), R s₁ s₂ → s₁ = s₂

tactic: introv Hr
state_before: F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
R : F.M → F.M → Prop
inst✝ : Nonempty F.M
bisim : IsBisimulation R
inhabited_h : Inhabited F.M
⊢ ∀ (s₁ s₂ : F.M), R s₁ s₂ → s₁ = s₂
state_after: F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
R : F.M → F.M → Prop
inst✝ : Nonempty F.M
bisim : IsBisimulation R
inhabited_h : Inhabited F.M
s₁ s₂ : F.M
Hr : R s₁ s₂
⊢ s₁ = s₂

tactic: apply ext
state_before: F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
R : F.M → F.M → Prop
inst✝ : Nonempty F.M
bisim : IsBisimulation R
inhabited_h : Inhabited F.M
s₁ s₂ : F.M
Hr : R s₁ s₂
⊢ s₁ = s₂
state_after: case H
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
R : F.M → F.M → Prop
inst✝ : Nonempty F.M
bisim : IsBisimulation R
inhabited_h : Inhabited F.M
s₁ s₂ : F.M
Hr : R s₁ s₂
⊢ ∀ (ps : Path F), iselect ps s₁ = iselect ps s₂

tactic: introv
state_before: case H
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
R : F.M → F.M → Prop
inst✝ : Nonempty F.M
bisim : IsBisimulation R
inhabited_h : Inhabited F.M
s₁ s₂ : F.M
Hr : R s₁ s₂
⊢ ∀ (ps : Path F), iselect ps s₁ = iselect ps s₂
state_after: case H
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
R : F.M → F.M → Prop
inst✝ : Nonempty F.M
bisim : IsBisimulation R
inhabited_h : Inhabited F.M
s₁ s₂ : F.M
Hr : R s₁ s₂
ps : Path F
⊢ iselect ps s₁ = iselect ps s₂

tactic: by_cases h : IsPath ps s₁ ∨ IsPath ps s₂
state_before: case H
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
R : F.M → F.M → Prop
inst✝ : Nonempty F.M
bisim : IsBisimulation R
inhabited_h : Inhabited F.M
s₁ s₂ : F.M
Hr : R s₁ s₂
ps : Path F
⊢ iselect ps s₁ = iselect ps s₂
state_after: case pos
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
R : F.M → F.M → Prop
inst✝ : Nonempty F.M
bisim : IsBisimulation R
inhabited_h : Inhabited F.M
s₁ s₂ : F.M
Hr : R s₁ s₂
ps : Path F
h : IsPath ps s₁ ∨ IsPath ps s₂
⊢ iselect ps s₁ = iselect ps s₂

case neg
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
R : F.M → F.M → Prop
inst✝ : Nonempty F.M
bisim : IsBisimulation R
inhabited_h : Inhabited F.M
s₁ s₂ : F.M
Hr : R s₁ s₂
ps : Path F
h : ¬(IsPath ps s₁ ∨ IsPath ps s₂)
⊢ iselect ps s₁ = iselect ps s₂

tactic: have H := nth_of_bisim R bisim _ _ ps Hr h
state_before: case pos
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
R : F.M → F.M → Prop
inst✝ : Nonempty F.M
bisim : IsBisimulation R
inhabited_h : Inhabited F.M
s₁ s₂ : F.M
Hr : R s₁ s₂
ps : Path F
h : IsPath ps s₁ ∨ IsPath ps s₂
⊢ iselect ps s₁ = iselect ps s₂
state_after: case pos
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
R : F.M → F.M → Prop
inst✝ : Nonempty F.M
bisim : IsBisimulation R
inhabited_h : Inhabited F.M
s₁ s₂ : F.M
Hr : R s₁ s₂
ps : Path F
h : IsPath ps s₁ ∨ IsPath ps s₂
H :
  iselect ps s₁ = iselect ps s₂ ∧
    ∃ a f f', isubtree ps s₁ = M.mk ⟨a, f⟩ ∧ isubtree ps s₂ = M.mk ⟨a, f'⟩ ∧ ∀ (i : F.B a), R (f i) (f' i)
⊢ iselect ps s₁ = iselect ps s₂

tactic: exact H.left
state_before: case pos
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
R : F.M → F.M → Prop
inst✝ : Nonempty F.M
bisim : IsBisimulation R
inhabited_h : Inhabited F.M
s₁ s₂ : F.M
Hr : R s₁ s₂
ps : Path F
h : IsPath ps s₁ ∨ IsPath ps s₂
H :
  iselect ps s₁ = iselect ps s₂ ∧
    ∃ a f f', isubtree ps s₁ = M.mk ⟨a, f⟩ ∧ isubtree ps s₂ = M.mk ⟨a, f'⟩ ∧ ∀ (i : F.B a), R (f i) (f' i)
⊢ iselect ps s₁ = iselect ps s₂
state_after: no goals

tactic: rw [not_or] at h
state_before: case neg
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
R : F.M → F.M → Prop
inst✝ : Nonempty F.M
bisim : IsBisimulation R
inhabited_h : Inhabited F.M
s₁ s₂ : F.M
Hr : R s₁ s₂
ps : Path F
h : ¬(IsPath ps s₁ ∨ IsPath ps s₂)
⊢ iselect ps s₁ = iselect ps s₂
state_after: case neg
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
R : F.M → F.M → Prop
inst✝ : Nonempty F.M
bisim : IsBisimulation R
inhabited_h : Inhabited F.M
s₁ s₂ : F.M
Hr : R s₁ s₂
ps : Path F
h : ¬IsPath ps s₁ ∧ ¬IsPath ps s₂
⊢ iselect ps s₁ = iselect ps s₂

tactic: cases' h with h₀ h₁
state_before: case neg
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
R : F.M → F.M → Prop
inst✝ : Nonempty F.M
bisim : IsBisimulation R
inhabited_h : Inhabited F.M
s₁ s₂ : F.M
Hr : R s₁ s₂
ps : Path F
h : ¬IsPath ps s₁ ∧ ¬IsPath ps s₂
⊢ iselect ps s₁ = iselect ps s₂
state_after: case neg.intro
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
R : F.M → F.M → Prop
inst✝ : Nonempty F.M
bisim : IsBisimulation R
inhabited_h : Inhabited F.M
s₁ s₂ : F.M
Hr : R s₁ s₂
ps : Path F
h₀ : ¬IsPath ps s₁
h₁ : ¬IsPath ps s₂
⊢ iselect ps s₁ = iselect ps s₂

tactic: simp only [iselect_eq_default, *, not_false_iff]
state_before: case neg.intro
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
R : F.M → F.M → Prop
inst✝ : Nonempty F.M
bisim : IsBisimulation R
inhabited_h : Inhabited F.M
s₁ s₂ : F.M
Hr : R s₁ s₂
ps : Path F
h₀ : ¬IsPath ps s₁
h₁ : ¬IsPath ps s₂
⊢ iselect ps s₁ = iselect ps s₂
state_after: no goals