statement
stringlengths
1
1.02k
proof
stringlengths
0
5.19k
type
stringclasses
13 values
symbolic_name
stringlengths
1
30
library
stringclasses
15 values
filename
stringclasses
117 values
imports
listlengths
0
16
deps
listlengths
0
16
docstring
stringclasses
50 values
source_url
stringclasses
1 value
commit
stringclasses
1 value
nat_Show : Show nat
:= { show := nat_show }.
Instance
nat_Show
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "Show", "nat_show" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Show_positive : Show positive
:= fun x => nat_show (Pos.to_nat x).
Instance
Show_positive
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "Show", "nat_show", "to_nat" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Show_Z : Show Z
:= fun x => match x with | Z0 => "0"%char | Zpos p => show p | Zneg p => "-"%char << show p end.
Instance
Show_Z
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "Show" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
pair_Show@{a m t} {A : Type@{a}} {B : Type@{a}} {AS:Show A} {BS:Show B} : Show@{_ t} (A*B)
:= fun p => let (a,b) := p in "("%char << show a << ","%char << show b << ")"%char.
Definition
pair_Show
Programming
theories/Programming/Show.v
[ "Coq", "Ascii", "String", "Coq.Program", "Wf", "BinPos", "ZArith", "ExtLib.Structures.Monoid", "ExtLib.Structures.Reducible", "ExtLib.Programming.Injection", "ExtLib.Data.Char", "ExtLib.Data.String", "ExtLib.Data.Fun", "ExtLib.Core.RelDec", "ShowNotation" ]
[ "Show" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Ctor {T : Type} (ls : list {x : Type & T -> x}) : Type
:= match ls with | nil => T | a :: b => (projT1 a) -> Ctor b end.
Fixpoint
Ctor
Programming
theories/Programming/With.v
[ "Coq.Lists.List" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Struct (T : Type) : Type
:= { fields : list {x : Type & T -> x} ; ctor : Ctor fields }.
Class
Struct
Programming
theories/Programming/With.v
[ "Coq.Lists.List" ]
[ "Ctor" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Mem : list {x : Type & T -> x} -> Type
:= | Here : forall a b, Mem ((@existT _ _ U a) :: b) | Next : forall a b, Mem b -> Mem (a :: b).
Inductive
Mem
Programming
theories/Programming/With.v
[ "Coq.Lists.List" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
applyRest (f : list {x : Type & T -> x}) : Ctor f -> T
:= match f as f return Ctor f -> T with | nil => fun x => x | a :: b => fun acc => applyRest b (acc ((projT2 a) rec)) end.
Fixpoint
applyRest
Programming
theories/Programming/With.v
[ "Coq.Lists.List" ]
[ "Ctor" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
applyUntil (f : list {x : Type & T -> x}) (n : Mem U f) : Ctor f -> T
:= match n in Mem _ f return Ctor f -> T with | Here a b => fun ctor => applyRest b (ctor v) | Next a b i => fun ctor => applyUntil b i (ctor ((projT2 a) rec)) end.
Fixpoint
applyUntil
Programming
theories/Programming/With.v
[ "Coq.Lists.List" ]
[ "Ctor", "Mem", "applyRest" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
structWith {U : Type} (v : U) (n : Mem U fields) : T
:= applyUntil v fields n ctor.
Definition
structWith
Programming
theories/Programming/With.v
[ "Coq.Lists.List" ]
[ "Mem", "applyUntil" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Accessor {T U : Type} {strt : Struct T} (f : T -> U) : Type
:= { acc : Mem T U fields }.
Class
Accessor
Programming
theories/Programming/With.v
[ "Coq.Lists.List" ]
[ "Mem", "Struct" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
wrapWith {T U : Type} (t : T) (f : T -> U) (v : U) (_strt : Struct T) (_acc : Accessor f)
:= @structWith _ _ t _ v acc.
Definition
wrapWith
Programming
theories/Programming/With.v
[ "Coq.Lists.List" ]
[ "Accessor", "Struct", "structWith" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"{$ x 'with' y ':=' v $}"
:= (@wrapWith _ _ x y v _ _) : struct_scope.
Notation
{$ x 'with' y ':=' v $}
Programming
theories/Programming/With.v
[ "Coq.Lists.List" ]
[ "wrapWith" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
wf_anti_sym T (R : T -> T -> Prop) (wf : well_founded R) : Irreflexive R.
Proof. refine (fun a => (@Fix _ _ wf (fun x => x = a -> R x a ->False) (fun x rec pf pfr => rec _ match eq_sym pf in _ = t return R x t with | eq_refl => pfr end pf pfr)) a eq_refl). Qed.
Lemma
wf_anti_sym
Recur
theories/Recur/Facts.v
[ "Coq.Classes.RelationClasses" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
guard A (R : A -> A -> Prop) (n : nat) (wfR : well_founded R) {struct n}: well_founded R
:= match n with | 0 => wfR | S n => fun x => Acc_intro x (fun y _ => guard n (guard n wfR) y) end.
Fixpoint
guard
Recur
theories/Recur/GenRec.v
[ "Coq.Classes.RelationClasses" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Hstep : forall (x : A) (f g : forall y : A, R y x -> P y), (forall (y : A) (p : R y x), r (f y p) (g y p)) -> r (@F x f) (@F x g).
Hypothesis
Hstep
Recur
theories/Recur/GenRec.v
[ "Coq.Classes.RelationClasses" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Fix_F_equiv_inv : forall (x : A) (r' s' : Acc R x), r (Fix_F _ F r') (Fix_F _ F s').
Proof. intro x; induction (Rwf x); intros. rewrite <- (Fix_F_eq _ F r'); rewrite <- (Fix_F_eq _ F s'); intros. eapply Hstep. eauto. Qed.
Lemma
Fix_F_equiv_inv
Recur
theories/Recur/GenRec.v
[ "Coq.Classes.RelationClasses" ]
[ "Hstep" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Fix_equiv : forall x : A, r (Fix Rwf P F x) (@F x (fun (y : A) (_ : R y x) => Fix Rwf P F y)).
Proof. intro x; unfold Fix. rewrite <- Fix_F_eq. apply Hstep; intros. apply Fix_F_equiv_inv. Qed.
Theorem
Fix_equiv
Recur
theories/Recur/GenRec.v
[ "Coq.Classes.RelationClasses" ]
[ "Fix_F_equiv_inv", "Hstep", "apply" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
well_founded_R : well_founded R.
Hypothesis
well_founded_R
Recur
theories/Recur/Measure.v
[ "Coq.Classes", "RelationClasses", "Coq.Arith", "Wf_nat" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
compose (a b : T) : Prop
:= R (f a) (f b).
Definition
compose
Recur
theories/Recur/Measure.v
[ "Coq.Classes", "RelationClasses", "Coq.Arith", "Wf_nat" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
well_founded_compose : well_founded compose
:= (fun t => (@Fix _ R well_founded_R (fun x => forall y, f y = x -> Acc compose y) (fun x recur y pf => @Acc_intro _ compose y (fun y' (pf' : R (f y') (f y)) => recur _ match pf in _ = t return R (f y') t with ...
Definition
well_founded_compose
Recur
theories/Recur/Measure.v
[ "Coq.Classes", "RelationClasses", "Coq.Arith", "Wf_nat" ]
[ "compose", "well_founded_R" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
mlt : T -> T -> Prop
:= compose m lt.
Definition
mlt
Recur
theories/Recur/Measure.v
[ "Coq.Classes", "RelationClasses", "Coq.Arith", "Wf_nat" ]
[ "compose", "lt" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
well_founded_mlt : well_founded mlt
:= @well_founded_compose T nat m lt Wf_nat.lt_wf.
Definition
well_founded_mlt
Recur
theories/Recur/Measure.v
[ "Coq.Classes", "RelationClasses", "Coq.Arith", "Wf_nat" ]
[ "lt", "mlt", "well_founded_compose" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
wf_rightTrans : well_founded (rightTrans R).
Proof. red. eapply Fix. eapply wf_R. clear. intros. constructor. intros. revert H. induction H0. { intros. eauto. } { intros. eapply IHrightTrans; clear IHrightTrans. specialize (H1 _ H). inversion H1. intros. eapply H2. eapply RTFin. eassumption. } Defined.
Theorem
wf_rightTrans
Recur
theories/Recur/Relation.v
[ "ExtLib.Relations.TransitiveClosure" ]
[ "rightTrans" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
wf_leftTrans : well_founded (leftTrans R).
Proof. red. eapply Fix. eapply wf_R. clear. intros. constructor. intros. revert H. induction H0. { intros. eauto. } { intros. eapply IHleftTrans; clear IHleftTrans. intros. eapply H1. auto. eapply LTFin. auto. } Defined.
Theorem
wf_leftTrans
Recur
theories/Recur/Relation.v
[ "ExtLib.Relations.TransitiveClosure" ]
[ "leftTrans" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
compose (x z : T) : Prop
:= exists y, R1 x y /\ R2 y z.
Definition
compose
Relations
theories/Relations/Compose.v
[]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
makeRefl (x : T) : T -> Prop
:= | RRefl : makeRefl x x | RStep : forall y, R x y -> makeRefl x y.
Inductive
makeRefl
Relations
theories/Relations/TransitiveClosure.v
[ "Coq.Classes.RelationClasses", "Coq.Setoids.Setoid" ]
[]
Reflexivity *
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Refl_makeRefl : Reflexive makeRefl.
Proof. constructor. Qed.
Instance
Refl_makeRefl
Relations
theories/Relations/TransitiveClosure.v
[ "Coq.Classes.RelationClasses", "Coq.Setoids.Setoid" ]
[ "makeRefl" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Refl_makeTrans : Transitive R -> Transitive makeRefl.
Proof. intro. intro. intros. inversion H0; clear H0; subst; auto. inversion H1; clear H1; subst; auto using RStep. apply RStep. etransitivity; eauto. Qed.
Instance
Refl_makeTrans
Relations
theories/Relations/TransitiveClosure.v
[ "Coq.Classes.RelationClasses", "Coq.Setoids.Setoid" ]
[ "apply", "makeRefl" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
makeTrans (x y : T) : Prop
:= | TStep : R x y -> makeTrans x y | TTrans : forall z, makeTrans x z -> makeTrans z y -> makeTrans x y.
Inductive
makeTrans
Relations
theories/Relations/TransitiveClosure.v
[ "Coq.Classes.RelationClasses", "Coq.Setoids.Setoid" ]
[]
Transitivity *
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Trans_makeTrans : Transitive makeTrans.
Proof. intro. intros; eapply TTrans; eassumption. Qed.
Instance
Trans_makeTrans
Relations
theories/Relations/TransitiveClosure.v
[ "Coq.Classes.RelationClasses", "Coq.Setoids.Setoid" ]
[ "makeTrans" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Trans_makeRefl : Reflexive R -> Reflexive makeTrans.
Proof. intro. intro. apply TStep. reflexivity. Qed.
Instance
Trans_makeRefl
Relations
theories/Relations/TransitiveClosure.v
[ "Coq.Classes.RelationClasses", "Coq.Setoids.Setoid" ]
[ "apply", "makeTrans" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
leftTrans (x y : T) : Prop
:= | LTFin : R x y -> leftTrans x y | LTStep : forall z, R x z -> leftTrans z y -> leftTrans x y.
Inductive
leftTrans
Relations
theories/Relations/TransitiveClosure.v
[ "Coq.Classes.RelationClasses", "Coq.Setoids.Setoid" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
rightTrans (x y : T) : Prop
:= | RTFin : R x y -> rightTrans x y | RTStep : forall z, rightTrans x z -> R z y -> rightTrans x y.
Inductive
rightTrans
Relations
theories/Relations/TransitiveClosure.v
[ "Coq.Classes.RelationClasses", "Coq.Setoids.Setoid" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
leftTrans_rightTrans_acc x y (l : leftTrans y x) : forall z, rightTrans z y -> rightTrans z x
:= match l with | LTFin pf => fun z pfR => RTStep pfR pf | LTStep _ pf pfL => fun z pfR => leftTrans_rightTrans_acc pfL (RTStep pfR pf) end.
Fixpoint
leftTrans_rightTrans_acc
Relations
theories/Relations/TransitiveClosure.v
[ "Coq.Classes.RelationClasses", "Coq.Setoids.Setoid" ]
[ "leftTrans", "rightTrans" ]
Equivalence of definitions of transitivity *
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
rightTrans_leftTrans_acc x y (l : rightTrans x y) : forall z, leftTrans y z -> leftTrans x z
:= match l with | RTFin pf => fun z pfR => LTStep pf pfR | RTStep _ pf pfL => fun z pfR => rightTrans_leftTrans_acc pf (LTStep pfL pfR) end.
Fixpoint
rightTrans_leftTrans_acc
Relations
theories/Relations/TransitiveClosure.v
[ "Coq.Classes.RelationClasses", "Coq.Setoids.Setoid" ]
[ "leftTrans", "rightTrans" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
leftTrans_rightTrans : forall x y, leftTrans x y <-> rightTrans x y.
Proof. split. { destruct 1. apply RTFin; assumption. eapply leftTrans_rightTrans_acc. eassumption. eapply RTFin. eassumption. } { destruct 1. apply LTFin. assumption. eapply rightTrans_leftTrans_acc. eassumption. eapply LTFin. eassumption. } Qed.
Theorem
leftTrans_rightTrans
Relations
theories/Relations/TransitiveClosure.v
[ "Coq.Classes.RelationClasses", "Coq.Setoids.Setoid" ]
[ "apply", "leftTrans", "leftTrans_rightTrans_acc", "rightTrans", "rightTrans_leftTrans_acc", "split" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
leftTrans_makeTrans_acc x y (l : leftTrans x y) : makeTrans x y
:= match l with | LTFin pf => TStep pf | LTStep _ pf pfL => TTrans (TStep pf) (leftTrans_makeTrans_acc pfL) end.
Fixpoint
leftTrans_makeTrans_acc
Relations
theories/Relations/TransitiveClosure.v
[ "Coq.Classes.RelationClasses", "Coq.Setoids.Setoid" ]
[ "leftTrans", "makeTrans" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
leftTrans_trans x y (l : leftTrans x y) : forall z (r : leftTrans y z), leftTrans x z
:= match l with | LTFin pf => fun _ pfL => LTStep pf pfL | LTStep _ pf pfL => fun _ pfR => LTStep pf (leftTrans_trans pfL pfR) end.
Fixpoint
leftTrans_trans
Relations
theories/Relations/TransitiveClosure.v
[ "Coq.Classes.RelationClasses", "Coq.Setoids.Setoid" ]
[ "leftTrans" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
makeTrans_leftTrans : forall s s', makeTrans s s' <-> leftTrans s s'.
Proof. split; intros. { induction H. eapply LTFin. eassumption. eapply leftTrans_trans; eassumption. } { apply leftTrans_makeTrans_acc. assumption. } Qed.
Theorem
makeTrans_leftTrans
Relations
theories/Relations/TransitiveClosure.v
[ "Coq.Classes.RelationClasses", "Coq.Setoids.Setoid" ]
[ "apply", "leftTrans", "leftTrans_makeTrans_acc", "leftTrans_trans", "makeTrans", "split" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
makeTrans_rightTrans : forall s s', makeTrans s s' <-> rightTrans s s'.
Proof. intros. etransitivity. apply makeTrans_leftTrans. apply leftTrans_rightTrans. Qed.
Theorem
makeTrans_rightTrans
Relations
theories/Relations/TransitiveClosure.v
[ "Coq.Classes.RelationClasses", "Coq.Setoids.Setoid" ]
[ "apply", "leftTrans_rightTrans", "makeTrans", "makeTrans_leftTrans", "rightTrans" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
RTStep_left : forall x y z : T, R x y -> rightTrans y z -> rightTrans x z.
intros. revert H. revert x. induction H0. { intros. eapply RTStep. eapply RTFin. eassumption. eassumption. } { intros. eapply RTStep. eapply IHrightTrans. eassumption. eassumption. } Defined.
Definition
RTStep_left
Relations
theories/Relations/TransitiveClosure.v
[ "Coq.Classes.RelationClasses", "Coq.Setoids.Setoid" ]
[ "rightTrans" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
makeTrans_idem : forall s s', makeTrans (makeTrans R) s s' <-> makeTrans R s s'.
Proof. split. { induction 1; eauto using TTrans. } { eapply TStep. } Qed.
Theorem
makeTrans_idem
Relations
theories/Relations/TransitiveClosure.v
[ "Coq.Classes.RelationClasses", "Coq.Setoids.Setoid" ]
[ "makeTrans", "split" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
makeTrans_makeRefl_comm : forall s s', makeTrans (makeRefl R) s s' <-> makeRefl (makeTrans R) s s'.
Proof. split. { induction 1; repeat match goal with | [ H : makeRefl _ _ _ |- _ ] => inversion H; clear H; subst end; eauto using RRefl, RStep, TStep, TTrans. } { intros. inversion H; clear H; subst; auto. apply TStep. apply RRefl. induction H0; eauto using RStep, TSt...
Theorem
makeTrans_makeRefl_comm
Relations
theories/Relations/TransitiveClosure.v
[ "Coq.Classes.RelationClasses", "Coq.Setoids.Setoid" ]
[ "apply", "makeRefl", "makeTrans", "split" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
makeRefl_idem : forall s s', makeRefl (makeRefl R) s s' <-> makeRefl R s s'.
Proof. split; inversion 1; subst; eauto using RStep, RRefl. Qed.
Theorem
makeRefl_idem
Relations
theories/Relations/TransitiveClosure.v
[ "Coq.Classes.RelationClasses", "Coq.Setoids.Setoid" ]
[ "makeRefl", "split" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Applicative@{d c} (T : Type@{d} -> Type@{c})
:= { pure : forall {A : Type@{d}}, A -> T A ; ap : forall {A B : Type@{d}}, T (A -> B) -> T A -> T B }.
Class
Applicative
Structures
theories/Structures/Applicative.v
[ "ExtLib", "Functor", "ApplicativeNotation" ]
[ "pure" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"f <*> x"
:= (ap f x) (at level 52, left associativity).
Notation
f <*> x
Structures
theories/Structures/Applicative.v
[ "ExtLib", "Functor", "ApplicativeNotation" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
liftA@{d c} {T : Type@{d} -> Type@{c}} {AT:Applicative@{d c} T} {A B : Type@{d}} (f:A -> B) (aT:T A) : T B
:= pure f <*> aT.
Definition
liftA
Structures
theories/Structures/Applicative.v
[ "ExtLib", "Functor", "ApplicativeNotation" ]
[ "Applicative", "pure" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
liftA2@{d c} {T : Type@{d} -> Type@{c}} {AT:Applicative@{d c} T} {A B C : Type@{d}} (f:A -> B -> C) (aT:T A) (bT:T B) : T C
:= liftA f aT <*> bT.
Definition
liftA2
Structures
theories/Structures/Applicative.v
[ "ExtLib", "Functor", "ApplicativeNotation" ]
[ "Applicative", "liftA" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Functor_Applicative@{} : Functor T
:= { fmap := @liftA _ _ }.
Instance
Functor_Applicative
Structures
theories/Structures/Applicative.v
[ "ExtLib", "Functor", "ApplicativeNotation" ]
[ "Functor", "liftA" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
LeftUnit : Type
:= lunit : forall a, equ (op u a) a.
Class
LeftUnit
Structures
theories/Structures/BinOps.v
[]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
RightUnit : Type
:= runit : forall a, equ (op a u) a.
Class
RightUnit
Structures
theories/Structures/BinOps.v
[]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Commutative : Type
:= commut : forall a b, equ (op a b) (op b a).
Class
Commutative
Structures
theories/Structures/BinOps.v
[]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Associative : Type
:= assoc : forall a b c, equ (op (op a b) c) (op a (op b c)).
Class
Associative
Structures
theories/Structures/BinOps.v
[]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
CoFunctor@{d c} (F : Type@{d} -> Type@{c}) : Type
:= { cofmap : forall {A B : Type@{d}}, (B -> A) -> F A -> F B }.
Class
CoFunctor
Structures
theories/Structures/CoFunctor.v
[ "ExtLib.Core.Any" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
CoPFunctor@{d c p} (F : Type@{d} -> Type@{c}) : Type
:= { CoFunP : Type@{d} -> Type@{p} ; copfmap : forall {A B : Type@{d}} {P : CoFunP B}, (B -> A) -> F A -> F B }.
Class
CoPFunctor
Structures
theories/Structures/CoFunctor.v
[ "ExtLib.Core.Any" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
CoPFunctor_From_CoFunctor@{d c p} (F : Type@{d} -> Type@{c}) (F_ : CoFunctor@{d c} F) : CoPFunctor@{d c p} F
:= {| CoFunP := Any@{p} ; copfmap := fun _ _ _ f x => cofmap f x |}.
Instance
CoPFunctor_From_CoFunctor
Structures
theories/Structures/CoFunctor.v
[ "ExtLib.Core.Any" ]
[ "Any", "CoFunctor", "CoPFunctor" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
CoMonad (m : Type -> Type) : Type
:= { extract : forall {A}, m A -> A ; extend : forall {A B}, (m A -> B) -> m A -> m B }.
Class
CoMonad
Structures
theories/Structures/CoMonad.v
[]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
coret {A: Type}
:= extract (A:=A).
Definition
coret
Structures
theories/Structures/CoMonad.v
[]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
cobind {A B: Type}
:= extend (A:=A) (B:=B).
Definition
cobind
Structures
theories/Structures/CoMonad.v
[]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
CoMonadLaws
:= { extend_extract: forall (A B:Type), extend (B:=A) extract = id ; extract_extend: forall (A B:Type) {f}, extract ∘ extend (A:=A) (B:=B) f = f; extend_extend:forall (A B:Type) {f g}, extend (A:=B) (B:=A) f ∘ extend (A:=A) g = extend (f ∘ extend g) }.
Class
CoMonadLaws
Structures
theories/Structures/CoMonadLaws.v
[ "Coq.Program.Basics", "ExtLib.Structures.CoMonad" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
UIP_refl : forall {x : A} (p1 : x = x), p1 = refl_equal _.
intros. eapply Eqdep_dec.UIP_dec. apply EquivDec.equiv_dec. Qed.
Theorem
UIP_refl
Structures
theories/Structures/EqDep.v
[ "Coq.Logic", "Eqdep_dec", "EquivDec", "ExtLib.Core.RelDec", "ExtLib.Tactics.Consider" ]
[ "apply" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
UIP_equal : forall {x y : A} (p1 p2 : x = y), p1 = p2.
eapply Eqdep_dec.UIP_dec. apply EquivDec.equiv_dec. Qed.
Theorem
UIP_equal
Structures
theories/Structures/EqDep.v
[ "Coq.Logic", "Eqdep_dec", "EquivDec", "ExtLib.Core.RelDec", "ExtLib.Tactics.Consider" ]
[ "apply" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
inj_pair2 : forall (P:A -> Type) (p:A) (x y:P p), existT P p x = existT P p y -> x = y.
Proof. intros. eapply Eqdep_dec.inj_pair2_eq_dec; auto. Qed.
Lemma
inj_pair2
Structures
theories/Structures/EqDep.v
[ "Coq.Logic", "Eqdep_dec", "EquivDec", "ExtLib.Core.RelDec", "ExtLib.Tactics.Consider" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
equiv_dec_refl_left : forall a, @EquivDec.equiv_dec _ _ _ dec a a = left eq_refl.
Proof. intros. destruct (EquivDec.equiv_dec a a); try congruence. f_equal. apply UIP_equal. Qed.
Theorem
equiv_dec_refl_left
Structures
theories/Structures/EqDep.v
[ "Coq.Logic", "Eqdep_dec", "EquivDec", "ExtLib.Core.RelDec", "ExtLib.Tactics.Consider" ]
[ "UIP_equal", "apply" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
EqDec_RelDec : EquivDec.EqDec T (@eq T).
Proof. red; intros. consider (x ?[ eq ] y); intros; subst; auto. left. reflexivity. Qed.
Instance
EqDec_RelDec
Structures
theories/Structures/EqDep.v
[ "Coq.Logic", "Eqdep_dec", "EquivDec", "ExtLib.Core.RelDec", "ExtLib.Tactics.Consider" ]
[ "consider" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Foldable : Type
:= { fold_mon : forall m {M : Monoid m}, (A -> m) -> T -> m }.
Class
Foldable
Structures
theories/Structures/Foldable.v
[ "Coq.Lists.List", "ExtLib.Structures.Monoid" ]
[ "Monoid" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
fold (R : Type) (f : A -> R -> R) (init : R) (s : T) : R
:= @fold_mon Foldable_T (R -> R) {| monoid_plus := fun f g x => f (g x) ; monoid_unit := fun x => x |} f s init.
Definition
fold
Structures
theories/Structures/Foldable.v
[ "Coq.Lists.List", "ExtLib.Structures.Monoid" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
toList : T -> list A
:= fold_mon (M := {| monoid_plus := @List.app A ; monoid_unit := nil |}) (fun x => x :: nil).
Definition
toList
Structures
theories/Structures/Foldable.v
[ "Coq.Lists.List", "ExtLib.Structures.Monoid" ]
[ "app" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
FoldableOk
:= { fold_ind : forall m (M : Monoid m) (ML : MonoidLaws M) (P : m -> Prop) f u, P (monoid_unit M) -> (forall x y z, Add x y z -> P (@fold_mon Foldable_T m M f y) -> P (monoid_plus M (f x) (@fold_mon Foldable_T m M f z))) ->...
Class
FoldableOk
Structures
theories/Structures/Foldable.v
[ "Coq.Lists.List", "ExtLib.Structures.Monoid" ]
[ "Monoid", "MonoidLaws" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Functor@{d c} (F : Type@{d} -> Type@{c}) : Type
:= { fmap : forall {A B : Type@{d}}, (A -> B) -> F A -> F B }.
Class
Functor
Structures
theories/Structures/Functor.v
[ "ExtLib.Core.Any" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
ID@{d} {T : Type@{d}} (f : T -> T) : Prop
:= forall x : T, f x = x.
Definition
ID
Structures
theories/Structures/Functor.v
[ "ExtLib.Core.Any" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"f <$> x"
:= (@fmap _ _ _ _ f x) (at level 52, left associativity).
Notation
f <$> x
Structures
theories/Structures/Functor.v
[ "ExtLib.Core.Any" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
FunctorLaws {F} (Functor_F : Functor F)
:= { fmap_id : forall {T} (x : F T), fmap id x = x ; fmap_compose : forall {T U V} (f : T -> U) (g : U -> V) (x : F T), fmap (compose g f) x = fmap g (fmap f x) }.
Class
FunctorLaws
Structures
theories/Structures/FunctorLaws.v
[ "Coq.Relations", "Relations", "ExtLib.Data.Fun", "ExtLib.Structures.Functor" ]
[ "Functor", "compose" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
IxMonad@{d c} (m : Type@{d} -> Type@{d} -> Type@{c} -> Type@{c}) : Type
:= { ret : forall {i : Type@{d}} {a : Type@{d}}, a -> m i i a ; bind : forall {i j k a b: Type@{d}}, m i j a -> (a -> m j k b) -> m i k b }.
Class
IxMonad
Structures
theories/Structures/IXMonad.v
[ "ExtLib.Structures.Monad", "Applicative" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"c >>= f"
:= (@bind _ _ _ _ _ _ _ c f) (at level 50, left associativity) : ixmonad_scope.
Notation
c >>= f
Structures
theories/Structures/IXMonad.v
[ "ExtLib.Structures.Monad", "Applicative" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"f =<< c"
:= (@bind _ _ _ _ _ _ _ c f) (at level 51, right associativity) : ixmonad_scope.
Notation
f =<< c
Structures
theories/Structures/IXMonad.v
[ "ExtLib.Structures.Monad", "Applicative" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x <- c1 ;; c2"
:= (@bind _ _ _ _ _ _ _ c1 (fun x => c2)) (at level 100, c1 at next level, right associativity) : ixmonad_scope.
Notation
x <- c1 ;; c2
Structures
theories/Structures/IXMonad.v
[ "ExtLib.Structures.Monad", "Applicative" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"e1 ;; e2"
:= (_ <- e1%ixmonad ;; e2%ixmonad)%ixmonad (at level 100, right associativity) : ixmonad_scope.
Notation
e1 ;; e2
Structures
theories/Structures/IXMonad.v
[ "ExtLib.Structures.Monad", "Applicative" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"' pat <- c1 ;; c2"
:= (@bind _ _ _ _ _ _ _ c1 (fun x => match x with pat => c2 end)) (at level 100, pat pattern, c1 at next level, right associativity) : monad_scope.
Notation
' pat <- c1 ;; c2
Structures
theories/Structures/IXMonad.v
[ "ExtLib.Structures.Monad", "Applicative" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Applicative_Monad {m i} {M:IxMonad m} : Applicative (m i i)
:= {| Applicative.pure := fun (A : Type) (X : A) => ret X ; Applicative.ap := fun (A B : Type) (X : m i i (A -> B)) (X0 : m i i A) => bind X (fun X1 : A -> B => bind X0 (fun X2 : A => ret (X1 X2))) |}.
Instance
Applicative_Monad
Structures
theories/Structures/IXMonad.v
[ "ExtLib.Structures.Monad", "Applicative" ]
[ "Applicative", "IxMonad", "pure" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Map : Type
:= { empty : map ; add : K -> V -> map -> map ; remove : K -> map -> map ; lookup : K -> map -> option V ; union : map -> map -> map }.
Class
Map
Structures
theories/Structures/Maps.v
[ "RelationClasses", "ExtLib.Structures.Monad", "ExtLib.Structures.Reducible" ]
[ "empty", "remove" ]
General Maps *
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
MapOk (M : Map) : Type
:= { mapsto : K -> V -> map -> Prop ; mapsto_empty : forall k v, ~mapsto k v empty ; mapsto_lookup : forall k v m, lookup k m = Some v <-> mapsto k v m ; mapsto_add_eq : forall m k v, mapsto k v (add k v m) ; mapsto_add_neq : forall m k v k', ~R k k' -> forall v',...
Class
MapOk
Structures
theories/Structures/Maps.v
[ "RelationClasses", "ExtLib.Structures.Monad", "ExtLib.Structures.Reducible" ]
[ "Map", "empty", "remove" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
contains (k : K) (m : map) : bool
:= match lookup k m with | None => false | Some _ => true end.
Definition
contains
Structures
theories/Structures/Maps.v
[ "RelationClasses", "ExtLib.Structures.Monad", "ExtLib.Structures.Reducible" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
singleton (k : K) (v : V) : map
:= add k v empty.
Definition
singleton
Structures
theories/Structures/Maps.v
[ "RelationClasses", "ExtLib.Structures.Monad", "ExtLib.Structures.Reducible" ]
[ "empty" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
combine (f : K -> V -> V -> V) (m1 m2 : map) : map
:= fold (fun k_v acc => let '(k,v) := k_v in match lookup k acc with | None => add k v acc | Some v' => add k (f k v v') acc end) m2 m1.
Definition
combine
Structures
theories/Structures/Maps.v
[ "RelationClasses", "ExtLib.Structures.Monad", "ExtLib.Structures.Reducible" ]
[ "fold" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
filter (f : K -> V -> bool) (m : map) : map
:= fold (fun k_v acc => let '(k,v) := k_v in if f k v then add k v acc else acc) empty m.
Definition
filter
Structures
theories/Structures/Maps.v
[ "RelationClasses", "ExtLib.Structures.Monad", "ExtLib.Structures.Reducible" ]
[ "empty", "fold" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
submap_with (le : V -> V -> bool) (m1 m2 : map) : bool
:= fold (fun k_v (acc : bool) => if acc then let '(k,v) := k_v in match lookup k m2 with | None => false | Some v' => le v v' end else false) true m1.
Definition
submap_with
Structures
theories/Structures/Maps.v
[ "RelationClasses", "ExtLib.Structures.Monad", "ExtLib.Structures.Reducible" ]
[ "fold" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
Monad@{d c} (m : Type@{d} -> Type@{c}) : Type
:= { ret : forall {t : Type@{d}}, t -> m t ; bind : forall {t u : Type@{d}}, m t -> (t -> m u) -> m u }.
Class
Monad
Structures
theories/Structures/Monad.v
[ "ExtLib.Structures.Functor", "ExtLib.Structures.Applicative", "MonadBaseNotation" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
liftM@{d c} {m : Type@{d} -> Type@{c}} {M : Monad m} {T U : Type@{d}} (f : T -> U) : m T -> m U
:= fun x => bind x (fun x => ret (f x)).
Definition
liftM
Structures
theories/Structures/Monad.v
[ "ExtLib.Structures.Functor", "ExtLib.Structures.Applicative", "MonadBaseNotation" ]
[ "Monad" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
liftM2@{d c} {m : Type@{d} -> Type@{c}} {M : Monad m} {T U V : Type@{d}} (f : T -> U -> V) : m T -> m U -> m V
:= Eval cbv beta iota zeta delta [ liftM ] in fun x y => bind x (fun x => liftM (f x) y).
Definition
liftM2
Structures
theories/Structures/Monad.v
[ "ExtLib.Structures.Functor", "ExtLib.Structures.Applicative", "MonadBaseNotation" ]
[ "Monad", "liftM" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
liftM3@{d c} {m : Type@{d} -> Type@{c}} {M : Monad m} {T U V W : Type@{d}} (f : T -> U -> V -> W) : m T -> m U -> m V -> m W
:= Eval cbv beta iota zeta delta [ liftM2 ] in fun x y z => bind x (fun x => liftM2 (f x) y z).
Definition
liftM3
Structures
theories/Structures/Monad.v
[ "ExtLib.Structures.Functor", "ExtLib.Structures.Applicative", "MonadBaseNotation" ]
[ "Monad", "liftM2" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
apM@{d c} {m : Type@{d} -> Type@{c}} {M : Monad m} {A B : Type@{d}} (fM:m (A -> B)) (aM:m A) : m B
:= bind fM (fun f => liftM f aM).
Definition
apM
Structures
theories/Structures/Monad.v
[ "ExtLib.Structures.Functor", "ExtLib.Structures.Applicative", "MonadBaseNotation" ]
[ "Monad", "liftM" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
mcompose@{c d} {m:Type@{d}->Type@{c}} {M: Monad m} {T U V:Type@{d}} (f: T -> m U) (g: U -> m V): (T -> m V)
:= fun x => bind (f x) g.
Definition
mcompose
Structures
theories/Structures/Monad.v
[ "ExtLib.Structures.Functor", "ExtLib.Structures.Applicative", "MonadBaseNotation" ]
[ "Monad" ]
Left-to-right composition of Kleisli arrows.
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
join@{d c} {m : Type@{d} -> Type@{c}} {a} `{Monad m} : m (m a) -> m a
:= fun x => bind x (fun y => y).
Definition
join
Structures
theories/Structures/Monad.v
[ "ExtLib.Structures.Functor", "ExtLib.Structures.Applicative", "MonadBaseNotation" ]
[ "Monad" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"c >>= f"
:= (@bind _ _ _ _ c f) (at level 58, left associativity) : monad_scope.
Notation
c >>= f
Structures
theories/Structures/Monad.v
[ "ExtLib.Structures.Functor", "ExtLib.Structures.Applicative", "MonadBaseNotation" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"f =<< c"
:= (@bind _ _ _ _ c f) (at level 61, right associativity) : monad_scope.
Notation
f =<< c
Structures
theories/Structures/Monad.v
[ "ExtLib.Structures.Functor", "ExtLib.Structures.Applicative", "MonadBaseNotation" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"f >=> g"
:= (@mcompose _ _ _ _ _ f g) (at level 61, right associativity) : monad_scope.
Notation
f >=> g
Structures
theories/Structures/Monad.v
[ "ExtLib.Structures.Functor", "ExtLib.Structures.Applicative", "MonadBaseNotation" ]
[ "mcompose" ]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"e1 ;; e2"
:= (@bind _ _ _ _ e1%monad (fun _ => e2%monad))%monad (at level 61, right associativity) : monad_scope.
Notation
e1 ;; e2
Structures
theories/Structures/Monad.v
[ "ExtLib.Structures.Functor", "ExtLib.Structures.Applicative", "MonadBaseNotation" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075
"x <- c1 ;; c2"
:= (@bind _ _ _ _ c1 (fun x => c2)) (at level 61, c1 at next level, right associativity) : monad_scope.
Notation
x <- c1 ;; c2
Structures
theories/Structures/Monad.v
[ "ExtLib.Structures.Functor", "ExtLib.Structures.Applicative", "MonadBaseNotation" ]
[]
https://github.com/coq-community/coq-ext-lib
ddd03d257f6b85a93bfaa0ed4d03658e0ddf5075