Theorem: PFunctor.M.agree_iff_agree'
File: Mathlib/Data/PFunctor/Univariate/M.lean

tactic: constructor <;> intro h
state_before: F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n : ℕ
x y : F.M
⊢ Agree (x.approx n) (y.approx (n + 1)) ↔ Agree' n x y
state_after: case mp
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n : ℕ
x y : F.M
h : Agree (x.approx n) (y.approx (n + 1))
⊢ Agree' n x y

case mpr
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n : ℕ
x y : F.M
h : Agree' n x y
⊢ Agree (x.approx n) (y.approx (n + 1))

tactic: induction' n with _ n_ih generalizing x y
state_before: case mp
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n : ℕ
x y : F.M
h : Agree (x.approx n) (y.approx (n + 1))
⊢ Agree' n x y
state_after: case mp.zero
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
x y : F.M
h : Agree (x.approx 0) (y.approx (0 + 1))
⊢ Agree' 0 x y

case mp.succ
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree (x.approx n✝) (y.approx (n✝ + 1)) → Agree' n✝ x y
x y : F.M
h : Agree (x.approx (n✝ + 1)) (y.approx (n✝ + 1 + 1))
⊢ Agree' (n✝ + 1) x y

tactic: constructor
state_before: case mp.zero
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
x y : F.M
h : Agree (x.approx 0) (y.approx (0 + 1))
⊢ Agree' 0 x y
state_after: no goals

tactic: induction x using PFunctor.M.casesOn'
state_before: case mp.succ
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree (x.approx n✝) (y.approx (n✝ + 1)) → Agree' n✝ x y
x y : F.M
h : Agree (x.approx (n✝ + 1)) (y.approx (n✝ + 1 + 1))
⊢ Agree' (n✝ + 1) x y
state_after: case mp.succ.f
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree (x.approx n✝) (y.approx (n✝ + 1)) → Agree' n✝ x y
y : F.M
a✝ : F.A
f✝ : F.B a✝ → F.M
h : Agree ((M.mk ⟨a✝, f✝⟩).approx (n✝ + 1)) (y.approx (n✝ + 1 + 1))
⊢ Agree' (n✝ + 1) (M.mk ⟨a✝, f✝⟩) y

tactic: induction y using PFunctor.M.casesOn'
state_before: case mp.succ.f
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree (x.approx n✝) (y.approx (n✝ + 1)) → Agree' n✝ x y
y : F.M
a✝ : F.A
f✝ : F.B a✝ → F.M
h : Agree ((M.mk ⟨a✝, f✝⟩).approx (n✝ + 1)) (y.approx (n✝ + 1 + 1))
⊢ Agree' (n✝ + 1) (M.mk ⟨a✝, f✝⟩) y
state_after: case mp.succ.f.f
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree (x.approx n✝) (y.approx (n✝ + 1)) → Agree' n✝ x y
a✝¹ : F.A
f✝¹ : F.B a✝¹ → F.M
a✝ : F.A
f✝ : F.B a✝ → F.M
h : Agree ((M.mk ⟨a✝¹, f✝¹⟩).approx (n✝ + 1)) ((M.mk ⟨a✝, f✝⟩).approx (n✝ + 1 + 1))
⊢ Agree' (n✝ + 1) (M.mk ⟨a✝¹, f✝¹⟩) (M.mk ⟨a✝, f✝⟩)

tactic: simp only [approx_mk] at h
state_before: case mp.succ.f.f
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree (x.approx n✝) (y.approx (n✝ + 1)) → Agree' n✝ x y
a✝¹ : F.A
f✝¹ : F.B a✝¹ → F.M
a✝ : F.A
f✝ : F.B a✝ → F.M
h : Agree ((M.mk ⟨a✝¹, f✝¹⟩).approx (n✝ + 1)) ((M.mk ⟨a✝, f✝⟩).approx (n✝ + 1 + 1))
⊢ Agree' (n✝ + 1) (M.mk ⟨a✝¹, f✝¹⟩) (M.mk ⟨a✝, f✝⟩)
state_after: case mp.succ.f.f
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree (x.approx n✝) (y.approx (n✝ + 1)) → Agree' n✝ x y
a✝¹ : F.A
f✝¹ : F.B a✝¹ → F.M
a✝ : F.A
f✝ : F.B a✝ → F.M
h : Agree (CofixA.intro a✝¹ fun j => (f✝¹ j).approx n✝) (CofixA.intro a✝ fun j => (f✝ j).approx (n✝ + 1))
⊢ Agree' (n✝ + 1) (M.mk ⟨a✝¹, f✝¹⟩) (M.mk ⟨a✝, f✝⟩)

