Theorem: IContainer.M.index_destruct (CoInd/MIdx.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 = (Container.M.destruct ↑{ val := m, property := wf }).fst.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 = (Container.M.destruct ↑{ val := m, property := wf }).fst.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 = (Container.M.destruct ↑{ val := m, property := wf }).fst.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 = (Container.M.destruct ↑{ val := m, property := wf✝ }).fst.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 = (Container.M.destruct ↑{ val := m, property := wf✝ }).fst.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 = (Container.M.destruct ↑{ val := m, property := wf✝ }).fst.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 = (Container.M.destruct ↑{ val := m, property := wf✝ }).fst.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 : (Container.M.destruct m).fst.fst = i
right✝ :
  ∀ (x : B C (Container.M.destruct m).fst.fst (Container.M.destruct m).fst.snd),
    ↑(pgfp (WellFormedF C)) ⊥ (N C (Container.M.destruct m).fst.fst (Container.M.destruct m).fst.snd x)
      (PSigma.snd (Container.M.destruct m) x)
⊢ i = (Container.M.destruct ↑{ val := m, property := wf✝ }).fst.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 : (Container.M.destruct m).fst.fst = i
right✝ :
  ∀ (x : B C (Container.M.destruct m).fst.fst (Container.M.destruct m).fst.snd),
    ↑(pgfp (WellFormedF C)) ⊥ (N C (Container.M.destruct m).fst.fst (Container.M.destruct m).fst.snd x)
      (PSigma.snd (Container.M.destruct m) x)
⊢ i = (Container.M.destruct ↑{ val := m, property := wf✝ }).fst.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 : (Container.M.destruct m).fst.fst = i
right✝ :
  ∀ (x : B C (Container.M.destruct m).fst.fst (Container.M.destruct m).fst.snd),
    ↑(pgfp (WellFormedF C)) ⊥ (N C (Container.M.destruct m).fst.fst (Container.M.destruct m).fst.snd x)
      (PSigma.snd (Container.M.destruct m) x)
⊢ (Container.M.destruct ↑{ val := m, property := wf✝ }).fst.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 : (Container.M.destruct m).fst.fst = i
right✝ :
  ∀ (x : B C (Container.M.destruct m).fst.fst (Container.M.destruct m).fst.snd),
    ↑(pgfp (WellFormedF C)) ⊥ (N C (Container.M.destruct m).fst.fst (Container.M.destruct m).fst.snd x)
      (PSigma.snd (Container.M.destruct m) x)
⊢ (Container.M.destruct ↑{ val := m, property := wf✝ }).fst.fst = i
Tactic:
exact x
State after:
no goals