Skip to content

Commit

Permalink
minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
affeldt-aist committed Jul 10, 2024
1 parent 9ae4ea0 commit b0798ad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion impredicative_set/imonad_lib.v
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ Qed.

Definition commute {M : monad} A B (m : M A) (n : M B) C (f : A -> B -> M C) : Prop :=
m >>= (fun x => n >>= (fun y => f x y)) =
n >>= (fun y => m >>= (fun x => f x y)) :> M _.
n >>= (fun y => m >>= (fun x => f x y)).

Definition preserves {M : monad} (A B : UU0) (f : A -> M A) (g : A -> B) :=
forall x, (f x >>= fun y => Ret (y, g y)) = (f x >>= fun y => Ret (y, g x)).
Expand Down
2 changes: 1 addition & 1 deletion monad_lib.v
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ Qed.

Definition commute {M : monad} A B (m : M A) (n : M B) C (f : A -> B -> M C) : Prop :=
m >>= (fun x => n >>= (fun y => f x y)) =
n >>= (fun y => m >>= (fun x => f x y)) :> M _.
n >>= (fun y => m >>= (fun x => f x y)).

Definition preserves {M : monad} (A B : UU0) (f : A -> M A) (g : A -> B) :=
forall x, (f x >>= fun y => Ret (y, g y)) = (f x >>= fun y => Ret (y, g x)).
Expand Down
2 changes: 1 addition & 1 deletion monad_transformer.v
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Lemma MS_bindE [S : UU0] [M : monad] [A B : UU0] (m : MS S M A) (f : A -> MS S M
(m >>= f) s = m s >>= uncurry f.
Proof. by []. Qed.

Definition stateT (S : UU0) : monad -> monad := MS S.
Definition stateT : UU0 -> monad -> monad := MS.

HB.instance Definition _ (S : UU0) := isMonadT.Build
(stateT S) (@liftS S).
Expand Down

0 comments on commit b0798ad

Please sign in to comment.