tactic: cases' h with _ _ _ _ _ _ hagree
state_before: case mp.succ.f.f
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree (x.approx n✝) (y.approx (n✝ + 1)) → Agree' n✝ x y
a✝¹ : F.A
f✝¹ : F.B a✝¹ → F.M
a✝ : F.A
f✝ : F.B a✝ → F.M
h : Agree (CofixA.intro a✝¹ fun j => (f✝¹ j).approx n✝) (CofixA.intro a✝ fun j => (f✝ j).approx (n✝ + 1))
⊢ Agree' (n✝ + 1) (M.mk ⟨a✝¹, f✝¹⟩) (M.mk ⟨a✝, f✝⟩)
state_after: case mp.succ.f.f.intro
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree (x.approx n✝) (y.approx (n✝ + 1)) → Agree' n✝ x y
a✝ : F.A
f✝¹ f✝ : F.B a✝ → F.M
hagree : ∀ (i : F.B a✝), Agree ((fun j => (f✝¹ j).approx n✝) i) ((fun j => (f✝ j).approx (n✝ + 1)) i)
⊢ Agree' (n✝ + 1) (M.mk ⟨a✝, f✝¹⟩) (M.mk ⟨a✝, f✝⟩)

tactic: constructor <;> try rfl
state_before: case mp.succ.f.f.intro
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree (x.approx n✝) (y.approx (n✝ + 1)) → Agree' n✝ x y
a✝ : F.A
f✝¹ f✝ : F.B a✝ → F.M
hagree : ∀ (i : F.B a✝), Agree ((fun j => (f✝¹ j).approx n✝) i) ((fun j => (f✝ j).approx (n✝ + 1)) i)
⊢ Agree' (n✝ + 1) (M.mk ⟨a✝, f✝¹⟩) (M.mk ⟨a✝, f✝⟩)
state_after: case mp.succ.f.f.intro.a
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree (x.approx n✝) (y.approx (n✝ + 1)) → Agree' n✝ x y
a✝ : F.A
f✝¹ f✝ : F.B a✝ → F.M
hagree : ∀ (i : F.B a✝), Agree ((fun j => (f✝¹ j).approx n✝) i) ((fun j => (f✝ j).approx (n✝ + 1)) i)
⊢ ∀ (i : F.B a✝), Agree' n✝ (f✝¹ i) (f✝ i)

tactic: intro i
state_before: case mp.succ.f.f.intro.a
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree (x.approx n✝) (y.approx (n✝ + 1)) → Agree' n✝ x y
a✝ : F.A
f✝¹ f✝ : F.B a✝ → F.M
hagree : ∀ (i : F.B a✝), Agree ((fun j => (f✝¹ j).approx n✝) i) ((fun j => (f✝ j).approx (n✝ + 1)) i)
⊢ ∀ (i : F.B a✝), Agree' n✝ (f✝¹ i) (f✝ i)
state_after: case mp.succ.f.f.intro.a
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree (x.approx n✝) (y.approx (n✝ + 1)) → Agree' n✝ x y
a✝ : F.A
f✝¹ f✝ : F.B a✝ → F.M
hagree : ∀ (i : F.B a✝), Agree ((fun j => (f✝¹ j).approx n✝) i) ((fun j => (f✝ j).approx (n✝ + 1)) i)
i : F.B a✝
⊢ Agree' n✝ (f✝¹ i) (f✝ i)

tactic: apply n_ih
state_before: case mp.succ.f.f.intro.a
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree (x.approx n✝) (y.approx (n✝ + 1)) → Agree' n✝ x y
a✝ : F.A
f✝¹ f✝ : F.B a✝ → F.M
hagree : ∀ (i : F.B a✝), Agree ((fun j => (f✝¹ j).approx n✝) i) ((fun j => (f✝ j).approx (n✝ + 1)) i)
i : F.B a✝
⊢ Agree' n✝ (f✝¹ i) (f✝ i)
state_after: case mp.succ.f.f.intro.a.h
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree (x.approx n✝) (y.approx (n✝ + 1)) → Agree' n✝ x y
a✝ : F.A
f✝¹ f✝ : F.B a✝ → F.M
hagree : ∀ (i : F.B a✝), Agree ((fun j => (f✝¹ j).approx n✝) i) ((fun j => (f✝ j).approx (n✝ + 1)) i)
i : F.B a✝
⊢ Agree ((f✝¹ i).approx n✝) ((f✝ i).approx (n✝ + 1))

