Theorem: Qpf.Cofix.bisim_aux
File: Mathlib/Data/QPF/Univariate/Basic.lean

tactic: intro x
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
⊢ ∀ (x y : Cofix F), r x y → x = y

tactic: apply Quot.inductionOn (motive := _) x
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x : Cofix F
⊢ ∀ (y : Cofix F), r x y → x = y

tactic: clear x
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x : Cofix F
⊢ ∀ (a : PFunctor.M (P F)) (y : Cofix F), r (Quot.mk Mcongr a) y → Quot.mk Mcongr a = y

tactic: intro x y
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
⊢ ∀ (a : PFunctor.M (P F)) (y : Cofix F), r (Quot.mk Mcongr a) y → Quot.mk Mcongr a = y

tactic: apply Quot.inductionOn (motive := _) y
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x : PFunctor.M (P F)
y : Cofix F
⊢ r (Quot.mk Mcongr x) y → Quot.mk Mcongr x = y

tactic: clear y
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x : PFunctor.M (P F)
y : Cofix F
⊢ ∀ (a : PFunctor.M (P F)), r (Quot.mk Mcongr x) (Quot.mk Mcongr a) → Quot.mk Mcongr x = Quot.mk Mcongr a

tactic: intro y rxy
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x : PFunctor.M (P F)
⊢ ∀ (a : PFunctor.M (P F)), r (Quot.mk Mcongr x) (Quot.mk Mcongr a) → Quot.mk Mcongr x = Quot.mk Mcongr a

tactic: apply Quot.sound
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
⊢ Quot.mk Mcongr x = Quot.mk Mcongr y

tactic: let r' x y := r (Quot.mk _ x) (Quot.mk _ y)
state_before: case a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
⊢ Mcongr x y

tactic: have : IsPrecongr r' := by
  intro a b r'ab
  have h₀ :
    Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) =
      Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b) :=
    h _ _ r'ab
  have h₁ : ∀ u v : q.P.M, Mcongr u v → Quot.mk r' u = Quot.mk r' v := by
    intro u v cuv
    apply Quot.sound
    simp only
    rw [Quot.sound cuv]
    apply h'
  let f : Quot r → Quot r' :=
    Quot.lift (Quot.lift (Quot.mk r') h₁)
      (by
        intro c; apply Quot.inductionOn (motive := _) c; clear c
        intro c d; apply Quot.inductionOn (motive := _) d; clear d
        intro d rcd; apply Quot.sound; apply rcd)
  have : f ∘ Quot.mk r ∘ Quot.mk Mcongr = Quot.mk r' := rfl
  rw [← this, PFunctor.comp_map _ _ f, PFunctor.comp_map _ _ (Quot.mk r), abs_map, abs_map,
    abs_map, h₀]
  rw [PFunctor.comp_map _ _ f, PFunctor.comp_map _ _ (Quot.mk r), abs_map, abs_map, abs_map]
state_before: case a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
⊢ Mcongr x y

tactic: refine' ⟨r', this, rxy⟩
state_before: case a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
this : IsPrecongr r'
⊢ Mcongr x y

tactic: intro a b r'ab
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
⊢ IsPrecongr r'

tactic: have h₀ :
  Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) =
    Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b) :=
  h _ _ r'ab
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
⊢ abs (Quot.mk r' <$> PFunctor.M.dest a) = abs (Quot.mk r' <$> PFunctor.M.dest b)

tactic: have h₁ : ∀ u v : q.P.M, Mcongr u v → Quot.mk r' u = Quot.mk r' v := by
  intro u v cuv
  apply Quot.sound
  simp only
  rw [Quot.sound cuv]
  apply h'
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
⊢ abs (Quot.mk r' <$> PFunctor.M.dest a) = abs (Quot.mk r' <$> PFunctor.M.dest b)

