Theorem: IContainer'.M.index_destruct (CoInd/Test.lean)

State before:
I : Type u₀
C : IContainer' I
i : I
x✝ : M C i
m : Container.M (toContainer C)
wf : WellFormed i m
⊢ i = Idx C (Container.M.destruct ↑{ val := m, property := wf }).fst
Tactic:
simp only [WellFormed, PWellFormed] at wf
State after:
I : Type u₀
C : IContainer' I
i : I
x✝ : M C i
m : Container.M (toContainer C)
wf : ↑(pgfp (WellFormedF C)) ⊥ i m
⊢ i = Idx C (Container.M.destruct ↑{ val := m, property := wf }).fst

State before:
I : Type u₀
C : IContainer' I
i : I
x✝ : M C i
m : Container.M (toContainer C)
wf : ↑(pgfp (WellFormedF C)) ⊥ i m
⊢ i = Idx C (Container.M.destruct ↑{ val := m, property := wf }).fst
Tactic:
rw [←pgfp.unfold] at wf
State after:
I : Type u₀
C : IContainer' I
i : I
x✝ : M C i
m : Container.M (toContainer C)
wf✝ : ↑(pgfp (WellFormedF C)) ⊥ i m
wf : ↑(WellFormedF C) (⊥ ⊔ ↑(pgfp (WellFormedF C)) ⊥) i m
⊢ i = Idx C (Container.M.destruct ↑{ val := m, property := wf✝ }).fst

State before:
I : Type u₀
C : IContainer' I
i : I
x✝ : M C i
m : Container.M (toContainer C)
wf✝ : ↑(pgfp (WellFormedF C)) ⊥ i m
wf : ↑(WellFormedF C) (⊥ ⊔ ↑(pgfp (WellFormedF C)) ⊥) i m
⊢ i = Idx C (Container.M.destruct ↑{ val := m, property := wf✝ }).fst
Tactic:
simp only [CompleteLattice.bot_sup] at wf
State after:
I : Type u₀
C : IContainer' I
i : I
x✝ : M C i
m : Container.M (toContainer C)
wf✝ : ↑(pgfp (WellFormedF C)) ⊥ i m
wf : ↑(WellFormedF C) (↑(pgfp (WellFormedF C)) ⊥) i m
⊢ i = Idx C (Container.M.destruct ↑{ val := m, property := wf✝ }).fst

State before:
I : Type u₀
C : IContainer' I
i : I
x✝ : M C i
m : Container.M (toContainer C)
wf✝ : ↑(pgfp (WellFormedF C)) ⊥ i m
wf : ↑(WellFormedF C) (↑(pgfp (WellFormedF C)) ⊥) i m
⊢ i = Idx C (Container.M.destruct ↑{ val := m, property := wf✝ }).fst
Tactic:
have ⟨x, _⟩ := wf
State after:
I : Type u₀
C : IContainer' I
i : I
x✝ : M C i
m : Container.M (toContainer C)
wf✝ : ↑(pgfp (WellFormedF C)) ⊥ i m
wf : ↑(WellFormedF C) (↑(pgfp (WellFormedF C)) ⊥) i m
x : Idx C (Container.M.destruct m).fst = i
right✝ :
  ∀ (x : B C (Container.M.destruct m).fst),
    ↑(pgfp (WellFormedF C)) ⊥ (Next C (Container.M.destruct m).fst x) (PSigma.snd (Container.M.destruct m) x)
⊢ i = Idx C (Container.M.destruct ↑{ val := m, property := wf✝ }).fst

State before:
I : Type u₀
C : IContainer' I
i : I
x✝ : M C i
m : Container.M (toContainer C)
wf✝ : ↑(pgfp (WellFormedF C)) ⊥ i m
wf : ↑(WellFormedF C) (↑(pgfp (WellFormedF C)) ⊥) i m
x : Idx C (Container.M.destruct m).fst = i
right✝ :
  ∀ (x : B C (Container.M.destruct m).fst),
    ↑(pgfp (WellFormedF C)) ⊥ (Next C (Container.M.destruct m).fst x) (PSigma.snd (Container.M.destruct m) x)
⊢ i = Idx C (Container.M.destruct ↑{ val := m, property := wf✝ }).fst
Tactic:
apply Eq.symm
State after:
case h
I : Type u₀
C : IContainer' I
i : I
x✝ : M C i
m : Container.M (toContainer C)
wf✝ : ↑(pgfp (WellFormedF C)) ⊥ i m
wf : ↑(WellFormedF C) (↑(pgfp (WellFormedF C)) ⊥) i m
x : Idx C (Container.M.destruct m).fst = i
right✝ :
  ∀ (x : B C (Container.M.destruct m).fst),
    ↑(pgfp (WellFormedF C)) ⊥ (Next C (Container.M.destruct m).fst x) (PSigma.snd (Container.M.destruct m) x)
⊢ Idx C (Container.M.destruct ↑{ val := m, property := wf✝ }).fst = i

State before:
case h
I : Type u₀
C : IContainer' I
i : I
x✝ : M C i
m : Container.M (toContainer C)
wf✝ : ↑(pgfp (WellFormedF C)) ⊥ i m
wf : ↑(WellFormedF C) (↑(pgfp (WellFormedF C)) ⊥) i m
x : Idx C (Container.M.destruct m).fst = i
right✝ :
  ∀ (x : B C (Container.M.destruct m).fst),
    ↑(pgfp (WellFormedF C)) ⊥ (Next C (Container.M.destruct m).fst x) (PSigma.snd (Container.M.destruct m) x)
⊢ Idx C (Container.M.destruct ↑{ val := m, property := wf✝ }).fst = i
Tactic:
exact x
State after:
no goals