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

tactic: apply ext'
state_before: F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
⊢ x = y
state_after: case H
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
⊢ ∀ (i : ℕ), x.approx i = y.approx i

tactic: intro i
state_before: case H
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
⊢ ∀ (i : ℕ), x.approx i = y.approx i
state_after: case H
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
⊢ x.approx i = y.approx i

tactic: induction' i with i i_ih
state_before: case H
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
⊢ x.approx i = y.approx i
state_after: case H.zero
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
⊢ x.approx 0 = y.approx 0

case H.succ
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : x.approx i = y.approx i
⊢ x.approx (i + 1) = y.approx (i + 1)

tactic: cases x.approx 0
state_before: case H.zero
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
⊢ x.approx 0 = y.approx 0
state_after: case H.zero.continue
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
⊢ CofixA.continue = y.approx 0

tactic: cases y.approx 0
state_before: case H.zero.continue
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
⊢ CofixA.continue = y.approx 0
state_after: case H.zero.continue.continue
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
⊢ CofixA.continue = CofixA.continue

tactic: constructor
state_before: case H.zero.continue.continue
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
⊢ CofixA.continue = CofixA.continue
state_after: no goals

tactic: apply ext_aux x y x
state_before: case H.succ
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : x.approx i = y.approx i
⊢ x.approx (i + 1) = y.approx (i + 1)
state_after: case H.succ.hx
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : x.approx i = y.approx i
⊢ Agree' i x x

case H.succ.hy
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : x.approx i = y.approx i
⊢ Agree' i x y

case H.succ.hrec
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : x.approx i = y.approx i
⊢ ∀ (ps : Path F), i = length ps → iselect ps x = iselect ps y

tactic: introv H'
state_before: case H.succ.hrec
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : x.approx i = y.approx i
⊢ ∀ (ps : Path F), i = length ps → iselect ps x = iselect ps y
state_after: case H.succ.hrec
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : x.approx i = y.approx i
ps : Path F
H' : i = length ps
⊢ iselect ps x = iselect ps y

tactic: dsimp only [iselect] at H
state_before: case H.succ.hrec
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : x.approx i = y.approx i
ps : Path F
H' : i = length ps
⊢ iselect ps x = iselect ps y
state_after: case H.succ.hrec
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), (isubtree ps x).head = (isubtree ps y).head
i : ℕ
i_ih : x.approx i = y.approx i
ps : Path F
H' : i = length ps
⊢ iselect ps x = iselect ps y

tactic: cases H'
state_before: case H.succ.hrec
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), (isubtree ps x).head = (isubtree ps y).head
i : ℕ
i_ih : x.approx i = y.approx i
ps : Path F
H' : i = length ps
⊢ iselect ps x = iselect ps y
state_after: case H.succ.hrec.refl
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), (isubtree ps x).head = (isubtree ps y).head
ps : Path F
i_ih : x.approx (length ps) = y.approx (length ps)
⊢ iselect ps x = iselect ps y

tactic: apply H ps
state_before: case H.succ.hrec.refl
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), (isubtree ps x).head = (isubtree ps y).head
ps : Path F
i_ih : x.approx (length ps) = y.approx (length ps)
⊢ iselect ps x = iselect ps y
state_after: no goals

tactic: rw [← agree_iff_agree']
state_before: case H.succ.hx
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : x.approx i = y.approx i
⊢ Agree' i x x
state_after: case H.succ.hx
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : x.approx i = y.approx i
⊢ Agree (x.approx i) (x.approx (i + 1))

tactic: apply x.consistent
state_before: case H.succ.hx
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : x.approx i = y.approx i
⊢ Agree (x.approx i) (x.approx (i + 1))
state_after: no goals

tactic: rw [← agree_iff_agree', i_ih]
state_before: case H.succ.hy
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : x.approx i = y.approx i
⊢ Agree' i x y
state_after: case H.succ.hy
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : x.approx i = y.approx i
⊢ Agree (y.approx i) (y.approx (i + 1))

tactic: apply y.consistent
state_before: case H.succ.hy
F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
inst✝ : Inhabited F.M
x y : F.M
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : x.approx i = y.approx i
⊢ Agree (y.approx i) (y.approx (i + 1))
state_after: no goals