tactic: let f : Quot r → Quot r' :=
  Quot.lift (Quot.lift (Quot.mk r') h₁)
    (by
      intro c; apply Quot.inductionOn (motive := _) c; clear c
      intro c d; apply Quot.inductionOn (motive := _) d; clear d
      intro d rcd; apply Quot.sound; apply rcd)
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
⊢ abs (Quot.mk r' <$> PFunctor.M.dest a) = abs (Quot.mk r' <$> PFunctor.M.dest b)

tactic: have : f ∘ Quot.mk r ∘ Quot.mk Mcongr = Quot.mk r' := rfl
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
f : Quot r → Quot r' :=
  Quot.lift (Quot.lift (Quot.mk r') h₁)
    (_ : ∀ (c b : Cofix F), r c b → Quot.lift (Quot.mk r') h₁ c = Quot.lift (Quot.mk r') h₁ b)
⊢ abs (Quot.mk r' <$> PFunctor.M.dest a) = abs (Quot.mk r' <$> PFunctor.M.dest b)

tactic: rw [← this, PFunctor.comp_map _ _ f, PFunctor.comp_map _ _ (Quot.mk r), abs_map, abs_map,
  abs_map, h₀]
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
f : Quot r → Quot r' :=
  Quot.lift (Quot.lift (Quot.mk r') h₁)
    (_ : ∀ (c b : Cofix F), r c b → Quot.lift (Quot.mk r') h₁ c = Quot.lift (Quot.mk r') h₁ b)
this : f ∘ Quot.mk r ∘ Quot.mk Mcongr = Quot.mk r'
⊢ abs (Quot.mk r' <$> PFunctor.M.dest a) = abs (Quot.mk r' <$> PFunctor.M.dest b)

tactic: rw [PFunctor.comp_map _ _ f, PFunctor.comp_map _ _ (Quot.mk r), abs_map, abs_map, abs_map]
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
f : Quot r → Quot r' :=
  Quot.lift (Quot.lift (Quot.mk r') h₁)
    (_ : ∀ (c b : Cofix F), r c b → Quot.lift (Quot.mk r') h₁ c = Quot.lift (Quot.mk r') h₁ b)
this : f ∘ Quot.mk r ∘ Quot.mk Mcongr = Quot.mk r'
⊢ f <$> Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b) =
    abs ((f ∘ Quot.mk r ∘ Quot.mk Mcongr) <$> PFunctor.M.dest b)

tactic: intro u v cuv
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
⊢ ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v

tactic: apply Quot.sound
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
u v : PFunctor.M (P F)
cuv : Mcongr u v
⊢ Quot.mk r' u = Quot.mk r' v

tactic: simp only
state_before: case a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
u v : PFunctor.M (P F)
cuv : Mcongr u v
⊢ r' u v

tactic: rw [Quot.sound cuv]
state_before: case a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
u v : PFunctor.M (P F)
cuv : Mcongr u v
⊢ r (Quot.mk Mcongr u) (Quot.mk Mcongr v)

tactic: apply h'
state_before: case a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
u v : PFunctor.M (P F)
cuv : Mcongr u v
⊢ r (Quot.mk Mcongr v) (Quot.mk Mcongr v)

tactic: intro c
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
⊢ ∀ (a b : Cofix F), r a b → Quot.lift (Quot.mk r') h₁ a = Quot.lift (Quot.mk r') h₁ b

tactic: apply Quot.inductionOn (motive := _) c
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
c : Cofix F
⊢ ∀ (b : Cofix F), r c b → Quot.lift (Quot.mk r') h₁ c = Quot.lift (Quot.mk r') h₁ b

tactic: clear c
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
c : Cofix F
⊢ ∀ (a : PFunctor.M (P F)) (b : Cofix F),
    r (Quot.mk Mcongr a) b → Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr a) = Quot.lift (Quot.mk r') h₁ b

tactic: intro c d
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
⊢ ∀ (a : PFunctor.M (P F)) (b : Cofix F),
    r (Quot.mk Mcongr a) b → Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr a) = Quot.lift (Quot.mk r') h₁ b

tactic: apply Quot.inductionOn (motive := _) d
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
c : PFunctor.M (P F)
d : Cofix F
⊢ r (Quot.mk Mcongr c) d → Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr c) = Quot.lift (Quot.mk r') h₁ d

tactic: clear d
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
c : PFunctor.M (P F)
d : Cofix F
⊢ ∀ (a : PFunctor.M (P F)),
    r (Quot.mk Mcongr c) (Quot.mk Mcongr a) →
      Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr c) = Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr a)

tactic: intro d rcd
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
c : PFunctor.M (P F)
⊢ ∀ (a : PFunctor.M (P F)),
    r (Quot.mk Mcongr c) (Quot.mk Mcongr a) →
      Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr c) = Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr a)

tactic: apply Quot.sound
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
c d : PFunctor.M (P F)
rcd : r (Quot.mk Mcongr c) (Quot.mk Mcongr d)
⊢ Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr c) = Quot.lift (Quot.mk r') h₁ (Quot.mk Mcongr d)

tactic: apply rcd
state_before: case a
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
r : Cofix F → Cofix F → Prop
h' : ∀ (x : Cofix F), r x x
h : ∀ (x y : Cofix F), r x y → Quot.mk r <$> dest x = Quot.mk r <$> dest y
x y : PFunctor.M (P F)
rxy : r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
r' : PFunctor.M (P F) → PFunctor.M (P F) → Prop := fun x y => r (Quot.mk Mcongr x) (Quot.mk Mcongr y)
a b : PFunctor.M (P F)
r'ab : r' a b
h₀ : Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest a) = Quot.mk r <$> Quot.mk Mcongr <$> abs (PFunctor.M.dest b)
h₁ : ∀ (u v : PFunctor.M (P F)), Mcongr u v → Quot.mk r' u = Quot.mk r' v
c d : PFunctor.M (P F)
rcd : r (Quot.mk Mcongr c) (Quot.mk Mcongr d)
⊢ r' c d