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

tactic: apply ext'
state_before: F : PFunctor
X : Type ?u.33413
f : X → Obj F X
inst✝ : Inhabited (M F)
x y : M F
H : ∀ (ps : Path F), iselect ps x = iselect ps y
⊢ x = y

tactic: intro i
state_before: case H
F : PFunctor
X : Type ?u.33413
f : X → Obj F X
inst✝ : Inhabited (M F)
x y : M F
H : ∀ (ps : Path F), iselect ps x = iselect ps y
⊢ ∀ (i : ℕ), MIntl.approx x i = MIntl.approx y i

tactic: induction' i with i i_ih
state_before: case H
F : PFunctor
X : Type ?u.33413
f : X → Obj F X
inst✝ : Inhabited (M F)
x y : M F
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
⊢ MIntl.approx x i = MIntl.approx y i

tactic: cases x.approx 0
state_before: case H.zero
F : PFunctor
X : Type ?u.33413
f : X → Obj F X
inst✝ : Inhabited (M F)
x y : M F
H : ∀ (ps : Path F), iselect ps x = iselect ps y
⊢ MIntl.approx x zero = MIntl.approx y zero

tactic: cases y.approx 0
state_before: case H.zero.continue
F : PFunctor
X : Type ?u.33413
f : X → Obj F X
inst✝ : Inhabited (M F)
x y : M F
H : ∀ (ps : Path F), iselect ps x = iselect ps y
⊢ CofixA.continue = MIntl.approx y zero

tactic: constructor
state_before: case H.zero.continue.continue
F : PFunctor
X : Type ?u.33413
f : X → Obj F X
inst✝ : Inhabited (M F)
x y : M F
H : ∀ (ps : Path F), iselect ps x = iselect ps y
⊢ CofixA.continue = CofixA.continue

tactic: apply ext_aux x y x
state_before: case H.succ
F : PFunctor
X : Type ?u.33413
f : X → Obj F X
inst✝ : Inhabited (M F)
x y : M F
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : MIntl.approx x i = MIntl.approx y i
⊢ MIntl.approx x (succ i) = MIntl.approx y (succ i)

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

tactic: dsimp only [iselect] at H
state_before: case H.succ.hrec
F : PFunctor
X : Type ?u.33413
f : X → Obj F X
inst✝ : Inhabited (M F)
x y : M F
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : MIntl.approx x i = MIntl.approx y 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
X : Type ?u.33413
f : X → Obj F X
inst✝ : Inhabited (M F)
x y : M F
H : ∀ (ps : Path F), head (isubtree ps x) = head (isubtree ps y)
i : ℕ
i_ih : MIntl.approx x i = MIntl.approx y i
ps : Path F
H' : i = length ps
⊢ iselect ps x = iselect ps y

tactic: apply H ps
state_before: case H.succ.hrec.refl
F : PFunctor
X : Type ?u.33413
f : X → Obj F X
inst✝ : Inhabited (M F)
x y : M F
H : ∀ (ps : Path F), head (isubtree ps x) = head (isubtree ps y)
ps : Path F
i_ih : MIntl.approx x (length ps) = MIntl.approx y (length ps)
⊢ iselect ps x = iselect ps y

tactic: rw [← agree_iff_agree']
state_before: case H.succ.hx
F : PFunctor
X : Type ?u.33413
f : X → Obj F X
inst✝ : Inhabited (M F)
x y : M F
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : MIntl.approx x i = MIntl.approx y i
⊢ Agree' i x x

tactic: apply x.consistent
state_before: case H.succ.hx
F : PFunctor
X : Type ?u.33413
f : X → Obj F X
inst✝ : Inhabited (M F)
x y : M F
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : MIntl.approx x i = MIntl.approx y i
⊢ Agree (MIntl.approx x i) (MIntl.approx x (i + 1))

tactic: rw [← agree_iff_agree', i_ih]
state_before: case H.succ.hy
F : PFunctor
X : Type ?u.33413
f : X → Obj F X
inst✝ : Inhabited (M F)
x y : M F
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : MIntl.approx x i = MIntl.approx y i
⊢ Agree' i x y

tactic: apply y.consistent
state_before: case H.succ.hy
F : PFunctor
X : Type ?u.33413
f : X → Obj F X
inst✝ : Inhabited (M F)
x y : M F
H : ∀ (ps : Path F), iselect ps x = iselect ps y
i : ℕ
i_ih : MIntl.approx x i = MIntl.approx y i
⊢ Agree (MIntl.approx y i) (MIntl.approx y (i + 1))