l3lab/ntp-mathlib huggingface dataset:
instance : LawfulMonadCont (ContT r m) where
  callCC_bind_right := by intros; ext; rfl
  callCC_bind_left := by intros; ext; rfl
  callCC_dummy := by intros; ext; 

Proof state:
case h
r : Type u
m : Type u → Type v
α β γ ω : Type w
α✝ β✝ : Type ?u.4892
dummy✝ : ContT r m α✝
f✝ : α✝ → m r
⊢ run (callCC fun x => dummy✝) f✝ = run dummy✝ f✝

Next tactic:
rfl
theorem ExceptT.goto_mkLabel {α β ε : Type _} (x : Label (Except.{u, u} ε α) m β) (i : α) :
    goto (ExceptT.mkLabel x) i = ExceptT.mk (Except.ok <$> goto x (Except.ok i)) := by
  

Proof state:
m : Type u → Type v
inst✝ : Monad m
α β ε : Type u
x : Label (Except ε α) m β
i : α
⊢ goto (mkLabel x) i = mk (Except.ok <$> goto x (Except.ok i))

Next tactic:
cases x
theorem ExceptT.goto_mkLabel {α β ε : Type _} (x : Label (Except.{u, u} ε α) m β) (i : α) :
    goto (ExceptT.mkLabel x) i = ExceptT.mk (Except.ok <$> goto x (Except.ok i)) := by
  cases x; 

Proof state:
case mk
m : Type u → Type v
inst✝ : Monad m
α β ε : Type u
i : α
apply✝ : Except ε α → m β
⊢ goto (mkLabel { apply := apply✝ }) i = mk (Except.ok <$> goto { apply := apply✝ } (Except.ok i))