tactic: apply hagree
state_before: case mp.succ.f.f.intro.a.h
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree (x.approx n✝) (y.approx (n✝ + 1)) → Agree' n✝ x y
a✝ : F.A
f✝¹ f✝ : F.B a✝ → F.M
hagree : ∀ (i : F.B a✝), Agree ((fun j => (f✝¹ j).approx n✝) i) ((fun j => (f✝ j).approx (n✝ + 1)) i)
i : F.B a✝
⊢ Agree ((f✝¹ i).approx n✝) ((f✝ i).approx (n✝ + 1))
state_after: no goals

tactic: rfl
state_before: case mp.succ.f.f.intro.a
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree (x.approx n✝) (y.approx (n✝ + 1)) → Agree' n✝ x y
a✝ : F.A
f✝¹ f✝ : F.B a✝ → F.M
hagree : ∀ (i : F.B a✝), Agree ((fun j => (f✝¹ j).approx n✝) i) ((fun j => (f✝ j).approx (n✝ + 1)) i)
⊢ M.mk ⟨a✝, f✝⟩ = M.mk ⟨a✝, ?mp.succ.f.f.intro.y⟩
state_after: no goals

tactic: induction' n with _ n_ih generalizing x y
state_before: case mpr
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n : ℕ
x y : F.M
h : Agree' n x y
⊢ Agree (x.approx n) (y.approx (n + 1))
state_after: case mpr.zero
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
x y : F.M
h : Agree' 0 x y
⊢ Agree (x.approx 0) (y.approx (0 + 1))

case mpr.succ
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
x y : F.M
h : Agree' (n✝ + 1) x y
⊢ Agree (x.approx (n✝ + 1)) (y.approx (n✝ + 1 + 1))

tactic: constructor
state_before: case mpr.zero
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
x y : F.M
h : Agree' 0 x y
⊢ Agree (x.approx 0) (y.approx (0 + 1))
state_after: no goals

tactic: cases' h with _ _ _ a x' y'
state_before: case mpr.succ
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
x y : F.M
h : Agree' (n✝ + 1) x y
⊢ Agree (x.approx (n✝ + 1)) (y.approx (n✝ + 1 + 1))
state_after: case mpr.succ.step
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
x y : F.M
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
a✝¹ : x = M.mk ⟨a, x'⟩
a✝ : y = M.mk ⟨a, y'⟩
⊢ Agree (x.approx (n✝ + 1)) (y.approx (n✝ + 1 + 1))

tactic: induction' x using PFunctor.M.casesOn' with x_a x_f
state_before: case mpr.succ.step
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
x y : F.M
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
a✝¹ : x = M.mk ⟨a, x'⟩
a✝ : y = M.mk ⟨a, y'⟩
⊢ Agree (x.approx (n✝ + 1)) (y.approx (n✝ + 1 + 1))
state_after: case mpr.succ.step.f
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
y : F.M
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
a✝¹ : y = M.mk ⟨a, y'⟩
x_a : F.A
x_f : F.B x_a → F.M
a✝ : M.mk ⟨x_a, x_f⟩ = M.mk ⟨a, x'⟩
⊢ Agree ((M.mk ⟨x_a, x_f⟩).approx (n✝ + 1)) (y.approx (n✝ + 1 + 1))

tactic: induction' y using PFunctor.M.casesOn' with y_a y_f
state_before: case mpr.succ.step.f
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
y : F.M
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
a✝¹ : y = M.mk ⟨a, y'⟩
x_a : F.A
x_f : F.B x_a → F.M
a✝ : M.mk ⟨x_a, x_f⟩ = M.mk ⟨a, x'⟩
⊢ Agree ((M.mk ⟨x_a, x_f⟩).approx (n✝ + 1)) (y.approx (n✝ + 1 + 1))
state_after: case mpr.succ.step.f.f
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
x_a : F.A
x_f : F.B x_a → F.M
a✝¹ : M.mk ⟨x_a, x_f⟩ = M.mk ⟨a, x'⟩
y_a : F.A
y_f : F.B y_a → F.M
a✝ : M.mk ⟨y_a, y_f⟩ = M.mk ⟨a, y'⟩
⊢ Agree ((M.mk ⟨x_a, x_f⟩).approx (n✝ + 1)) ((M.mk ⟨y_a, y_f⟩).approx (n✝ + 1 + 1))

