You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: change show tactic to work as documented (#7395)
This PR changes the `show t` tactic to match its documentation.
Previously it was a synonym for `change t`, but now it finds the first
goal that unifies with the term `t` and moves it to the front of the
goal list.
protectedtheoremseqLeft_eq {α β ε : Type u} {m : Type u → Type v} [Monad m] [LawfulMonad m] (x : ExceptT ε m α) (y : ExceptT ε m β) : x <* y = const β <$> x <*> y := by
61
-
show (x >>= fun a => y >>= fun _ => pure a) = (const (α := α) β <$> x) >>= fun f => f <$> y
61
+
change (x >>= fun a => y >>= fun _ => pure a) = (const (α := α) β <$> x) >>= fun f => f <$> y
62
62
rw [← ExceptT.bind_pure_comp]
63
63
apply ext
64
64
simp [run_bind]
@@ -70,7 +70,7 @@ protected theorem seqLeft_eq {α β ε : Type u} {m : Type u → Type v} [Monad
70
70
cases b <;> simp [comp, Except.map, const]
71
71
72
72
protectedtheoremseqRight_eq [Monad m] [LawfulMonad m] (x : ExceptT ε m α) (y : ExceptT ε m β) : x *> y = const α id <$> x <*> y := by
73
-
show (x >>= fun _ => y) = (const α id <$> x) >>= fun f => f <$> y
73
+
change (x >>= fun _ => y) = (const α id <$> x) >>= fun f => f <$> y
(monadMap @f x : StateT σ m α).run s = monadMap @f (x.run s) := rfl
207
207
208
208
@[simp]theoremrun_seq {α β σ : Type u} [Monad m] [LawfulMonad m] (f : StateT σ m (α → β)) (x : StateT σ m α) (s : σ) : (f <*> x).run s = (f.run s >>= fun fs => (fun (p : α × σ) => (fs.1 p.1, p.2)) <$> x.run fs.2) := by
209
-
show (f >>= fun g => g <$> x).run s = _
209
+
change (f >>= fun g => g <$> x).run s = _
210
210
simp
211
211
212
212
@[simp]theoremrun_seqRight [Monad m] (x : StateT σ m α) (y : StateT σ m β) (s : σ) : (x *> y).run s = (x.run s >>= fun p => y.run p.2) := by
213
-
show (x >>= fun _ => y).run s = _
213
+
change (x >>= fun _ => y).run s = _
214
214
simp
215
215
216
216
@[simp]theoremrun_seqLeft {α β σ : Type u} [Monad m] (x : StateT σ m α) (y : StateT σ m β) (s : σ) : (x <* y).run s = (x.run s >>= fun p => y.run p.2 >>= fun p' => pure (p.1, p'.2)) := by
217
-
show (x >>= fun a => y >>= fun _ => pure a).run s = _
217
+
change (x >>= fun a => y >>= fun _ => pure a).run s = _
218
218
simp
219
219
220
220
theoremseqRight_eq [Monad m] [LawfulMonad m] (x : StateT σ m α) (y : StateT σ m β) : x *> y = const α id <$> x <*> y := by
0 commit comments