Next tactic:
rfl
instance {ε} [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (ExceptT ε m) where
  callCC_bind_right := by
    

Proof state:
m : Type u → Type v
inst✝² : Monad m
ε : Type u
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
⊢ ∀ {α ω γ : Type u} (cmd : ExceptT ε m α) (next : Label ω (ExceptT ε m) γ → α → ExceptT ε m ω),
    (callCC fun f => cmd >>= next f) = do
      let x ← cmd
      callCC fun f => next f x

Next tactic:
intros
instance {ε} [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (ExceptT ε m) where
  callCC_bind_right := by
    intros; 

Proof state:
m : Type u → Type v
inst✝² : Monad m
ε : Type u
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ ω✝ γ✝ : Type u
cmd✝ : ExceptT ε m α✝
next✝ : Label ω✝ (ExceptT ε m) γ✝ → α✝ → ExceptT ε m ω✝
⊢ (callCC fun f => cmd✝ >>= next✝ f) = do
    let x ← cmd✝
    callCC fun f => next✝ f x

Next tactic:
simp [callCC, ExceptT.callCC, callCC_bind_right]
instance {ε} [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (ExceptT ε m) where
  callCC_bind_right := by
    intros; simp [callCC, ExceptT.callCC, callCC_bind_right]; 

Proof state:
m : Type u → Type v
inst✝² : Monad m
ε : Type u
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ ω✝ γ✝ : Type u
cmd✝ : ExceptT ε m α✝
next✝ : Label ω✝ (ExceptT ε m) γ✝ → α✝ → ExceptT ε m ω✝
⊢ (ExceptT.mk do
      let x ← ExceptT.run cmd✝
      callCC fun f =>
          match x with
          | Except.ok x => ExceptT.run (next✝ (ExceptT.mkLabel f) x)
          | Except.error e => pure (Except.error e)) =
    do
    let x ← cmd✝
    ExceptT.mk (callCC fun x_1 => ExceptT.run (next✝ (ExceptT.mkLabel x_1) x))

Next tactic:
ext
instance {ε} [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (ExceptT ε m) where
  callCC_bind_right := by
    intros; simp [callCC, ExceptT.callCC, callCC_bind_right]; ext
    

Proof state:
case h
m : Type u → Type v
inst✝² : Monad m
ε : Type u
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ ω✝ γ✝ : Type u
cmd✝ : ExceptT ε m α✝
next✝ : Label ω✝ (ExceptT ε m) γ✝ → α✝ → ExceptT ε m ω✝
⊢ ExceptT.run
      (ExceptT.mk do
        let x ← ExceptT.run cmd✝
        callCC fun f =>
            match x with
            | Except.ok x => ExceptT.run (next✝ (ExceptT.mkLabel f) x)
            | Except.error e => pure (Except.error e)) =
    ExceptT.run do
      let x ← cmd✝
      ExceptT.mk (callCC fun x_1 => ExceptT.run (next✝ (ExceptT.mkLabel x_1) x))

Next tactic:
dsimp
instance {ε} [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (ExceptT ε m) where
  callCC_bind_right := by
    intros; simp [callCC, ExceptT.callCC, callCC_bind_right]; ext
    dsimp
    

Proof state:
case h
m : Type u → Type v
inst✝² : Monad m
ε : Type u
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ ω✝ γ✝ : Type u
cmd✝ : ExceptT ε m α✝
next✝ : Label ω✝ (ExceptT ε m) γ✝ → α✝ → ExceptT ε m ω✝
⊢ (do
      let x ← ExceptT.run cmd✝
      callCC fun f =>
          match x with
          | Except.ok x => ExceptT.run (next✝ (ExceptT.mkLabel f) x)
          | Except.error e => pure (Except.error e)) =
    do
    let x ← ExceptT.run cmd✝
    match x with
      | Except.ok x => callCC fun x_1 => ExceptT.run (next✝ (ExceptT.mkLabel x_1) x)
      | Except.error e => pure (Except.error e)

Next tactic:
congr with ⟨⟩
instance {ε} [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (ExceptT ε m) where
  callCC_bind_right := by
    intros; simp [callCC, ExceptT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> 

Proof state:
case h.e_a.h.error
m : Type u → Type v
inst✝² : Monad m
ε : Type u
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ ω✝ γ✝ : Type u
cmd✝ : ExceptT ε m α✝
next✝ : Label ω✝ (ExceptT ε m) γ✝ → α✝ → ExceptT ε m ω✝
a✝ : ε
⊢ (callCC fun f =>
      match Except.error a✝ with
      | Except.ok x => ExceptT.run (next✝ (ExceptT.mkLabel f) x)
      | Except.error e => pure (Except.error e)) =
    match Except.error a✝ with
    | Except.ok x => callCC fun x_1 => ExceptT.run (next✝ (ExceptT.mkLabel x_1) x)
    | Except.error e => pure (Except.error e)

Next tactic:
simp [ExceptT.bindCont, @callCC_dummy m _]
instance {ε} [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (ExceptT ε m) where
  callCC_bind_right := by
    intros; simp [callCC, ExceptT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> 

Proof state:
case h.e_a.h.ok
m : Type u → Type v
inst✝² : Monad m
ε : Type u
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ ω✝ γ✝ : Type u
cmd✝ : ExceptT ε m α✝
next✝ : Label ω✝ (ExceptT ε m) γ✝ → α✝ → ExceptT ε m ω✝
a✝ : α✝
⊢ (callCC fun f =>
      match Except.ok a✝ with
      | Except.ok x => ExceptT.run (next✝ (ExceptT.mkLabel f) x)
      | Except.error e => pure (Except.error e)) =
    match Except.ok a✝ with
    | Except.ok x => callCC fun x_1 => ExceptT.run (next✝ (ExceptT.mkLabel x_1) x)
    | Except.error e => pure (Except.error e)

Next tactic:
simp [ExceptT.bindCont, @callCC_dummy m _]
instance {ε} [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (ExceptT ε m) where
  callCC_bind_right := by
    intros; simp [callCC, ExceptT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> simp [ExceptT.bindCont, @callCC_dummy m _]
  callCC_bind_left := by
    

Proof state:
m : Type u → Type v
inst✝² : Monad m
ε : Type u
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
⊢ ∀ {α : Type u} (β : Type u) (x : α) (dead : Label α (ExceptT ε m) β → β → ExceptT ε m α),
    (callCC fun f => goto f x >>= dead f) = pure x

Next tactic:
intros
instance {ε} [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (ExceptT ε m) where
  callCC_bind_right := by
    intros; simp [callCC, ExceptT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> simp [ExceptT.bindCont, @callCC_dummy m _]
  callCC_bind_left := by
    intros
    

Proof state:
m : Type u → Type v
inst✝² : Monad m
ε : Type u
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ β✝ : Type u
x✝ : α✝
dead✝ : Label α✝ (ExceptT ε m) β✝ → β✝ → ExceptT ε m α✝
⊢ (callCC fun f => goto f x✝ >>= dead✝ f) = pure x✝

Next tactic:
simp [callCC, ExceptT.callCC, callCC_bind_right, ExceptT.goto_mkLabel, map_eq_bind_pure_comp,
      bind_assoc, @callCC_bind_left m _, Function.comp]
instance {ε} [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (ExceptT ε m) where
  callCC_bind_right := by
    intros; simp [callCC, ExceptT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> simp [ExceptT.bindCont, @callCC_dummy m _]
  callCC_bind_left := by
    intros
    simp [callCC, ExceptT.callCC, callCC_bind_right, ExceptT.goto_mkLabel, map_eq_bind_pure_comp,
      bind_assoc, @callCC_bind_left m _, Function.comp]
    

Proof state:
m : Type u → Type v
inst✝² : Monad m
ε : Type u
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ β✝ : Type u
x✝ : α✝
dead✝ : Label α✝ (ExceptT ε m) β✝ → β✝ → ExceptT ε m α✝
⊢ ExceptT.mk (pure (Except.ok x✝)) = pure x✝

Next tactic:
ext
instance {ε} [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (ExceptT ε m) where
  callCC_bind_right := by
    intros; simp [callCC, ExceptT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> simp [ExceptT.bindCont, @callCC_dummy m _]
  callCC_bind_left := by
    intros
    simp [callCC, ExceptT.callCC, callCC_bind_right, ExceptT.goto_mkLabel, map_eq_bind_pure_comp,
      bind_assoc, @callCC_bind_left m _, Function.comp]
    ext; 

Proof state:
case h
m : Type u → Type v
inst✝² : Monad m
ε : Type u
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ β✝ : Type u
x✝ : α✝
dead✝ : Label α✝ (ExceptT ε m) β✝ → β✝ → ExceptT ε m α✝
⊢ ExceptT.run (ExceptT.mk (pure (Except.ok x✝))) = ExceptT.run (pure x✝)

Next tactic:
rfl
instance {ε} [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (ExceptT ε m) where
  callCC_bind_right := by
    intros; simp [callCC, ExceptT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> simp [ExceptT.bindCont, @callCC_dummy m _]
  callCC_bind_left := by
    intros
    simp [callCC, ExceptT.callCC, callCC_bind_right, ExceptT.goto_mkLabel, map_eq_bind_pure_comp,
      bind_assoc, @callCC_bind_left m _, Function.comp]
    ext; rfl
  callCC_dummy := by 

Proof state:
m : Type u → Type v
inst✝² : Monad m
ε : Type u
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
⊢ ∀ {α β : Type u} (dummy : ExceptT ε m α), (callCC fun x => dummy) = dummy

Next tactic:
intros
instance {ε} [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (ExceptT ε m) where
  callCC_bind_right := by
    intros; simp [callCC, ExceptT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> simp [ExceptT.bindCont, @callCC_dummy m _]
  callCC_bind_left := by
    intros
    simp [callCC, ExceptT.callCC, callCC_bind_right, ExceptT.goto_mkLabel, map_eq_bind_pure_comp,
      bind_assoc, @callCC_bind_left m _, Function.comp]
    ext; rfl
  callCC_dummy := by intros; 

Proof state:
m : Type u → Type v
inst✝² : Monad m
ε : Type u
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ β✝ : Type u
dummy✝ : ExceptT ε m α✝
⊢ (callCC fun x => dummy✝) = dummy✝

Next tactic:
simp [callCC, ExceptT.callCC, @callCC_dummy m _]
instance {ε} [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (ExceptT ε m) where
  callCC_bind_right := by
    intros; simp [callCC, ExceptT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> simp [ExceptT.bindCont, @callCC_dummy m _]
  callCC_bind_left := by
    intros
    simp [callCC, ExceptT.callCC, callCC_bind_right, ExceptT.goto_mkLabel, map_eq_bind_pure_comp,
      bind_assoc, @callCC_bind_left m _, Function.comp]
    ext; rfl
  callCC_dummy := by intros; simp [callCC, ExceptT.callCC, @callCC_dummy m _]; 

Proof state:
m : Type u → Type v
inst✝² : Monad m
ε : Type u
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ β✝ : Type u
dummy✝ : ExceptT ε m α✝
⊢ ExceptT.mk (ExceptT.run dummy✝) = dummy✝

Next tactic:
ext
instance {ε} [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (ExceptT ε m) where
  callCC_bind_right := by
    intros; simp [callCC, ExceptT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> simp [ExceptT.bindCont, @callCC_dummy m _]
  callCC_bind_left := by
    intros
    simp [callCC, ExceptT.callCC, callCC_bind_right, ExceptT.goto_mkLabel, map_eq_bind_pure_comp,
      bind_assoc, @callCC_bind_left m _, Function.comp]
    ext; rfl
  callCC_dummy := by intros; simp [callCC, ExceptT.callCC, @callCC_dummy m _]; ext; 

Proof state:
case h
m : Type u → Type v
inst✝² : Monad m
ε : Type u
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ β✝ : Type u
dummy✝ : ExceptT ε m α✝
⊢ ExceptT.run (ExceptT.mk (ExceptT.run dummy✝)) = ExceptT.run dummy✝

Next tactic:
rfl
instance [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (OptionT m) where
  callCC_bind_right := by
    

Proof state:
m : Type u → Type v
inst✝² : Monad m
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
⊢ ∀ {α ω γ : Type u} (cmd : OptionT m α) (next : Label ω (OptionT m) γ → α → OptionT m ω),
    (callCC fun f => cmd >>= next f) = do
      let x ← cmd
      callCC fun f => next f x

Next tactic:
intros
instance [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (OptionT m) where
  callCC_bind_right := by
    intros; 

Proof state:
m : Type u → Type v
inst✝² : Monad m
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ ω✝ γ✝ : Type u
cmd✝ : OptionT m α✝
next✝ : Label ω✝ (OptionT m) γ✝ → α✝ → OptionT m ω✝
⊢ (callCC fun f => cmd✝ >>= next✝ f) = do
    let x ← cmd✝
    callCC fun f => next✝ f x

Next tactic:
simp [callCC, OptionT.callCC, callCC_bind_right]
instance [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (OptionT m) where
  callCC_bind_right := by
    intros; simp [callCC, OptionT.callCC, callCC_bind_right]; 

Proof state:
m : Type u → Type v
inst✝² : Monad m
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ ω✝ γ✝ : Type u
cmd✝ : OptionT m α✝
next✝ : Label ω✝ (OptionT m) γ✝ → α✝ → OptionT m ω✝
⊢ (OptionT.mk do
      let x ← OptionT.run cmd✝
      callCC fun f =>
          match x with
          | some a => OptionT.run (next✝ (OptionT.mkLabel f) a)
          | none => pure none) =
    do
    let x ← cmd✝
    OptionT.mk (callCC fun x_1 => OptionT.run (next✝ (OptionT.mkLabel x_1) x))

Next tactic:
ext
instance [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (OptionT m) where
  callCC_bind_right := by
    intros; simp [callCC, OptionT.callCC, callCC_bind_right]; ext
    

Proof state:
case h
m : Type u → Type v
inst✝² : Monad m
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ ω✝ γ✝ : Type u
cmd✝ : OptionT m α✝
next✝ : Label ω✝ (OptionT m) γ✝ → α✝ → OptionT m ω✝
⊢ OptionT.run
      (OptionT.mk do
        let x ← OptionT.run cmd✝
        callCC fun f =>
            match x with
            | some a => OptionT.run (next✝ (OptionT.mkLabel f) a)
            | none => pure none) =
    OptionT.run do
      let x ← cmd✝
      OptionT.mk (callCC fun x_1 => OptionT.run (next✝ (OptionT.mkLabel x_1) x))

Next tactic:
dsimp
instance [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (OptionT m) where
  callCC_bind_right := by
    intros; simp [callCC, OptionT.callCC, callCC_bind_right]; ext
    dsimp
    

Proof state:
case h
m : Type u → Type v
inst✝² : Monad m
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ ω✝ γ✝ : Type u
cmd✝ : OptionT m α✝
next✝ : Label ω✝ (OptionT m) γ✝ → α✝ → OptionT m ω✝
⊢ (do
      let x ← OptionT.run cmd✝
      callCC fun f =>
          match x with
          | some a => OptionT.run (next✝ (OptionT.mkLabel f) a)
          | none => pure none) =
    do
    let x ← OptionT.run cmd✝
    match x with
      | some a => callCC fun x => OptionT.run (next✝ (OptionT.mkLabel x) a)
      | none => pure none

Next tactic:
congr with ⟨⟩
instance [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (OptionT m) where
  callCC_bind_right := by
    intros; simp [callCC, OptionT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> 

Proof state:
case h.e_a.h.none
m : Type u → Type v
inst✝² : Monad m
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ ω✝ γ✝ : Type u
cmd✝ : OptionT m α✝
next✝ : Label ω✝ (OptionT m) γ✝ → α✝ → OptionT m ω✝
⊢ (callCC fun f =>
      match none with
      | some a => OptionT.run (next✝ (OptionT.mkLabel f) a)
      | none => pure none) =
    match none with
    | some a => callCC fun x => OptionT.run (next✝ (OptionT.mkLabel x) a)
    | none => pure none

Next tactic:
simp [@callCC_dummy m _]
instance [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (OptionT m) where
  callCC_bind_right := by
    intros; simp [callCC, OptionT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> 

Proof state:
case h.e_a.h.some
m : Type u → Type v
inst✝² : Monad m
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ ω✝ γ✝ : Type u
cmd✝ : OptionT m α✝
next✝ : Label ω✝ (OptionT m) γ✝ → α✝ → OptionT m ω✝
val✝ : α✝
⊢ (callCC fun f =>
      match some val✝ with
      | some a => OptionT.run (next✝ (OptionT.mkLabel f) a)
      | none => pure none) =
    match some val✝ with
    | some a => callCC fun x => OptionT.run (next✝ (OptionT.mkLabel x) a)
    | none => pure none

Next tactic:
simp [@callCC_dummy m _]
instance [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (OptionT m) where
  callCC_bind_right := by
    intros; simp [callCC, OptionT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> simp [@callCC_dummy m _]
  callCC_bind_left := by
    

Proof state:
m : Type u → Type v
inst✝² : Monad m
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
⊢ ∀ {α : Type u} (β : Type u) (x : α) (dead : Label α (OptionT m) β → β → OptionT m α),
    (callCC fun f => goto f x >>= dead f) = pure x

Next tactic:
intros
instance [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (OptionT m) where
  callCC_bind_right := by
    intros; simp [callCC, OptionT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> simp [@callCC_dummy m _]
  callCC_bind_left := by
    intros;
    

Proof state:
m : Type u → Type v
inst✝² : Monad m
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ β✝ : Type u
x✝ : α✝
dead✝ : Label α✝ (OptionT m) β✝ → β✝ → OptionT m α✝
⊢ (callCC fun f => goto f x✝ >>= dead✝ f) = pure x✝

Next tactic:
simp [callCC, OptionT.callCC, callCC_bind_right, OptionT.goto_mkLabel, map_eq_bind_pure_comp,
      bind_assoc, @callCC_bind_left m _, Function.comp]
instance [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (OptionT m) where
  callCC_bind_right := by
    intros; simp [callCC, OptionT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> simp [@callCC_dummy m _]
  callCC_bind_left := by
    intros;
    simp [callCC, OptionT.callCC, callCC_bind_right, OptionT.goto_mkLabel, map_eq_bind_pure_comp,
      bind_assoc, @callCC_bind_left m _, Function.comp]
    

Proof state:
m : Type u → Type v
inst✝² : Monad m
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ β✝ : Type u
x✝ : α✝
dead✝ : Label α✝ (OptionT m) β✝ → β✝ → OptionT m α✝
⊢ OptionT.mk (pure (some x✝)) = pure x✝

Next tactic:
ext
instance [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (OptionT m) where
  callCC_bind_right := by
    intros; simp [callCC, OptionT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> simp [@callCC_dummy m _]
  callCC_bind_left := by
    intros;
    simp [callCC, OptionT.callCC, callCC_bind_right, OptionT.goto_mkLabel, map_eq_bind_pure_comp,
      bind_assoc, @callCC_bind_left m _, Function.comp]
    ext; 

Proof state:
case h
m : Type u → Type v
inst✝² : Monad m
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ β✝ : Type u
x✝ : α✝
dead✝ : Label α✝ (OptionT m) β✝ → β✝ → OptionT m α✝
⊢ OptionT.run (OptionT.mk (pure (some x✝))) = OptionT.run (pure x✝)

Next tactic:
rfl
instance [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (OptionT m) where
  callCC_bind_right := by
    intros; simp [callCC, OptionT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> simp [@callCC_dummy m _]
  callCC_bind_left := by
    intros;
    simp [callCC, OptionT.callCC, callCC_bind_right, OptionT.goto_mkLabel, map_eq_bind_pure_comp,
      bind_assoc, @callCC_bind_left m _, Function.comp]
    ext; rfl
  callCC_dummy := by 

Proof state:
m : Type u → Type v
inst✝² : Monad m
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
⊢ ∀ {α β : Type u} (dummy : OptionT m α), (callCC fun x => dummy) = dummy

Next tactic:
intros
instance [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (OptionT m) where
  callCC_bind_right := by
    intros; simp [callCC, OptionT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> simp [@callCC_dummy m _]
  callCC_bind_left := by
    intros;
    simp [callCC, OptionT.callCC, callCC_bind_right, OptionT.goto_mkLabel, map_eq_bind_pure_comp,
      bind_assoc, @callCC_bind_left m _, Function.comp]
    ext; rfl
  callCC_dummy := by intros; 

Proof state:
m : Type u → Type v
inst✝² : Monad m
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ β✝ : Type u
dummy✝ : OptionT m α✝
⊢ (callCC fun x => dummy✝) = dummy✝

Next tactic:
simp [callCC, OptionT.callCC, @callCC_dummy m _]
instance [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (OptionT m) where
  callCC_bind_right := by
    intros; simp [callCC, OptionT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> simp [@callCC_dummy m _]
  callCC_bind_left := by
    intros;
    simp [callCC, OptionT.callCC, callCC_bind_right, OptionT.goto_mkLabel, map_eq_bind_pure_comp,
      bind_assoc, @callCC_bind_left m _, Function.comp]
    ext; rfl
  callCC_dummy := by intros; simp [callCC, OptionT.callCC, @callCC_dummy m _]; 

Proof state:
m : Type u → Type v
inst✝² : Monad m
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ β✝ : Type u
dummy✝ : OptionT m α✝
⊢ OptionT.mk (OptionT.run dummy✝) = dummy✝

Next tactic:
ext
instance [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (OptionT m) where
  callCC_bind_right := by
    intros; simp [callCC, OptionT.callCC, callCC_bind_right]; ext
    dsimp
    congr with ⟨⟩ <;> simp [@callCC_dummy m _]
  callCC_bind_left := by
    intros;
    simp [callCC, OptionT.callCC, callCC_bind_right, OptionT.goto_mkLabel, map_eq_bind_pure_comp,
      bind_assoc, @callCC_bind_left m _, Function.comp]
    ext; rfl
  callCC_dummy := by intros; simp [callCC, OptionT.callCC, @callCC_dummy m _]; ext; 

Proof state:
case h
m : Type u → Type v
inst✝² : Monad m
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
α✝ β✝ : Type u
dummy✝ : OptionT m α✝
⊢ OptionT.run (OptionT.mk (OptionT.run dummy✝)) = OptionT.run dummy✝

Next tactic:
rfl
theorem WriterT.goto_mkLabel {α β ω : Type _} [EmptyCollection ω] (x : Label (α × ω) m β) (i : α) :
    goto (WriterT.mkLabel x) i = monadLift (goto x (i, ∅)) := by 

Proof state:
m : Type u → Type v
inst✝¹ : Monad m
α : Type u_1
β ω : Type u
inst✝ : EmptyCollection ω
x : Label (α × ω) m β
i : α
⊢ goto (mkLabel x) i = monadLift (goto x (i, ∅))

Next tactic:
cases x
theorem WriterT.goto_mkLabel {α β ω : Type _} [EmptyCollection ω] (x : Label (α × ω) m β) (i : α) :
    goto (WriterT.mkLabel x) i = monadLift (goto x (i, ∅)) := by cases x; 

Proof state:
case mk
m : Type u → Type v
inst✝¹ : Monad m
α : Type u_1
β ω : Type u
inst✝ : EmptyCollection ω
i : α
apply✝ : α × ω → m β
⊢ goto (mkLabel { apply := apply✝ }) i = monadLift (goto { apply := apply✝ } (i, ∅))

Next tactic:
rfl
theorem WriterT.goto_mkLabel' {α β ω : Type _} [Monoid ω] (x : Label (α × ω) m β) (i : α) :
    goto (WriterT.mkLabel' x) i = monadLift (goto x (i, 1)) := by 

Proof state:
m : Type u → Type v
inst✝¹ : Monad m
α : Type u_1
β ω : Type u
inst✝ : Monoid ω
x : Label (α × ω) m β
i : α
⊢ goto (mkLabel' x) i = monadLift (goto x (i, 1))

Next tactic:
cases x
theorem WriterT.goto_mkLabel' {α β ω : Type _} [Monoid ω] (x : Label (α × ω) m β) (i : α) :
    goto (WriterT.mkLabel' x) i = monadLift (goto x (i, 1)) := by cases x; 

Proof state:
case mk
m : Type u → Type v
inst✝¹ : Monad m
α : Type u_1
β ω : Type u
inst✝ : Monoid ω
i : α
apply✝ : α × ω → m β
⊢ goto (mkLabel' { apply := apply✝ }) i = monadLift (goto { apply := apply✝ } (i, 1))

Next tactic:
rfl
theorem StateT.goto_mkLabel {α β σ : Type u} (x : Label (α × σ) m (β × σ)) (i : α) :
    goto (StateT.mkLabel x) i = StateT.mk (fun s => goto x (i, s)) := by 

Proof state:
m : Type u → Type v
inst✝ : Monad m
α β σ : Type u
x : Label (α × σ) m (β × σ)
i : α
⊢ goto (mkLabel x) i = StateT.mk fun s => goto x (i, s)

Next tactic:
cases x
theorem StateT.goto_mkLabel {α β σ : Type u} (x : Label (α × σ) m (β × σ)) (i : α) :
    goto (StateT.mkLabel x) i = StateT.mk (fun s => goto x (i, s)) := by cases x; 

Proof state:
case mk
m : Type u → Type v
inst✝ : Monad m
α β σ : Type u
i : α
apply✝ : α × σ → m (β × σ)
⊢ goto (mkLabel { apply := apply✝ }) i = StateT.mk fun s => goto { apply := apply✝ } (i, s)

Next tactic:
rfl
instance {σ} [MonadCont m] [LawfulMonadCont m] : LawfulMonadCont (StateT σ m) where
  callCC_bind_right := by
    

Proof state:
m : Type u → Type v
inst✝² : Monad m
σ : Type u
inst✝¹ : MonadCont m
inst✝ : LawfulMonadCont m
⊢ ∀ {α ω γ : Type u} (cmd : StateT σ m α) (next : Label ω (StateT σ m) γ → α → StateT σ m ω),
    (callCC fun f => cmd >>= next f) = do
      let x ← cmd
      callCC fun f => next f x

Next tactic:
intros