tactic: simp only [approx_mk]
state_before: case mpr.succ.step.f.f
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
x_a : F.A
x_f : F.B x_a → F.M
a✝¹ : M.mk ⟨x_a, x_f⟩ = M.mk ⟨a, x'⟩
y_a : F.A
y_f : F.B y_a → F.M
a✝ : M.mk ⟨y_a, y_f⟩ = M.mk ⟨a, y'⟩
⊢ Agree ((M.mk ⟨x_a, x_f⟩).approx (n✝ + 1)) ((M.mk ⟨y_a, y_f⟩).approx (n✝ + 1 + 1))
state_after: case mpr.succ.step.f.f
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
x_a : F.A
x_f : F.B x_a → F.M
a✝¹ : M.mk ⟨x_a, x_f⟩ = M.mk ⟨a, x'⟩
y_a : F.A
y_f : F.B y_a → F.M
a✝ : M.mk ⟨y_a, y_f⟩ = M.mk ⟨a, y'⟩
⊢ Agree (CofixA.intro x_a fun j => (x_f j).approx n✝) (CofixA.intro y_a fun j => (y_f j).approx (n✝ + 1))

tactic: have h_a_1 := mk_inj ‹M.mk ⟨x_a, x_f⟩ = M.mk ⟨a, x'⟩›
state_before: case mpr.succ.step.f.f
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
x_a : F.A
x_f : F.B x_a → F.M
a✝¹ : M.mk ⟨x_a, x_f⟩ = M.mk ⟨a, x'⟩
y_a : F.A
y_f : F.B y_a → F.M
a✝ : M.mk ⟨y_a, y_f⟩ = M.mk ⟨a, y'⟩
⊢ Agree (CofixA.intro x_a fun j => (x_f j).approx n✝) (CofixA.intro y_a fun j => (y_f j).approx (n✝ + 1))
state_after: case mpr.succ.step.f.f
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
x_a : F.A
x_f : F.B x_a → F.M
a✝¹ : M.mk ⟨x_a, x_f⟩ = M.mk ⟨a, x'⟩
y_a : F.A
y_f : F.B y_a → F.M
a✝ : M.mk ⟨y_a, y_f⟩ = M.mk ⟨a, y'⟩
h_a_1 : ⟨x_a, x_f⟩ = ⟨a, x'⟩
⊢ Agree (CofixA.intro x_a fun j => (x_f j).approx n✝) (CofixA.intro y_a fun j => (y_f j).approx (n✝ + 1))

