Dataset Viewer
Auto-converted to Parquet Duplicate
fact
stringlengths
14
3.66k
type
stringclasses
11 values
library
stringclasses
1 value
imports
listlengths
1
4
filename
stringclasses
10 values
symbolic_name
stringlengths
1
26
docstring
stringclasses
1 value
ord : Type := mk_ord { tord:>Type; Ole : tord->tord->Prop; Ole_refl : forall x :tord, Ole x x; Ole_trans : forall x y z:tord, Ole x y -> Ole y z -> Ole x z }. Hint Resolve Ole_refl Ole_trans: core. Hint Extern 2 (@Ole ?X1 ?X2 ?X3 ) => simpl Ole: core. Declare Scope O_scope. Infix "<=" := Ole : O_scope. Open Scope O_scope. (** *** Associated equality *)
Record
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
ord
Oeq (O:ord) (x y : O) := x <= y /\ y <= x. (** printing == %\ensuremath{\equiv}% #&#8801;# *) Infix "==" := Oeq (at level 70) : O_scope.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Oeq
Ole_refl_eq : forall (O:ord) (x y:O), x=y -> x <= y. intros O x y H; rewrite H; auto. Qed. Hint Resolve Ole_refl_eq: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Ole_refl_eq
Ole_antisym : forall (O:ord) (x y:O), x<=y -> y <=x -> x==y. red; auto. Qed. Hint Immediate Ole_antisym: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Ole_antisym
Oeq_refl : forall (O:ord) (x:O), x == x. red; auto. Qed. Hint Resolve Oeq_refl: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Oeq_refl
Oeq_refl_eq : forall (O:ord) (x y:O), x=y -> x == y. intros O x y H; rewrite H; auto. Qed. Hint Resolve Oeq_refl_eq: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Oeq_refl_eq
Oeq_sym : forall (O:ord) (x y:O), x == y -> y == x. unfold Oeq; intuition. Qed.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Oeq_sym
Oeq_le : forall (O:ord) (x y:O), x == y -> x <= y. unfold Oeq; intuition. Qed.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Oeq_le
Oeq_le_sym : forall (O:ord) (x y:O), x == y -> y <= x. unfold Oeq; intuition. Qed. Hint Resolve Oeq_le: core. Hint Immediate Oeq_sym Oeq_le_sym: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Oeq_le_sym
Oeq_trans : forall (O:ord) (x y z:O), x == y -> y == z -> x == z. unfold Oeq; split; apply Ole_trans with y; auto. Qed. Hint Resolve Oeq_trans: core. (** *** Setoid relations *)
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Oeq_trans
Parametric Relation (o:ord) : (tord o) (Oeq (O:=o)) reflexivity proved by (Oeq_refl (O:=o)) symmetry proved by (Oeq_sym (O:=o)) transitivity proved by (Oeq_trans (O:=o)) as Oeq_Relation.
Add
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Parametric
Parametric Relation (o:ord) : (tord o) (Ole (o:=o)) reflexivity proved by (Ole_refl (o:=o)) transitivity proved by (Ole_trans (o:=o)) as Ole_Relation. (** printing ==> %\ensuremath\Longrightarrow% #&#8702;# *)
Add
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Parametric
Parametric Morphism (o:ord) : (Ole (o:=o)) with signature (Oeq (O:=o)) ==> (Oeq (O:=o)) ==> iff as Ole_eq_compat_iff. Proof. split; firstorder. apply Ole_trans with x; trivial. apply Ole_trans with x0; trivial. apply Ole_trans with y; trivial. apply Ole_trans with y0; trivial. Qed.
Add
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Parametric
Ole_eq_compat : forall (O : ord) (x1 x2 : O), x1 == x2 -> forall x3 x4 : O, x3 == x4 -> x1 <= x3 -> x2 <= x4. firstorder; apply Ole_trans with x1; trivial. apply Ole_trans with x3; trivial. Qed.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Ole_eq_compat
Ole_eq_right : forall (O : ord) (x y z: O), x <= y -> y == z -> x <= z. intros; apply Ole_eq_compat with x y; auto. Qed.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Ole_eq_right
Ole_eq_left : forall (O : ord) (x y z: O), x == y -> y <= z -> x <= z. intros; apply Ole_eq_compat with y z; auto. Qed. (** *** Dual order *) (** - Iord x y := y <= x *)
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Ole_eq_left
Iord : ord -> ord. intros O; exists O (fun x y : O => y <= x); intros; auto. apply Ole_trans with y; auto. Defined. (** *** Order on functions *) (** - ford f g := forall x, f x <= g x *)
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Iord
ford : Type -> ord -> ord. intros A O; exists (A->O) (fun f g:A->O => forall x, f x <= g x); intros; auto. apply Ole_trans with (y x0); auto. Defined. (** printing -o> %\ensuremath{\stackrel{o}{\rightarrow}}% *) Infix "-o>" := ford (right associativity, at level 30) : O_scope .
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
ford
ford_le_elim : forall A (O:ord) (f g:A -o> O), f <= g ->forall n, f n <= g n. auto. Qed. Hint Immediate ford_le_elim: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
ford_le_elim
ford_le_intro : forall A (O:ord) (f g:A -o> O), (forall n, f n <= g n) -> f <= g. auto. Qed. Hint Resolve ford_le_intro: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
ford_le_intro
ford_eq_elim : forall A (O:ord) (f g:A -o> O), f == g ->forall n, f n == g n. firstorder. Qed. Hint Immediate ford_eq_elim: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
ford_eq_elim
ford_eq_intro : forall A (O:ord) (f g:A -o> O), (forall n, f n == g n) -> f == g. red; auto. Qed. Hint Resolve ford_eq_intro: core. Hint Extern 2 (Ole (o:=ford ?X1 ?X2) ?X3 ?X4) => intro: core. (** ** Monotonicity *) (** *** Definition and properties *)
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
ford_eq_intro
monotonic (O1 O2:ord) (f : O1 -> O2) := forall x y, x <= y -> f x <= f y. Hint Unfold monotonic: core.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
monotonic
stable (O1 O2:ord) (f : O1 -> O2) := forall x y, x == y -> f x == f y. Hint Unfold stable: core.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
stable
monotonic_stable : forall (O1 O2 : ord) (f:O1 -> O2), monotonic f -> stable f. unfold monotonic, stable; firstorder. Qed. Hint Resolve monotonic_stable: core. (** *** Type of monotonic functions *)
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
monotonic_stable
fmono (O1 O2:ord) : Type := mk_fmono {fmonot :> O1 -> O2; fmonotonic: monotonic fmonot}. Hint Resolve fmonotonic: core. (** - fmon O1 O2 (f g : fmono O1 O2) := forall x, f x <= g x *)
Record
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmono
fmon : ord -> ord -> ord. intros O1 O2; exists (fmono O1 O2) (fun f g:fmono O1 O2 => forall x, f x <= g x); intros; auto. apply Ole_trans with (y x0); auto. Defined. (** printing -m> %\ensuremath{\stackrel{m}{\rightarrow}}%*) Infix "-m>" := fmon (at level 30, right associativity) : O_scope.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon
fmon_stable : forall (O1 O2:ord) (f:O1 -m> O2), stable f. intros; apply monotonic_stable; auto. Qed. Hint Resolve fmon_stable: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_stable
fmon_le_elim : forall (O1 O2:ord) (f g:O1 -m> O2), f <= g -> forall n, f n <= g n. auto. Qed. Hint Immediate fmon_le_elim: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_le_elim
fmon_le_intro : forall (O1 O2:ord) (f g:O1 -m> O2), (forall n, f n <= g n) -> f <= g. auto. Qed. Hint Resolve fmon_le_intro: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_le_intro
fmon_eq_elim : forall (O1 O2:ord) (f g:O1 -m> O2), f == g ->forall n, f n == g n. firstorder. Qed. Hint Immediate fmon_eq_elim: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_eq_elim
fmon_eq_intro : forall (O1 O2:ord) (f g:O1 -m> O2), (forall n, f n == g n) -> f == g. red; auto. Qed. Hint Resolve fmon_eq_intro: core. Hint Extern 2 (Ole (o:=fmon ?X1 ?X2) ?X3 ?X4) => intro: core. (** *** Monotonicity and dual order *) (** - [lmon f] uses f as monotonic function over the dual order. *)
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_eq_intro
Imon : forall O1 O2, (O1 -m> O2) -> Iord O1 -m> Iord O2. intros O1 O2 f; exists (f: Iord O1 -> Iord O2); red; simpl; intros. apply (fmonotonic f); auto. Defined.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Imon
Imon2 : forall O1 O2 O3, (O1 -m> O2 -m> O3) -> Iord O1 -m> Iord O2 -m> Iord O3. intros O1 O2 O3 f; exists (fun (x:Iord O1) => Imon (f x)); red; simpl; intros. apply (fmonotonic f); auto. Defined. (** *** Monotonic functions with 2 arguments *)
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Imon2
le_compat2_mon : forall (O1 O2 O3:ord)(f:O1 -> O2 -> O3), (forall (x y:O1) (z t:O2), x<=y -> z <= t -> f x z <= f y t) -> (O1 -m> O2 -m> O3). intros O1 O2 O3 f Hle; exists (fun (x:O1) => mk_fmono (fun z t => Hle x x z t (Ole_refl x))). red; intros; intro a; simpl; auto. Defined. (** ** Sequences *) (** *** Order on natural numbers *) (** - natO n m = n <= m *)
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
le_compat2_mon
natO : ord. exists nat (fun n m : nat => (n <= m)%nat); intros; auto with arith. apply le_trans with y; auto. Defined.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
natO
fnatO_intro : forall (O:ord) (f:nat -> O), (forall n, f n <= f (S n)) -> natO -m> O. intros; exists f; red; simpl; intros. elim H0; intros; auto. apply Ole_trans with (f m); trivial. Defined.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fnatO_intro
fnatO_elim : forall (O:ord) (f:natO -m> O) (n:nat), f n <= f (S n). intros; apply (fmonotonic f); auto. Qed. Hint Resolve fnatO_elim: core. (** - (mseq_lift_left f n) k = f (n+k) *)
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fnatO_elim
mseq_lift_left : forall (O:ord) (f:natO -m> O) (n:nat), natO -m> O. intros; exists (fun k => f (n+k)%nat); red; intros. apply (fmonotonic f); auto with arith. Defined.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
mseq_lift_left
mseq_lift_left_simpl : forall (O:ord) (f:natO -m> O) (n k:nat), mseq_lift_left f n k = f (n+k)%nat. trivial. Qed.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
mseq_lift_left_simpl
mseq_lift_left_le_compat : forall (O:ord) (f g:natO -m> O) (n:nat), f <= g -> mseq_lift_left f n <= mseq_lift_left g n. intros; intro; simpl; auto. Qed. Hint Resolve mseq_lift_left_le_compat: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
mseq_lift_left_le_compat
Parametric Morphism (o:ord) : (mseq_lift_left (O:=o)) with signature (Oeq (O:=natO -m> o)) ==> eq (A:=nat) ==> (Oeq (O:=natO -m> o)) as mseq_lift_left_eq_compat. intros; apply Ole_antisym; auto. Qed. Hint Resolve mseq_lift_left_eq_compat: core. (** - (mseq_lift_right f n) k = f (k+n) *)
Add
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Parametric
mseq_lift_right : forall (O:ord) (f:natO -m> O) (n:nat), natO -m> O. intros; exists (fun k => f (k+n)%nat); red; intros. apply (fmonotonic f); auto with arith. Defined.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
mseq_lift_right
mseq_lift_right_simpl : forall (O:ord) (f:natO -m> O) (n k:nat), mseq_lift_right f n k = f (k+n)%nat. trivial. Qed.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
mseq_lift_right_simpl
mseq_lift_right_le_compat : forall (O:ord) (f g:natO -m> O) (n:nat), f <= g -> mseq_lift_right f n <= mseq_lift_right g n. intros; intro; simpl; auto. Qed. Hint Resolve mseq_lift_right_le_compat: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
mseq_lift_right_le_compat
Parametric Morphism (o:ord) : (mseq_lift_right (O:=o)) with signature Oeq (O:=natO -m> o) ==> eq (A:=nat) ==> Oeq (O:=natO -m> o) as mseq_lift_right_eq_compat. intros; apply Ole_antisym; auto. Qed.
Add
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Parametric
mseq_lift_right_left : forall (O:ord) (f:natO -m> O) n, mseq_lift_left f n == mseq_lift_right f n. intros; apply fmon_eq_intro; unfold mseq_lift_left,mseq_lift_right; simpl; intros. replace (n0+n)%nat with (n+n0)%nat; auto with arith. Qed. (** *** Monotonicity and functions *) (** - (ford_app f x) n = f n x *)
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
mseq_lift_right_left
ford_app : forall (A:Type)(O1 O2:ord)(f:O1 -m> (A -o> O2))(x:A), O1 -m> O2. intros; exists (fun n => f n x); intros. intro n; intros. assert (f n <= f y); auto. apply (fmonotonic f); trivial. Defined. (** printing <o> %\ensuremath{\stackrel{o}{\diamond}}% *) Infix "<o>" := ford_app (at level 30, no associativity) : O_scope.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
ford_app
ford_app_simpl : forall (A:Type)(O1 O2:ord) (f : O1 -m> A -o> O2) (x:A)(y:O1), (f <o> x) y = f y x. trivial. Qed.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
ford_app_simpl
ford_app_le_compat : forall (A:Type)(O1 O2:ord) (f g:O1 -m> A -o> O2) (x:A), f <= g -> f <o> x <= g <o> x. intros; intro; simpl. apply (H x0). Qed. Hint Resolve ford_app_le_compat: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
ford_app_le_compat
Parametric Morphism (A:Type)(O1 O2:ord) : (ford_app (A:=A) (O1:=O1) (O2:=O2)) with signature Oeq (O:=O1 -m> (A -o> O2)) ==> eq (A:=A) ==> Oeq (O:=O1 -m> O2) as ford_app_eq_compat. intros; apply Ole_antisym; auto. Qed. (** - ford_shift f x y == f y x *)
Add
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Parametric
ford_shift : forall (A:Type)(O1 O2:ord)(f:A -o> (O1 -m> O2)), O1 -m> (A -o> O2). intros; exists (fun x y => f y x); intros. intros n x H y. apply (fmonotonic (f y)); trivial. Defined.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
ford_shift
ford_shift_le_compat : forall (A:Type)(O1 O2:ord) (f g: A -o> (O1 -m> O2)), f <= g -> ford_shift f <= ford_shift g. intros; intro; simpl; auto. Qed. Hint Resolve ford_shift_le_compat: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
ford_shift_le_compat
Parametric Morphism (A:Type)(O1 O2:ord) : (ford_shift (A:=A) (O1:=O1) (O2:=O2)) with signature Oeq (O:=A -o> (O1 -m> O2)) ==> Oeq (O:=O1 -m> (A -o> O2)) as ford_shift_eq_compat. intros; apply Ole_antisym; auto. Qed. (** - (fmon_app f x) n = f n x *)
Add
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Parametric
fmon_app : forall (O1 O2 O3:ord)(f:O1 -m> O2 -m> O3)(x:O2), O1 -m> O3. intros; exists (fun n => f n x); intros. intro n; intros. assert (f n <= f y); auto. apply (fmonotonic f); trivial. Defined. (** printing <_> %\ensuremath{\leftrightarroweq}%*) Infix "<_>" := fmon_app (at level 35, no associativity) : O_scope.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_app
fmon_app_simpl : forall (O1 O2 O3:ord)(f:O1 -m> O2 -m> O3)(x:O2)(y:O1), (f <_> x) y = f y x. trivial. Qed.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_app_simpl
fmon_app_le_compat : forall (O1 O2 O3:ord) (f g:O1 -m> (O2 -m> O3)) (x y:O2), f <= g -> x <= y -> f <_> x <= g <_> y. red; intros; simpl; intros; auto. apply Ole_trans with (f x0 y); auto. apply (fmonotonic (f x0)); auto. Qed. Hint Resolve fmon_app_le_compat: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_app_le_compat
Parametric Morphism (O1 O2 O3:ord) : (fmon_app (O1:=O1) (O2:=O2) (O3:=O3)) with signature Oeq (O:=O1 -m> O2 -m> O3) ==> Oeq (O:=O2) ==> Oeq (O:=O1-m>O3) as fmon_app_eq_compat. intros; apply Ole_antisym; intros; auto. Qed. (** - fmon_id c = c *)
Add
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Parametric
fmon_id : forall (O:ord), O -m> O. intros; exists (fun (x:O)=>x). intro n; auto. Defined.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_id
fmon_id_simpl : forall (O:ord) (x:O), fmon_id O x = x. trivial. Qed. (** - (fmon_cte c) n = c *)
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_id_simpl
fmon_cte : forall (O1 O2:ord)(c:O2), O1 -m> O2. intros; exists (fun (x:O1)=>c). intro n; auto. Defined.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_cte
fmon_cte_simpl : forall (O1 O2:ord)(c:O2)(c:O2) (x:O1), fmon_cte O1 c x = c. trivial. Qed.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_cte_simpl
mseq_cte : forall O:ord, O -> natO -m> O := fmon_cte natO.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
mseq_cte
fmon_cte_le_compat : forall (O1 O2:ord) (c1 c2:O2), c1 <= c2 -> fmon_cte O1 c1 <= fmon_cte O1 c2. intros; intro; auto. Qed.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_cte_le_compat
Parametric Morphism (O1 O2:ord) : (fmon_cte O1 (O2:=O2)) with signature Oeq (O:=O2) ==> Oeq (O:=O1 -m> O2) as fmon_cte_eq_compat. intros; apply Ole_antisym; auto. Qed. (** - (fmon_diag h) n = h n n *)
Add
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Parametric
fmon_diag : forall (O1 O2:ord)(h:O1 -m> (O1 -m> O2)), O1 -m> O2. intros; exists (fun n => h n n). red; intros. apply Ole_trans with (h x y); auto. apply (fmonotonic (h x)); auto. assert (h x <= h y); auto. apply (fmonotonic h); trivial. Defined.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_diag
fmon_diag_le_compat : forall (O1 O2:ord) (f g:O1 -m> (O1 -m> O2)), f <= g -> fmon_diag f <= fmon_diag g. intros; intro; simpl; auto. Qed. Hint Resolve fmon_diag_le_compat: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_diag_le_compat
fmon_diag_simpl : forall (O1 O2:ord) (f:O1 -m> (O1 -m> O2)) (x:O1), fmon_diag f x = f x x. trivial. Qed.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_diag_simpl
Parametric Morphism (O1 O2:ord) : (fmon_diag (O1:=O1) (O2:=O2)) with signature Oeq (O:=O1 -m> (O1 -m> O2)) ==> Oeq (O:=O1 -m> O2) as fmon_diag_eq_compat. intros; apply Ole_antisym; auto. Qed. (** - (fmon_shift h) n m = h m n *)
Add
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Parametric
fmon_shift : forall (O1 O2 O3:ord)(h:O1 -m> O2 -m> O3), O2 -m> O1 -m> O3. intros; exists (fun m => h <_> m). intro n; simpl; intros. apply (fmonotonic (h x)); trivial. Defined.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_shift
fmon_shift_simpl : forall (O1 O2 O3:ord)(h:O1 -m> O2 -m> O3) (x : O2) (y:O1), fmon_shift h x y = h y x. trivial. Qed.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_shift_simpl
fmon_shift_le_compat : forall (O1 O2 O3:ord) (f g:O1 -m> O2 -m> O3), f <= g -> fmon_shift f <= fmon_shift g. intros; intro; simpl; intros. assert (f x0 <= g x0); auto. Qed. Hint Resolve fmon_shift_le_compat: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_shift_le_compat
Parametric Morphism (O1 O2 O3:ord) : (fmon_shift (O1:=O1) (O2:=O2) (O3:=O3)) with signature Oeq (O:=O1 -m> O2 -m> O3) ==> Oeq (O:=O2 -m> O1 -m> O3) as fmon_shift_eq_compat. intros; apply Ole_antisym; auto. Qed.
Add
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Parametric
fmon_shift_shift_eq : forall (O1 O2 O3:ord) (h : O1 -m> O2 -m> O3), fmon_shift (fmon_shift h) == h. intros; apply fmon_eq_intro; unfold fmon_shift; simpl; auto. Qed. (** - (f@g) x = f (g x) *)
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_shift_shift_eq
fmon_comp : forall O1 O2 O3:ord, (O2 -m> O3) -> (O1 -m> O2) -> O1 -m> O3. intros O1 O2 O3 f g; exists (fun n => f (g n)); red; intros. apply (fmonotonic f). apply (fmonotonic g); auto. Defined. (** printing @ %\ensuremath{\stackrel{m}{\circ}}% *) Infix "@" := fmon_comp (at level 35) : O_scope.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_comp
fmon_comp_simpl : forall (O1 O2 O3:ord) (f :O2 -m> O3) (g:O1 -m> O2) (x:O1), (f @ g) x = f (g x). trivial. Qed. (** - (f@2 g) h x = f (g x) (h x) *)
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_comp_simpl
fmon_comp2 : forall O1 O2 O3 O4:ord, (O2 -m> O3 -m> O4) -> (O1 -m> O2) -> (O1 -m> O3) -> O1-m>O4. intros O1 O2 O3 O4 f g h; exists (fun n => f (g n) (h n)); red; intros. apply Ole_trans with (f (g x) (h y)); auto. apply (fmonotonic (f (g x))). apply (fmonotonic h); auto. apply (fmonotonic f); auto. apply (fmonotonic g); auto. Defined. (** printing @2 %\ensuremath{\stackrel{m}{\circ_2}}% *) Infix "@2" := fmon_comp2 (at level 70) : O_scope.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_comp2
fmon_comp2_simpl : forall (O1 O2 O3 O4:ord) (f:O2 -m> O3 -m> O4) (g:O1 -m> O2) (h:O1 -m> O3) (x:O1), (f @2 g) h x = f (g x) (h x). trivial. Qed.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_comp2_simpl
Parametric Morphism (O1 O2 O3:ord) : (fmon_comp (O1:=O1) (O2:=O2) (O3:=O3)) with signature Ole (o:=O2 -m> O3) ++> Ole (o:=O1 -m> O2) ++> Ole (o:=O1 -m> O3) as fmon_comp_le_compat_morph. red; intros f1 f2 H g1 g2 H1 x; simpl. apply Ole_trans with (f2 (g1 x)); auto. apply (fmonotonic f2); auto. Qed.
Add
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Parametric
fmon_comp_le_compat : forall (O1 O2 O3:ord) (f1 f2: O2 -m> O3) (g1 g2:O1 -m> O2), f1 <= f2 -> g1<= g2 -> f1 @ g1 <= f2 @ g2. intros; exact (fmon_comp_le_compat_morph H H0). Qed. Hint Immediate fmon_comp_le_compat: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_comp_le_compat
Parametric Morphism (O1 O2 O3:ord) : (fmon_comp (O1:=O1) (O2:=O2) (O3:=O3)) with signature Oeq (O:=O2 -m> O3) ==> Oeq (O:=O1 -m> O2) ==> Oeq (O:=O1 -m> O3) as fmon_comp_eq_compat. intros; apply Ole_antisym; apply fmon_comp_le_compat; auto. Qed. Hint Immediate fmon_comp_eq_compat: core.
Add
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Parametric
fmon_comp_monotonic2 : forall (O1 O2 O3:ord) (f: O2 -m> O3) (g1 g2:O1 -m> O2), g1<= g2 -> f @ g1 <= f @ g2. auto. Qed. Hint Resolve fmon_comp_monotonic2: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_comp_monotonic2
fmon_comp_monotonic1 : forall (O1 O2 O3:ord) (f1 f2: O2 -m> O3) (g:O1 -m> O2), f1<= f2 -> f1 @ g <= f2 @ g. auto. Qed. Hint Resolve fmon_comp_monotonic1: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_comp_monotonic1
fcomp : forall O1 O2 O3:ord, (O2 -m> O3) -m> (O1 -m> O2) -m> (O1 -m> O3). intros; exists (fun f : O2 -m> O3 => mk_fmono (fmonot:=fun g : O1 -m> O2 => fmon_comp f g) (fmon_comp_monotonic2 f)). red; intros; simpl; intros. apply H. Defined.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fcomp
fcomp_simpl : forall (O1 O2 O3:ord) (f:O2 -m> O3) (g:O1 -m> O2), fcomp O1 O2 O3 f g = f @ g. trivial. Qed.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fcomp_simpl
fcomp2 : forall O1 O2 O3 O4:ord, (O3 -m> O4) -m> (O1 -m> O2-m>O3) -m> (O1 -m> O2 -m> O4). intros; exists (fun f : O3 -m> O4 => fcomp O1 (O2-m> O3) (O2-m>O4) (fcomp O2 O3 O4 f)). red; intros; simpl; intros. apply H. Defined.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fcomp2
fcomp2_simpl : forall (O1 O2 O3 O4:ord) (f:O3 -m> O4) (g:O1 -m> O2-m>O3) (x:O1)(y:O2), fcomp2 O1 O2 O3 O4 f g x y = f (g x y). trivial. Qed.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fcomp2_simpl
fmon_le_compat : forall (O1 O2:ord) (f: O1 -m> O2) (x y:O1), x<=y -> f x <= f y. intros; apply (fmonotonic f); auto. Qed. Hint Resolve fmon_le_compat: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_le_compat
fmon_le_compat2 : forall (O1 O2 O3:ord) (f: O1 -m> O2 -m> O3) (x y:O1) (z t:O2), x<=y -> z <=t -> f x z <= f y t. intros; apply Ole_trans with (f x t). apply (fmonotonic (f x)); auto. apply (fmonotonic f); auto. Qed. Hint Resolve fmon_le_compat2: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_le_compat2
fmon_cte_comp : forall (O1 O2 O3:ord)(c:O3)(f:O1-m>O2), fmon_cte O2 c @ f == fmon_cte O1 c. intros; apply fmon_eq_intro; intro x; auto. Qed. (** ** Basic operators of omega-cpos *) (** - Constant : $0$ - lub : limit of monotonic sequences *) (** *** Definition of cpos *)
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
fmon_cte_comp
cpo : Type := mk_cpo { tcpo :> ord; D0 : tcpo; lub: (natO -m> tcpo) -> tcpo; Dbot : forall x : tcpo, D0 <= x; le_lub : forall (f : natO -m> tcpo) (n : nat), f n <= lub f; lub_le : forall (f : natO -m> tcpo) (x : tcpo), (forall n, f n <= x) -> lub f <= x }. Arguments D0 {c}.
Record
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
cpo
Parametric Morphism (c:cpo) : (lub (c:=c)) with signature Ole (o:=natO -m> c) ++> Ole (o:=c) as lub_le_compat_morph. intros f g H; apply lub_le; intros. apply Ole_trans with (g n); auto. Qed. Hint Resolve lub_le_compat_morph: core.
Add
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Parametric
lub_le_compat : forall (D:cpo) (f g:natO -m> D), f <= g -> lub f <= lub g. intros; apply lub_le; intros. apply Ole_trans with (g n); auto. Qed. Hint Resolve lub_le_compat: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
lub_le_compat
Lub : forall (D:cpo), (natO -m> D) -m> D. intro D; exists (fun (f :natO-m>D) => lub f); red; auto. Defined.
Definition
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Lub
Parametric Morphism (c:cpo) : (lub (c:=c)) with signature Oeq (O:=natO -m> c) ==> Oeq (O:=c) as lub_eq_compat. intros; apply Ole_antisym; auto. Qed. Hint Resolve lub_eq_compat: core.
Add
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
Parametric
lub_cte : forall (D:cpo) (c:D), lub (fmon_cte natO c) == c. intros; apply Ole_antisym; auto. apply le_lub with (f:=fmon_cte natO c) (n:=O); auto. Qed. Hint Resolve lub_cte: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
lub_cte
lub_lift_right : forall (D:cpo) (f:natO -m> D) n, lub f == lub (mseq_lift_right f n). intros; apply Ole_antisym; auto. apply lub_le_compat; intro. unfold mseq_lift_right; simpl. apply (fmonotonic f); auto with arith. Qed. Hint Resolve lub_lift_right: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
lub_lift_right
lub_lift_left : forall (D:cpo) (f:natO -m> D) n, lub f == lub (mseq_lift_left f n). intros; apply Ole_antisym; auto. apply lub_le_compat; intro. unfold mseq_lift_left; simpl. apply (fmonotonic f); auto with arith. Qed. Hint Resolve lub_lift_left: core.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
lub_lift_left
lub_le_lift : forall (D:cpo) (f g:natO -m> D) (n:natO), (forall k, n <= k -> f k <= g k) -> lub f <= lub g. intros; apply lub_le; intros. apply Ole_trans with (f (n+n0)). apply (fmonotonic f); simpl; auto with arith. apply Ole_trans with (g (n+n0)); auto. apply H; simpl; auto with arith. Qed.
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
lub_le_lift
lub_eq_lift : forall (D:cpo) (f g:natO -m> D) (n:natO), (forall k, n <= k -> f k == g k) -> lub f == lub g. intros; apply Ole_antisym; apply lub_le_lift with n; intros; auto. apply Oeq_le_sym; auto. Qed. (** - (lub_fun h) x = lub_n (h n x) *)
Lemma
root
[ "From Coq Require Export Setoid.", "From Coq Require Export Arith.", "From Coq Require Export Lia." ]
Ccpo.v
lub_eq_lift
End of preview. Expand in Data Studio

Coq-ALEA

Structured dataset from ALEA — Reasoning on randomized algorithms.

1,672 declarations extracted from Coq source files.

Applications

  • Training language models on formal proofs
  • Fine-tuning theorem provers
  • Retrieval-augmented generation for proof assistants
  • Learning proof embeddings and representations

Source

Schema

Column Type Description
fact string Declaration body
type string Lemma, Definition, Theorem, etc.
library string Source module
imports list Required imports
filename string Source file path
symbolic_name string Identifier
Downloads last month
25

Collection including phanerozoic/Coq-ALEA