Theorem: MvQPF.Cofix.abs_repr
File: Mathlib/Data/QPF/Multivariate/Constructions/Cofix.lean

Proof steps:
state_before: n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
x : Cofix F α
⊢ Quot.mk Mcongr x.repr = x
state_after: n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
x : Cofix F α
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
⊢ Quot.mk Mcongr x.repr = x
tactic: let R := fun x y : Cofix F α => abs (repr y) = x
state_before: n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
x : Cofix F α
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
⊢ Quot.mk Mcongr x.repr = x
state_after: n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
x : Cofix F α
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
⊢ ∀ (x y : Cofix F α), R x y → LiftR' (α.RelLast' R) x.dest y.dest
tactic: refine Cofix.bisim₂ R ?_ _ _ rfl
state_before: n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
x : Cofix F α
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
⊢ ∀ (x y : Cofix F α), R x y → LiftR' (α.RelLast' R) x.dest y.dest
state_after: n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
⊢ ∀ (x y : Cofix F α), R x y → LiftR' (α.RelLast' R) x.dest y.dest
tactic: clear x
state_before: n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
⊢ ∀ (x y : Cofix F α), R x y → LiftR' (α.RelLast' R) x.dest y.dest
state_after: n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
x y : Cofix F α
h : R x y
⊢ LiftR' (α.RelLast' R) x.dest y.dest
tactic: rintro x y h
state_before: n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
x y : Cofix F α
h : R x y
⊢ LiftR' (α.RelLast' R) x.dest y.dest
state_after: n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
y : Cofix F α
⊢ LiftR' (α.RelLast' R) (abs y.repr).dest y.dest
tactic: subst h
state_before: n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
y : Cofix F α
⊢ LiftR' (α.RelLast' R) (abs y.repr).dest y.dest
state_after: n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
y : Cofix F α
⊢ LiftR' (α.RelLast' R) ((TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) y.repr))
    (Quot.lift (fun x => (TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) x)) ⋯ y)
tactic: dsimp [Cofix.dest, Cofix.abs]
state_before: n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
y : Cofix F α
⊢ LiftR' (α.RelLast' R) ((TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) y.repr))
    (Quot.lift (fun x => (TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) x)) ⋯ y)
state_after: case mk
n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
a✝ : (P F).M α
⊢ LiftR' (α.RelLast' R) ((TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) (repr (Quot.mk Mcongr a✝))))
    (Quot.lift (fun x => (TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) x)) ⋯ (Quot.mk Mcongr a✝))
tactic: induction y using Quot.ind
state_before: case mk
n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
a✝ : (P F).M α
⊢ LiftR' (α.RelLast' R) ((TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) (repr (Quot.mk Mcongr a✝))))
    (Quot.lift (fun x => (TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) x)) ⋯ (Quot.mk Mcongr a✝))
state_after: case mk
n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
a✝ : (P F).M α
⊢ LiftR' (α.RelLast' R)
    ((TypeVec.id ::: Quot.mk Mcongr) <$$>
      (TypeVec.id ::: M.corec (P F) fun x => MvQPF.repr x.dest) <$$> dest (Quot.mk Mcongr a✝))
    ((TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) a✝))
tactic: simp only [Cofix.repr, M.dest_corec, abs_map, MvQPF.abs_repr, Function.comp]
state_before: case mk
n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
a✝ : (P F).M α
⊢ LiftR' (α.RelLast' R)
    ((TypeVec.id ::: Quot.mk Mcongr) <$$>
      (TypeVec.id ::: M.corec (P F) fun x => MvQPF.repr x.dest) <$$> dest (Quot.mk Mcongr a✝))
    ((TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) a✝))
state_after: case mk
n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
a✝ : (P F).M α
⊢ LiftR' (α.RelLast' R)
    ((TypeVec.id ::: Quot.mk Mcongr) <$$>
      (TypeVec.id :::
          M.corec (P F) fun x =>
            MvQPF.repr (Quot.lift (fun x => (TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) x)) ⋯ x)) <$$>
        Quot.lift (fun x => (TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) x)) ⋯ (Quot.mk Mcongr a✝))
    ((TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) a✝))
tactic: conv => congr; rfl; rw [Cofix.dest]
state_before: case mk
n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
a✝ : (P F).M α
⊢ LiftR' (α.RelLast' R)
    ((TypeVec.id ::: Quot.mk Mcongr) <$$>
      (TypeVec.id :::
          M.corec (P F) fun x =>
            MvQPF.repr (Quot.lift (fun x => (TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) x)) ⋯ x)) <$$>
        Quot.lift (fun x => (TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) x)) ⋯ (Quot.mk Mcongr a✝))
    ((TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) a✝))
state_after: case mk
n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
a✝ : (P F).M α
⊢ LiftR' (α.RelLast' R)
    ((TypeVec.id :::
        (Quot.mk Mcongr ∘
            M.corec (P F) fun x =>
              MvQPF.repr (Quot.lift (fun x => (TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) x)) ⋯ x)) ∘
          Quot.mk Mcongr) <$$>
      MvQPF.abs (M.dest (P F) a✝))
    ((TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) a✝))
tactic: rw [MvFunctor.map_map, MvFunctor.map_map, ← appendFun_comp_id, ← appendFun_comp_id]
state_before: case mk
n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
a✝ : (P F).M α
⊢ LiftR' (α.RelLast' R)
    ((TypeVec.id :::
        (Quot.mk Mcongr ∘
            M.corec (P F) fun x =>
              MvQPF.repr (Quot.lift (fun x => (TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) x)) ⋯ x)) ∘
          Quot.mk Mcongr) <$$>
      MvQPF.abs (M.dest (P F) a✝))
    ((TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) a✝))
state_after: case mk.hh
n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
a✝ : (P F).M α
⊢ ∀ (x : (P F).M α),
    R
      (((Quot.mk Mcongr ∘
            M.corec (P F) fun x =>
              MvQPF.repr (Quot.lift (fun x => (TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) x)) ⋯ x)) ∘
          Quot.mk Mcongr)
        x)
      (Quot.mk Mcongr x)
tactic: apply liftR_map_last
state_before: case mk.hh
n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
a✝ : (P F).M α
⊢ ∀ (x : (P F).M α),
    R
      (((Quot.mk Mcongr ∘
            M.corec (P F) fun x =>
              MvQPF.repr (Quot.lift (fun x => (TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) x)) ⋯ x)) ∘
          Quot.mk Mcongr)
        x)
      (Quot.mk Mcongr x)
state_after: case mk.hh
n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
a✝ x✝ : (P F).M α
⊢ R
    (((Quot.mk Mcongr ∘
          M.corec (P F) fun x =>
            MvQPF.repr (Quot.lift (fun x => (TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) x)) ⋯ x)) ∘
        Quot.mk Mcongr)
      x✝)
    (Quot.mk Mcongr x✝)
tactic: intros
state_before: case mk.hh
n : ℕ
F✝ : TypeVec.{u} (n + 1) → Type u
q✝ : MvQPF F✝
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
R : Cofix F α → Cofix F α → Prop := fun x y => abs y.repr = x
a✝ x✝ : (P F).M α
⊢ R
    (((Quot.mk Mcongr ∘
          M.corec (P F) fun x =>
            MvQPF.repr (Quot.lift (fun x => (TypeVec.id ::: Quot.mk Mcongr) <$$> MvQPF.abs (M.dest (P F) x)) ⋯ x)) ∘
        Quot.mk Mcongr)
      x✝)
    (Quot.mk Mcongr x✝)
state_after: no goals
tactic: rfl