Theorem: MvFunctor.LiftR_RelLast_iff
File: Mathlib/Control/Functor/Multivariate.lean

tactic: dsimp only [LiftR, LiftR']
state_before: n : ℕ
F : TypeVec.{u} (n + 1) → Type u_1
inst✝¹ : MvFunctor F
inst✝ : LawfulMvFunctor F
α : TypeVec.{u} n
β : Type u
pp : β → Prop
rr : β → β → Prop
x y : F (α ::: β)
⊢ LiftR' (α.RelLast' rr) x y ↔ LiftR (fun {i} => α.RelLast rr) x y
state_after: n : ℕ
F : TypeVec.{u} (n + 1) → Type u_1
inst✝¹ : MvFunctor F
inst✝ : LawfulMvFunctor F
α : TypeVec.{u} n
β : Type u
pp : β → Prop
rr : β → β → Prop
x y : F (α ::: β)
⊢ (∃ u, (fun i t => (↑t).1) <$$> u = x ∧ (fun i t => (↑t).2) <$$> u = y) ↔
    ∃ u, (fun i t => (↑t).1) <$$> u = x ∧ (fun i t => (↑t).2) <$$> u = y

tactic: apply exists_iff_exists_of_mono F (f' rr _ _) (g' rr _ _)
state_before: n : ℕ
F : TypeVec.{u} (n + 1) → Type u_1
inst✝¹ : MvFunctor F
inst✝ : LawfulMvFunctor F
α : TypeVec.{u} n
β : Type u
pp : β → Prop
rr : β → β → Prop
x y : F (α ::: β)
⊢ (∃ u, (fun i t => (↑t).1) <$$> u = x ∧ (fun i t => (↑t).2) <$$> u = y) ↔
    ∃ u, (fun i t => (↑t).1) <$$> u = x ∧ (fun i t => (↑t).2) <$$> u = y
state_after: case h₀
n : ℕ
F : TypeVec.{u} (n + 1) → Type u_1
inst✝¹ : MvFunctor F
inst✝ : LawfulMvFunctor F
α : TypeVec.{u} n
β : Type u
pp : β → Prop
rr : β → β → Prop
x y : F (α ::: β)
⊢ MvFunctor.f' rr n α ⊚ MvFunctor.g' rr n α = TypeVec.id