tactic: cases h_a_1
state_before: case mpr.succ.step.f.f
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
x_a : F.A
x_f : F.B x_a → F.M
a✝¹ : M.mk ⟨x_a, x_f⟩ = M.mk ⟨a, x'⟩
y_a : F.A
y_f : F.B y_a → F.M
a✝ : M.mk ⟨y_a, y_f⟩ = M.mk ⟨a, y'⟩
h_a_1 : ⟨x_a, x_f⟩ = ⟨a, x'⟩
⊢ Agree (CofixA.intro x_a fun j => (x_f j).approx n✝) (CofixA.intro y_a fun j => (y_f j).approx (n✝ + 1))
state_after: case mpr.succ.step.f.f.refl
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
y_a : F.A
y_f : F.B y_a → F.M
a✝¹ : M.mk ⟨y_a, y_f⟩ = M.mk ⟨a, y'⟩
a✝ : M.mk ⟨a, x'⟩ = M.mk ⟨a, x'⟩
⊢ Agree (CofixA.intro a fun j => (x' j).approx n✝) (CofixA.intro y_a fun j => (y_f j).approx (n✝ + 1))

tactic: replace h_a_2 := mk_inj ‹M.mk ⟨y_a, y_f⟩ = M.mk ⟨a, y'⟩›
state_before: case mpr.succ.step.f.f.refl
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
y_a : F.A
y_f : F.B y_a → F.M
a✝¹ : M.mk ⟨y_a, y_f⟩ = M.mk ⟨a, y'⟩
a✝ : M.mk ⟨a, x'⟩ = M.mk ⟨a, x'⟩
⊢ Agree (CofixA.intro a fun j => (x' j).approx n✝) (CofixA.intro y_a fun j => (y_f j).approx (n✝ + 1))
state_after: case mpr.succ.step.f.f.refl
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
y_a : F.A
y_f : F.B y_a → F.M
a✝¹ : M.mk ⟨y_a, y_f⟩ = M.mk ⟨a, y'⟩
a✝ : M.mk ⟨a, x'⟩ = M.mk ⟨a, x'⟩
h_a_2 : ⟨y_a, y_f⟩ = ⟨a, y'⟩
⊢ Agree (CofixA.intro a fun j => (x' j).approx n✝) (CofixA.intro y_a fun j => (y_f j).approx (n✝ + 1))

tactic: cases h_a_2
state_before: case mpr.succ.step.f.f.refl
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
y_a : F.A
y_f : F.B y_a → F.M
a✝¹ : M.mk ⟨y_a, y_f⟩ = M.mk ⟨a, y'⟩
a✝ : M.mk ⟨a, x'⟩ = M.mk ⟨a, x'⟩
h_a_2 : ⟨y_a, y_f⟩ = ⟨a, y'⟩
⊢ Agree (CofixA.intro a fun j => (x' j).approx n✝) (CofixA.intro y_a fun j => (y_f j).approx (n✝ + 1))
state_after: case mpr.succ.step.f.f.refl.refl
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
a✝¹ : M.mk ⟨a, x'⟩ = M.mk ⟨a, x'⟩
a✝ : M.mk ⟨a, y'⟩ = M.mk ⟨a, y'⟩
⊢ Agree (CofixA.intro a fun j => (x' j).approx n✝) (CofixA.intro a fun j => (y' j).approx (n✝ + 1))

tactic: constructor
state_before: case mpr.succ.step.f.f.refl.refl
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
a✝¹ : M.mk ⟨a, x'⟩ = M.mk ⟨a, x'⟩
a✝ : M.mk ⟨a, y'⟩ = M.mk ⟨a, y'⟩
⊢ Agree (CofixA.intro a fun j => (x' j).approx n✝) (CofixA.intro a fun j => (y' j).approx (n✝ + 1))
state_after: case mpr.succ.step.f.f.refl.refl.a
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
a✝¹ : M.mk ⟨a, x'⟩ = M.mk ⟨a, x'⟩
a✝ : M.mk ⟨a, y'⟩ = M.mk ⟨a, y'⟩
⊢ ∀ (i : F.B a), Agree ((x' i).approx n✝) ((y' i).approx (n✝ + 1))

tactic: intro i
state_before: case mpr.succ.step.f.f.refl.refl.a
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
a✝¹ : M.mk ⟨a, x'⟩ = M.mk ⟨a, x'⟩
a✝ : M.mk ⟨a, y'⟩ = M.mk ⟨a, y'⟩
⊢ ∀ (i : F.B a), Agree ((x' i).approx n✝) ((y' i).approx (n✝ + 1))
state_after: case mpr.succ.step.f.f.refl.refl.a
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
a✝¹ : M.mk ⟨a, x'⟩ = M.mk ⟨a, x'⟩
a✝ : M.mk ⟨a, y'⟩ = M.mk ⟨a, y'⟩
i : F.B a
⊢ Agree ((x' i).approx n✝) ((y' i).approx (n✝ + 1))

tactic: apply n_ih
state_before: case mpr.succ.step.f.f.refl.refl.a
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
a✝¹ : M.mk ⟨a, x'⟩ = M.mk ⟨a, x'⟩
a✝ : M.mk ⟨a, y'⟩ = M.mk ⟨a, y'⟩
i : F.B a
⊢ Agree ((x' i).approx n✝) ((y' i).approx (n✝ + 1))
state_after: case mpr.succ.step.f.f.refl.refl.a.h
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
a✝¹ : M.mk ⟨a, x'⟩ = M.mk ⟨a, x'⟩
a✝ : M.mk ⟨a, y'⟩ = M.mk ⟨a, y'⟩
i : F.B a
⊢ Agree' n✝ (x' i) (y' i)

tactic: simp [*]
state_before: case mpr.succ.step.f.f.refl.refl.a.h
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
n✝ : ℕ
n_ih : ∀ (x y : F.M), Agree' n✝ x y → Agree (x.approx n✝) (y.approx (n✝ + 1))
a : F.A
x' y' : F.B a → F.M
a✝² : ∀ (i : F.B a), Agree' n✝ (x' i) (y' i)
a✝¹ : M.mk ⟨a, x'⟩ = M.mk ⟨a, x'⟩
a✝ : M.mk ⟨a, y'⟩ = M.mk ⟨a, y'⟩
i : F.B a
⊢ Agree' n✝ (x' i) (y' i)
state_after: no goals