case h₁
n : ℕ
F : TypeVec.{u} (n + 1) → Type u_1
inst✝¹ : MvFunctor F
inst✝ : LawfulMvFunctor F
α : TypeVec.{u} n
β : Type u
pp : β → Prop
rr : β → β → Prop
x y : F (α ::: β)
⊢ ∀ (u : F fun i => { p_1 // ofRepeat (α.RelLast' rr i (prod.mk i p_1.1 p_1.2)) }),
    (fun i t => (↑t).1) <$$> u = x ∧ (fun i t => (↑t).2) <$$> u = y ↔
      (fun i t => (↑t).1) <$$> MvFunctor.f' rr n α <$$> u = x ∧ (fun i t => (↑t).2) <$$> MvFunctor.f' rr n α <$$> u = y

tactic: ext i ⟨x, _⟩ : 2
state_before: case h₀
n : ℕ
F : TypeVec.{u} (n + 1) → Type u_1
inst✝¹ : MvFunctor F
inst✝ : LawfulMvFunctor F
α : TypeVec.{u} n
β : Type u
pp : β → Prop
rr : β → β → Prop
x y : F (α ::: β)
⊢ MvFunctor.f' rr n α ⊚ MvFunctor.g' rr n α = TypeVec.id
state_after: case h₀.a.h.mk
n : ℕ
F : TypeVec.{u} (n + 1) → Type u_1
inst✝¹ : MvFunctor F
inst✝ : LawfulMvFunctor F
α : TypeVec.{u} n
β : Type u
pp : β → Prop
rr : β → β → Prop
x✝ y : F (α ::: β)
i : Fin2 (n + 1)
x : (α ::: β) i × (α ::: β) i
property✝ : α.RelLast rr x.1 x.2
⊢ (MvFunctor.f' rr n α ⊚ MvFunctor.g' rr n α) i ⟨x, property✝⟩ = TypeVec.id i ⟨x, property✝⟩

tactic: cases i <;> rfl
state_before: case h₀.a.h.mk
n : ℕ
F : TypeVec.{u} (n + 1) → Type u_1
inst✝¹ : MvFunctor F
inst✝ : LawfulMvFunctor F
α : TypeVec.{u} n
β : Type u
pp : β → Prop
rr : β → β → Prop
x✝ y : F (α ::: β)
i : Fin2 (n + 1)
x : (α ::: β) i × (α ::: β) i
property✝ : α.RelLast rr x.1 x.2
⊢ (MvFunctor.f' rr n α ⊚ MvFunctor.g' rr n α) i ⟨x, property✝⟩ = TypeVec.id i ⟨x, property✝⟩
state_after: no goals

tactic: intros
state_before: case h₁
n : ℕ
F : TypeVec.{u} (n + 1) → Type u_1
inst✝¹ : MvFunctor F
inst✝ : LawfulMvFunctor F
α : TypeVec.{u} n
β : Type u
pp : β → Prop
rr : β → β → Prop
x y : F (α ::: β)
⊢ ∀ (u : F fun i => { p_1 // ofRepeat (α.RelLast' rr i (prod.mk i p_1.1 p_1.2)) }),
    (fun i t => (↑t).1) <$$> u = x ∧ (fun i t => (↑t).2) <$$> u = y ↔
      (fun i t => (↑t).1) <$$> MvFunctor.f' rr n α <$$> u = x ∧ (fun i t => (↑t).2) <$$> MvFunctor.f' rr n α <$$> u = y
state_after: case h₁
n : ℕ
F : TypeVec.{u} (n + 1) → Type u_1
inst✝¹ : MvFunctor F
inst✝ : LawfulMvFunctor F
α : TypeVec.{u} n
β : Type u
pp : β → Prop
rr : β → β → Prop
x y : F (α ::: β)
u✝ : F fun i => { p_1 // ofRepeat (α.RelLast' rr i (prod.mk i p_1.1 p_1.2)) }
⊢ (fun i t => (↑t).1) <$$> u✝ = x ∧ (fun i t => (↑t).2) <$$> u✝ = y ↔
    (fun i t => (↑t).1) <$$> MvFunctor.f' rr n α <$$> u✝ = x ∧ (fun i t => (↑t).2) <$$> MvFunctor.f' rr n α <$$> u✝ = y

tactic: suffices  (fun i t => t.val.fst) = ((fun i x => (MvFunctor.f' rr n α i x).val.fst))
        ∧ (fun i t => t.val.snd) = ((fun i x => (MvFunctor.f' rr n α i x).val.snd))
by  rcases this with ⟨left, right⟩
    rw [left, right];
state_before: case h₁
n : ℕ
F : TypeVec.{u} (n + 1) → Type u_1
inst✝¹ : MvFunctor F
inst✝ : LawfulMvFunctor F
α : TypeVec.{u} n
β : Type u
pp : β → Prop
rr : β → β → Prop
x y : F (α ::: β)
u✝ : F fun i => { p_1 // ofRepeat (α.RelLast' rr i (prod.mk i p_1.1 p_1.2)) }
⊢ (fun i t => (↑t).1) <$$> u✝ = x ∧ (fun i t => (↑t).2) <$$> u✝ = y ↔
    (fun i x => (↑(MvFunctor.f' rr n α i x)).1) <$$> u✝ = x ∧ (fun i x => (↑(MvFunctor.f' rr n α i x)).2) <$$> u✝ = y
state_after: case h₁
n : ℕ
F : TypeVec.{u} (n + 1) → Type u_1
inst✝¹ : MvFunctor F
inst✝ : LawfulMvFunctor F
α : TypeVec.{u} n
β : Type u
pp : β → Prop
rr : β → β → Prop
x y : F (α ::: β)
u✝ : F fun i => { p_1 // ofRepeat (α.RelLast' rr i (prod.mk i p_1.1 p_1.2)) }
⊢ ((fun i t => (↑t).1) = fun i x => (↑(MvFunctor.f' rr n α i x)).1) ∧
    (fun i t => (↑t).2) = fun i x => (↑(MvFunctor.f' rr n α i x)).2

tactic: constructor <;> ext i ⟨x, _⟩ <;> cases i <;> rfl
state_before: case h₁
n : ℕ
F : TypeVec.{u} (n + 1) → Type u_1
inst✝¹ : MvFunctor F
inst✝ : LawfulMvFunctor F
α : TypeVec.{u} n
β : Type u
pp : β → Prop
rr : β → β → Prop
x y : F (α ::: β)
u✝ : F fun i => { p_1 // ofRepeat (α.RelLast' rr i (prod.mk i p_1.1 p_1.2)) }
⊢ ((fun i t => (↑t).1) = fun i x => (↑(MvFunctor.f' rr n α i x)).1) ∧
    (fun i t => (↑t).2) = fun i x => (↑(MvFunctor.f' rr n α i x)).2
state_after: no goals

tactic: rcases this with ⟨left, right⟩
state_before: n : ℕ
F : TypeVec.{u} (n + 1) → Type u_1
inst✝¹ : MvFunctor F
inst✝ : LawfulMvFunctor F
α : TypeVec.{u} n
β : Type u
pp : β → Prop
rr : β → β → Prop
x y : F (α ::: β)
u✝ : F fun i => { p_1 // ofRepeat (α.RelLast' rr i (prod.mk i p_1.1 p_1.2)) }
this :
  ((fun i t => (↑t).1) = fun i x => (↑(MvFunctor.f' rr n α i x)).1) ∧
    (fun i t => (↑t).2) = fun i x => (↑(MvFunctor.f' rr n α i x)).2
⊢ (fun i t => (↑t).1) <$$> u✝ = x ∧ (fun i t => (↑t).2) <$$> u✝ = y ↔
    (fun i x => (↑(MvFunctor.f' rr n α i x)).1) <$$> u✝ = x ∧ (fun i x => (↑(MvFunctor.f' rr n α i x)).2) <$$> u✝ = y
state_after: case intro
n : ℕ
F : TypeVec.{u} (n + 1) → Type u_1
inst✝¹ : MvFunctor F
inst✝ : LawfulMvFunctor F
α : TypeVec.{u} n
β : Type u
pp : β → Prop
rr : β → β → Prop
x y : F (α ::: β)
u✝ : F fun i => { p_1 // ofRepeat (α.RelLast' rr i (prod.mk i p_1.1 p_1.2)) }
left : (fun i t => (↑t).1) = fun i x => (↑(MvFunctor.f' rr n α i x)).1
right : (fun i t => (↑t).2) = fun i x => (↑(MvFunctor.f' rr n α i x)).2
⊢ (fun i t => (↑t).1) <$$> u✝ = x ∧ (fun i t => (↑t).2) <$$> u✝ = y ↔
    (fun i x => (↑(MvFunctor.f' rr n α i x)).1) <$$> u✝ = x ∧ (fun i x => (↑(MvFunctor.f' rr n α i x)).2) <$$> u✝ = y

tactic: rw [left, right]
state_before: case intro
n : ℕ
F : TypeVec.{u} (n + 1) → Type u_1
inst✝¹ : MvFunctor F
inst✝ : LawfulMvFunctor F
α : TypeVec.{u} n
β : Type u
pp : β → Prop
rr : β → β → Prop
x y : F (α ::: β)
u✝ : F fun i => { p_1 // ofRepeat (α.RelLast' rr i (prod.mk i p_1.1 p_1.2)) }
left : (fun i t => (↑t).1) = fun i x => (↑(MvFunctor.f' rr n α i x)).1
right : (fun i t => (↑t).2) = fun i x => (↑(MvFunctor.f' rr n α i x)).2
⊢ (fun i t => (↑t).1) <$$> u✝ = x ∧ (fun i t => (↑t).2) <$$> u✝ = y ↔
    (fun i x => (↑(MvFunctor.f' rr n α i x)).1) <$$> u✝ = x ∧ (fun i x => (↑(MvFunctor.f' rr n α i x)).2) <$$> u✝ = y
state_after: no goals