Proof Assistant Projects
Collection
Digesting proof assistant libraries for AI ingestion. • 84 items • Updated • 3
fact stringlengths 7 17.4k | type stringclasses 23
values | library stringclasses 22
values | imports listlengths 0 26 | filename stringclasses 369
values | symbolic_name stringlengths 1 47 | docstring stringclasses 1
value |
|---|---|---|---|---|---|---|
Ring R : (CRing_Ring R) (preprocess [unfold cg_minus;simpl]). | Add | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | Ring | |
Ring cpolycring_th : (CRing_Ring (cpoly_cring R)) (preprocess [unfold cg_minus;simpl]). (** [Bernstein n i] is the ith element of the n dimensional Bernstein basis *) | Add | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | Ring | |
Bernstein (n i:nat) {struct n}: (i <= n) -> cpoly_cring R := match n return (i <= n) -> cpoly_cring R with O => fun _ => [1] |S n' => match i return (i <= S n') -> cpoly_cring R with O => fun _ => ([1][-]_X_)[*](Bernstein (Nat.le_0_l n')) |S i' => fun p => match (le_lt_eq_dec _ _ p) with | left p' => ([1][-]_X_)[*](Ber... | Fixpoint | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | Bernstein | |
Bernstein_inv1 : forall n i (H:i < n) (H0:S i <= S n), Bernstein H0[=]([1][-]_X_)[*](Bernstein (proj1 (Nat.lt_succ_r _ _) (proj1 (Nat.succ_lt_mono _ _) H)))[+]_X_[*](Bernstein (le_S_n _ _ H0)). Proof. intros n i H H0. simpl (Bernstein H0). destruct (le_lt_eq_dec _ _ H0). replace (proj1 (Nat.lt_succ_r (S i) n) l) with (... | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | Bernstein_inv1 | |
Bernstein_inv2 : forall n (H:S n <= S n), Bernstein H[=]_X_[*](Bernstein (le_S_n _ _ H)). Proof. intros n H. simpl (Bernstein H). destruct (le_lt_eq_dec _ _ H). exfalso; lia. replace (proj1 (Nat.lt_succ_r n n) H) with (le_S_n n n H) by apply le_irrelevent. reflexivity. Qed. | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | Bernstein_inv2 | |
Bernstein_ind : forall n i (H:i<=n) (P : nat -> nat -> cpoly_cring R -> Prop), P 0 0 [1] -> (forall n p, P n 0 p -> P (S n) 0 (([1][-]_X_)[*]p)) -> (forall n p, P n n p -> P (S n) (S n) (_X_[*]p)) -> (forall i n p q, (i < n) -> P n i p -> P n (S i) q -> P (S n) (S i) (([1][-]_X_)[*]q[+]_X_[*]p)) -> P n i (Bernstein H).... | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | Bernstein_ind | |
partitionOfUnity : forall n, @Sumx (cpoly_cring R) _ (fun i H => Bernstein (proj1 (Nat.lt_succ_r i n) H)) [=][1]. Proof. induction n. reflexivity. set (A:=(fun (i : nat) (H : i < S n) => Bernstein (proj1 (Nat.lt_succ_r i n) H))) in *. set (B:=(fun i => ([1][-]_X_)[*](part_tot_nat_fun (cpoly_cring R) _ A i)[+]_X_[*]matc... | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | partitionOfUnity | |
RaiseDegreeA : forall n i (H:i<=n), (nring (S n))[*]_X_[*]Bernstein H[=](nring (S i))[*]Bernstein (le_n_S _ _ H). Proof. induction n. intros [|i] H; [|exfalso; lia]. repeat split; ring. intros i H. change (nring (S (S n)):cpoly_cring R) with (nring (S n)[+][1]:cpoly_cring R). rstepl (nring (S n)[*]_X_[*]Bernstein H[+]_... | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | RaiseDegreeA | |
RaiseDegreeB : forall n i (H:i<=n), (nring (S n))[*]([1][-]_X_)[*]Bernstein H[=](nring (S n - i))[*]Bernstein (le_S _ _ H). Proof. induction n. intros [|i] H; [|exfalso; lia]. repeat split; ring. intros i H. change (nring (S (S n)):cpoly_cring R) with (nring (S n)[+][1]:cpoly_cring R). set (X0:=([1][-](@cpoly_var R))) ... | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | RaiseDegreeB | |
RaiseDegree : forall n i (H: i<=n), (nring (S n))[*]Bernstein H[=](nring (S n - i))[*]Bernstein (le_S _ _ H)[+](nring (S i))[*]Bernstein (le_n_S _ _ H). Proof. intros n i H. rstepl ((nring (S n))[*]([1][-]_X_)[*]Bernstein H[+](nring (S n))[*]_X_[*]Bernstein H). rewrite RaiseDegreeA, RaiseDegreeB. reflexivity. Qed. Opaq... | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | RaiseDegree | |
evalBernsteinBasisH (n i:nat) (v:Vector.t R i) : i <= n -> cpoly_cring R := match v in Vector.t _ i return i <= n -> cpoly_cring R with |Vector.nil => fun _ => [0] |Vector.cons a i' v' => match n as n return (S i' <= n) -> cpoly_cring R with | O => fun p => False_rect _ (Nat.nle_succ_0 _ p) | S n' => fun p => _C_ a[*]B... | Fixpoint | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | evalBernsteinBasisH | |
evalBernsteinBasis (n:nat) (v:Vector.t R n) : cpoly_cring R := evalBernsteinBasisH v (Nat.le_refl n). (** The coefficents are linear *) Opaque polyconst. | Definition | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | evalBernsteinBasis | |
Vbinary : forall (n : nat), Vector.t A n -> Vector.t A n -> Vector.t A n. Proof. induction n as [| n h]; intros v v0. apply Vector.nil. inversion v as [| a n0 H0 H1]; inversion v0 as [| a0 n1 H2 H3]. exact (Vector.cons (g a a0) n (h H0 H2)). Defined. | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | Vbinary | |
Vid n : Vector.t A n -> Vector.t A n := match n with | O => fun _ => Vector.nil | S n' => fun v : Vector.t A (S n') => Vector.cons (Vector.hd v) _ (Vector.tl v) end. | Definition | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | Vid | |
Vid_eq : forall (n:nat) (v:Vector.t A n), v = Vid v. Proof. destruct v; auto. Qed. | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | Vid_eq | |
VSn_eq : forall (n : nat) (v : Vector.t A (S n)), v = Vector.cons (Vector.hd v) _ (Vector.tl v). Proof. intros. exact (Vid_eq v). Qed. | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | VSn_eq | |
V0_eq : forall (v : Vector.t A 0), v = Vector.nil. Proof. intros. exact (Vid_eq v). Qed. | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | V0_eq | |
evalBernsteinBasisPlus : forall n (v1 v2: Vector.t R n), evalBernsteinBasis (Vbinary (fun (x y:R)=>x[+]y) v1 v2)[=]evalBernsteinBasis v1[+]evalBernsteinBasis v2. Proof. unfold evalBernsteinBasis. intros n. generalize (Nat.le_refl n). generalize n at 1 3 4 6 7 9 11. intros i. induction i. intros l v1 v2. rewrite (V0_eq ... | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | evalBernsteinBasisPlus | |
evalBernsteinBasisConst : forall n c, evalBernsteinBasis (Vector.const c (S n))[=]_C_ c. Proof. intros n c. stepr (evalBernsteinBasis (Vector.const c (S n))[+]_C_ c[*]Sum (S n) n (part_tot_nat_fun _ _ (fun (i : nat) (H : i < S n) => Bernstein (proj1 (Nat.lt_succ_r i n) H)))). rewrite -> Sum_empty by auto with *. ring. ... | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | evalBernsteinBasisConst | |
BernsteinBasisTimesXH (n i:nat) (v:Vector.t R i) : i <= n -> Vector.t R (S i) := match v in Vector.t _ i return i <= n -> Vector.t R (S i) with | Vector.nil => fun _ => Vector.cons [0] _ Vector.nil | Vector.cons a i' v' => match n as n return S i' <= n -> Vector.t R (S (S i')) with | O => fun p => False_rect _ (Nat.nle... | Fixpoint | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | BernsteinBasisTimesXH | |
BernsteinBasisTimesX (n:nat) (v:Vector.t R n) : Vector.t R (S n) := BernsteinBasisTimesXH v (Nat.le_refl n). | Definition | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | BernsteinBasisTimesX | |
evalBernsteinBasisTimesX : forall n (v:Vector.t R n), evalBernsteinBasis (BernsteinBasisTimesX v)[=]_X_[*]evalBernsteinBasis v. Proof. intros n. unfold evalBernsteinBasis, BernsteinBasisTimesX. generalize (Nat.le_refl (S n)) (Nat.le_refl n). generalize n at 1 3 5 7 9 11. intros i. induction i. intros l l0 v. rewrite (V... | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | evalBernsteinBasisTimesX | |
BernsteinCoefficents (p:cpoly_cring R) : sigT (Vector.t R) := match p with | cpoly_zero _ => existT _ _ Vector.nil | cpoly_linear _ c p' => let (n', b') := (BernsteinCoefficents p') in existT _ _ (Vbinary (fun (x y:R)=>x[+]y) (Vector.const c _) (BernsteinBasisTimesX b')) end. | Fixpoint | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | BernsteinCoefficents | |
evalBernsteinCoefficents : forall p, (let (n,b) := BernsteinCoefficents p in evalBernsteinBasis b)[=]p. Proof. induction p. reflexivity. simpl. destruct (BernsteinCoefficents p). rewrite -> evalBernsteinBasisPlus. rewrite -> evalBernsteinBasisConst. rewrite -> evalBernsteinBasisTimesX. rewrite -> IHp. rewrite -> poly_l... | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | evalBernsteinCoefficents | |
BernsteinNonNeg : forall x:F, [0] [<=] x -> x [<=] [1] -> forall n i (p:Nat.le i n), [0][<=](Bernstein F p)!x. Proof. intros x Hx0 Hx1. induction n. intros i p. simpl (Bernstein F p). autorewrite with apply. auto with *. intros [|i] p; simpl (Bernstein F p). autorewrite with apply. auto with *. destruct (le_lt_eq_dec (... | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"Require Import CoRN.",
"From Coq Require Import Lia."
] | algebra/Bernstein.v | BernsteinNonNeg | |
is_CAbGroup (G : CGroup) := commutes (csg_op (c:=G)). | Definition | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | is_CAbGroup | |
CAbGroup : Type := {cag_crr : CGroup; cag_proof : is_CAbGroup cag_crr}. Local Coercion cag_crr : CAbGroup >-> CGroup. | Record | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | CAbGroup | |
CAbGroup_is_CAbGroup : is_CAbGroup G. Proof. elim G; auto. Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | CAbGroup_is_CAbGroup | |
cag_commutes : commutes (csg_op (c:=G)). Proof. exact CAbGroup_is_CAbGroup. Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | cag_commutes | |
cag_commutes_unfolded : forall x y : G, x[+]y [=] y[+]x. Proof cag_commutes. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | cag_commutes_unfolded | |
subcrr : CGroup := Build_SubCGroup _ _ Punit op_pres_P inv_pres_P. | Let | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | subcrr | |
isabgrp_scrr : is_CAbGroup subcrr. Proof. red in |- *. intros x y. case x. case y. intros. simpl in |- *. apply cag_commutes_unfolded. Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | isabgrp_scrr | |
Build_SubCAbGroup : CAbGroup := Build_CAbGroup subcrr isabgrp_scrr. | Definition | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | Build_SubCAbGroup | |
cag_op_inv : forall x y : G, [--] (x[+]y) [=] [--]x[+] [--]y. Proof. intros x y. astepr ([--]y[+] [--]x). apply cg_inv_op. Qed. Hint Resolve cag_op_inv: algebra. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | cag_op_inv | |
assoc_1 : forall x y z : G, x[-] (y[-]z) [=] x[-]y[+]z. Proof. intros x y z; unfold cg_minus in |- *. astepr (x[+]([--]y[+]z)). Step_final (x[+]([--]y[+] [--][--]z)). Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | assoc_1 | |
minus_plus : forall x y z : G, x[-] (y[+]z) [=] x[-]y[-]z. Proof. intros x y z. unfold cg_minus in |- *. Step_final (x[+]([--]y[+] [--]z)). Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | minus_plus | |
op_lft_resp_ap : forall x y z : G, y [#] z -> x[+]y [#] x[+]z. Proof. intros x y z H. astepl (y[+]x). astepr (z[+]x). apply op_rht_resp_ap; assumption. Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | op_lft_resp_ap | |
cag_ap_cancel_lft : forall x y z : G, x[+]y [#] x[+]z -> y [#] z. Proof. intros x y z H. apply ap_symmetric_unfolded. apply cg_ap_cancel_rht with x. apply ap_symmetric_unfolded. astepl (x[+]y). astepr (x[+]z). auto. Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | cag_ap_cancel_lft | |
plus_cancel_ap_lft : forall x y z : G, z[+]x [#] z[+]y -> x [#] y. Proof. intros x y z H. apply cag_ap_cancel_lft with z. assumption. Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | plus_cancel_ap_lft | |
cag_crr : CAbGroup >-> CGroup. | Coercion | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | cag_crr | |
plus_rext : forall x y z : S, plus x y [#] plus x z -> y [#] z. Proof. intros x y z H. apply plus_lext with x. astepl (plus x y). astepr (plus x z). auto. Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | plus_rext | |
plus_runit : forall x : S, plus x unit [=] x. Proof. intro x. Step_final (plus unit x). Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | plus_runit | |
plus_is_fun : bin_fun_strext _ _ _ plus. Proof. intros x x' y y' H. elim (ap_cotransitive_unfolded _ _ _ H (plus x y')); intro H'. right; apply plus_lext with x. astepl (plus x y); astepr (plus x y'); auto. left; eauto. Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | plus_is_fun | |
inv_inv' : forall x : S, plus (inv x) x [=] unit. Proof. intro. Step_final (plus x (inv x)). Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | inv_inv' | |
plus_fun : CSetoid_bin_op S := Build_CSetoid_bin_fun _ _ _ plus plus_is_fun. | Definition | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | plus_fun | |
Build_CSemiGroup' : CSemiGroup. Proof. apply Build_CSemiGroup with S plus_fun. exact plus_assoc. Defined. | Definition | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | Build_CSemiGroup' | |
Build_CMonoid' : CMonoid. Proof. apply Build_CMonoid with Build_CSemiGroup' unit. apply Build_is_CMonoid. exact plus_runit. exact plus_lunit. Defined. | Definition | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | Build_CMonoid' | |
Build_CGroup' : CGroup. Proof. apply Build_CGroup with Build_CMonoid' inv. split. auto. apply inv_inv'. Defined. | Definition | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | Build_CGroup' | |
Build_CAbGroup' : CAbGroup. Proof. apply Build_CAbGroup with Build_CGroup'. exact plus_comm. Defined. | Definition | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | Build_CAbGroup' | |
nmult (a:G) (n:nat) {struct n} : G := match n with | O => [0] | S p => a[+]nmult a p end. | Fixpoint | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | nmult | |
nmult_wd : forall (x y:G) (n m:nat), (x [=] y) -> n = m -> nmult x n [=] nmult y m. Proof. simple induction n; intros. rewrite <- H0; algebra. rewrite <- H1; simpl in |- *; algebra. Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | nmult_wd | |
nmult_one : forall x:G, nmult x 1 [=] x. Proof. simpl in |- *; algebra. Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | nmult_one | |
nmult_Zero : forall n:nat, nmult [0] n [=] [0]. Proof. intro n. induction n. algebra. simpl in |- *; Step_final (([0]:G)[+][0]). Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | nmult_Zero | |
nmult_plus : forall m n x, nmult x m[+]nmult x n [=] nmult x (m + n). Proof. simple induction m. simpl in |- *; algebra. clear m; intro m. intros. simpl in |- *. Step_final (x[+](nmult x m[+]nmult x n)). Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | nmult_plus | |
nmult_mult : forall n m x, nmult (nmult x m) n [=] nmult x (m * n). Proof. simple induction n. intro. rewrite Nat.mul_0_r. algebra. clear n; intros. simpl in |- *. rewrite Nat.mul_comm. simpl in |- *. eapply eq_transitive_unfolded. 2: apply nmult_plus. rewrite Nat.mul_comm. algebra. Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | nmult_mult | |
nmult_inv : forall n x, nmult [--]x n [=] [--] (nmult x n). Proof. intro; induction n; simpl in |- *. algebra. intros. Step_final ([--]x[+] [--](nmult x n)). Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | nmult_inv | |
nmult_plus' : forall n x y, nmult x n[+]nmult y n [=] nmult (x[+]y) n. Proof. intro; induction n; simpl in |- *; intros. algebra. astepr (x[+]y[+](nmult x n[+]nmult y n)). astepr (x[+](y[+](nmult x n[+]nmult y n))). astepr (x[+](y[+]nmult x n[+]nmult y n)). astepr (x[+](nmult x n[+]y[+]nmult y n)). Step_final (x[+](nmu... | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | nmult_plus' | |
zmult a z := caseZ_diff z (fun n m => nmult a n[-]nmult a m). (* | Definition | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | zmult | |
Zeq_imp_nat_eq : forall m n:nat, m = n -> m = n. auto. intro m; induction m. intro n; induction n; auto. intro; induction n. intro. inversion H. intros. rewrite (IHm n). auto. repeat rewrite inj_S in H. auto with zarith. Qed. *) | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | Zeq_imp_nat_eq | |
zmult_char : forall (m n:nat) z, z = (m - n)%Z -> forall x, zmult x z [=] nmult x m[-]nmult x n. Proof. simple induction z; intros. simpl in |- *. replace m with n. Step_final ([0]:G). auto with zarith. simpl in |- *. astepl (nmult x (nat_of_P p)). apply cg_cancel_rht with (nmult x n). astepr (nmult x m). astepl (nmult... | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | zmult_char | |
zmult_wd : forall (x y:G) (n m:Z), (x [=] y) -> n = m -> zmult x n [=] zmult y m. Proof. do 3 intro. case n; intros; inversion H0. algebra. unfold zmult in |- *. simpl in |- *. astepl (nmult x (nat_of_P p)); Step_final (nmult y (nat_of_P p)). simpl in |- *. astepl [--](nmult x (nat_of_P p)). Step_final [--](nmult y (na... | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | zmult_wd | |
zmult_one : forall x:G, zmult x 1 [=] x. Proof. simpl in |- *; algebra. Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | zmult_one | |
zmult_min_one : forall x:G, zmult x (-1) [=] [--]x. Proof. intros; simpl in |- *; Step_final ([0][-]x). Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | zmult_min_one | |
zmult_zero : forall x:G, zmult x 0 [=] [0]. Proof. simpl in |- *; algebra. Qed. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | zmult_zero | |
zmult_Zero : forall k:Z, zmult [0] k [=] [0]. Proof. intro; induction k; simpl in |- *. algebra. Step_final (([0]:G)[-][0]). Step_final (([0]:G)[-][0]). Qed. Hint Resolve zmult_zero: algebra. | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | zmult_Zero | |
zmult_plus : forall m n x, zmult x m[+]zmult x n [=] zmult x (m + n). Proof. intros; case m; case n; intros. simpl in |- *; Step_final ([0][+]([0][-][0]):G). simpl in |- *; Step_final ([0][+](nmult x (nat_of_P p)[-][0])). simpl in |- *; Step_final ([0][+]([0][-]nmult x (nat_of_P p))). simpl in |- *; Step_final (nmult x... | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | zmult_plus | |
zmult_mult : forall m n x, zmult (zmult x m) n [=] zmult x (m * n). Proof. simple induction m; simple induction n; simpl in |- *; intros. Step_final ([0][-][0][+]([0]:G)). astepr ([0]:G). astepl (nmult ([0][-][0]) (nat_of_P p)). Step_final (nmult [0] (nat_of_P p)). astepr [--]([0]:G). astepl [--](nmult ([0][-][0]) (nat... | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | zmult_mult | |
zmult_plus' : forall z x y, zmult x z[+]zmult y z [=] zmult (x[+]y) z. Proof. intro z; pattern z in |- *. apply nats_Z_ind. intro n; case n. intros; simpl in |- *. Step_final (([0]:G)[+]([0][-][0])). clear n; intros. rewrite POS_anti_convert; simpl in |- *. set (p := nat_of_P (P_of_succ_nat n)) in *. astepl (nmult x p[... | Lemma | algebra | [
"Require Export CoRN."
] | algebra/CAbGroups.v | zmult_plus' | |
is_CAbMonoid (G : CMonoid) := commutes (csg_op (c:=G)). | Definition | algebra | [
"Require Export CoRN.",
"Require Import CoRN."
] | algebra/CAbMonoids.v | is_CAbMonoid | |
CAbMonoid : Type := {cam_crr :> CMonoid; cam_proof : is_CAbMonoid cam_crr}. | Record | algebra | [
"Require Export CoRN.",
"Require Import CoRN."
] | algebra/CAbMonoids.v | CAbMonoid | |
CAbMonoid_is_CAbMonoid : is_CAbMonoid M. Proof. elim M; auto. Qed. | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN."
] | algebra/CAbMonoids.v | CAbMonoid_is_CAbMonoid | |
cam_commutes : commutes (csg_op (c:=M)). Proof. exact CAbMonoid_is_CAbMonoid. Qed. | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN."
] | algebra/CAbMonoids.v | cam_commutes | |
cam_commutes_unfolded : forall x y : M, x[+]y [=] y[+]x. Proof cam_commutes. | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN."
] | algebra/CAbMonoids.v | cam_commutes_unfolded | |
subcrr : CMonoid := Build_SubCMonoid _ _ Punit op_pres_P. | Let | algebra | [
"Require Export CoRN.",
"Require Import CoRN."
] | algebra/CAbMonoids.v | subcrr | |
isabgrp_scrr : is_CAbMonoid subcrr. Proof. red in |- *. intros x y. case x. case y. intros. simpl in |- *. apply cam_commutes_unfolded. Qed. | Lemma | algebra | [
"Require Export CoRN.",
"Require Import CoRN."
] | algebra/CAbMonoids.v | isabgrp_scrr | |
Build_SubCAbMonoid : CAbMonoid := Build_CAbMonoid _ isabgrp_scrr. | Definition | algebra | [
"Require Export CoRN.",
"Require Import CoRN."
] | algebra/CAbMonoids.v | Build_SubCAbMonoid | |
R_Set := CauchySeq F. | Definition | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_Set | |
R_lt (x y : R_Set) := {N : nat | {e : F | [0] [<] e | forall n, N <= n -> e [<=] CS_seq _ y n[-]CS_seq _ x n}}. | Definition | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_lt | |
R_ap (x y : R_Set) := R_lt x y or R_lt y x. | Definition | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_ap | |
R_eq (x y : R_Set) := Not (R_ap x y). | Definition | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_eq | |
R_lt_cotrans : cotransitive R_lt. Proof. red in |- *. intros x y. elim x; intros x_ px. elim y; intros y_ py. intros Hxy z. elim z; intros z_ pz. elim Hxy; intros N H. elim H; clear Hxy H; intros e He HN. simpl in HN. set (e3 := e [/]ThreeNZ) in *. cut ([0] [<] e3); [ intro He3 | unfold e3 in |- *; apply pos_div_three;... | Lemma | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_lt_cotrans | |
R_ap_cotrans : cotransitive R_ap. Proof. red in |- *; intros x y Hxy z. elim Hxy; intro H; elim (R_lt_cotrans _ _ H z); unfold R_ap in |- *; auto. Qed. | Lemma | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_ap_cotrans | |
R_ap_symmetric : Csymmetric R_ap. Proof. red in |- *; intros x y Hxy. elim Hxy; unfold R_ap in |- *; auto. Qed. | Lemma | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_ap_symmetric | |
R_lt_irreflexive : irreflexive R_lt. Proof. red in |- *; intros x Hx. elim Hx; intros N HN. elim HN; clear Hx HN; intros e He HN. apply (ap_irreflexive_unfolded _ (x N)). apply less_imp_ap. apply less_leEq_trans with (x N[+]e). astepl (x N[+][0]); apply plus_resp_less_lft; auto. apply shift_plus_leEq'; auto with arith.... | Lemma | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_lt_irreflexive | |
R_ap_irreflexive : irreflexive R_ap. Proof. red in |- *; intros x Hx. elim (R_lt_irreflexive x). elim Hx; auto. Qed. | Lemma | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_ap_irreflexive | |
R_ap_eq_tight : tight_apart R_eq R_ap. Proof. split; auto. Qed. | Lemma | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_ap_eq_tight | |
R_CSetoid : CSetoid. Proof. apply Build_CSetoid with R_Set R_eq R_ap. split. exact R_ap_irreflexive. exact R_ap_symmetric. exact R_ap_cotrans. exact R_ap_eq_tight. Defined. | Definition | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_CSetoid | |
R_plus (x y : R_CSetoid) : R_CSetoid := Build_CauchySeq _ _ (CS_seq_plus F _ _ (CS_proof _ x) (CS_proof _ y)). | Definition | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_plus | |
R_zero := Build_CauchySeq _ _ (CS_seq_const F [0]). | Definition | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_zero | |
R_plus_lft_ext : forall x y z, R_plus x z [#] R_plus y z -> x [#] y. Proof. intros x y z Hxy. elim Hxy; clear Hxy; intro H; [ left | right ]; elim H; intros N HN; elim HN; clear H HN; intros e He HN; exists N; exists e; auto; intros n Hn; simpl in HN. rstepr (CS_seq _ y n[+]CS_seq _ z n[-] (CS_seq _ x n[+]CS_seq _ z n)... | Lemma | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_plus_lft_ext | |
R_plus_assoc : associative R_plus. Proof. intros x y z Hap. elim Hap; clear Hap; intro H; elim H; intros N HN; elim HN; clear H HN; intros e He HN; simpl in HN; apply (less_irreflexive_unfolded _ e). apply leEq_less_trans with (CS_seq _ x N[+]CS_seq _ y N[+]CS_seq _ z N[-] (CS_seq _ x N[+] (CS_seq _ y N[+]CS_seq _ z N)... | Lemma | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_plus_assoc | |
R_zero_lft_unit : forall x, R_plus R_zero x [=] x. Proof. intro x; intro x_ap. apply (R_lt_irreflexive x). elim x_ap; clear x_ap; intro x_lt; elim x_lt; intros N H; elim H; clear x_lt H; intros e He HN; exists N; exists e; auto; simpl in HN; intros n Hn. astepr (CS_seq _ x n[-] ([0][+]CS_seq _ x n)); auto. astepr ([0][... | Lemma | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_zero_lft_unit | |
R_plus_comm : forall x y, R_plus x y [=] R_plus y x. Proof. intros x y Hxy. elim Hxy; clear Hxy; intro H; elim H; intros N HN; elim HN; clear H HN; intros e He HN; simpl in HN; apply (less_irreflexive_unfolded _ e). apply leEq_less_trans with (CS_seq _ y N[+]CS_seq _ x N[-] (CS_seq _ x N[+]CS_seq _ y N)); auto. rstepl ... | Lemma | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_plus_comm | |
R_inv (x : R_CSetoid) : R_CSetoid := Build_CauchySeq _ _ (CS_seq_inv F _ (CS_proof _ x)). | Definition | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_inv | |
R_inv_is_inv : forall x, R_plus x (R_inv x) [=] R_zero. Proof. intro x; intro x_ap. apply (R_lt_irreflexive R_zero). elim x_ap; clear x_ap; intro x_lt; elim x_lt; intros N H; elim H; clear x_lt H; intros e He HN; exists N; exists e; auto; simpl in HN; intros n Hn. simpl in |- *; astepr ([0][-] (CS_seq _ x n[+][--] (CS_... | Lemma | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_inv_is_inv | |
R_inv_ext : un_op_strext _ R_inv. Proof. intros x y Hxy. elim Hxy; clear Hxy; intro x_lt; [ right | left ]; elim x_lt; intros N H; elim H; clear x_lt H; intros e He HN; exists N; exists e; auto; simpl in HN; intros n Hn. rstepr ([--] (CS_seq _ y n) [-][--] (CS_seq _ x n)); auto. rstepr ([--] (CS_seq _ x n) [-][--] (CS_... | Lemma | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_inv_ext | |
Rinv : CSetoid_un_op R_CSetoid. Proof. red in |- *. apply Build_CSetoid_un_op with R_inv. exact R_inv_ext. Defined. | Definition | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | Rinv | |
R_CAbGroup : CAbGroup. Proof. apply Build_CAbGroup' with R_CSetoid R_zero R_plus Rinv. exact R_plus_lft_ext. exact R_zero_lft_unit. exact R_plus_comm. exact R_plus_assoc. exact R_inv_is_inv. Defined. | Definition | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_CAbGroup | |
R_mult (x y : R_CAbGroup) : R_CAbGroup := Build_CauchySeq _ _ (CS_seq_mult F _ _ (CS_proof _ x) (CS_proof _ y)). | Definition | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_mult | |
R_one : R_CAbGroup := Build_CauchySeq _ _ (CS_seq_const F [1]). | Definition | algebra | [
"Require Export CoRN.",
"Require Export CoRN."
] | algebra/Cauchy_COF.v | R_one |
Structured dataset from CoRN (Coq Repository at Nijmegen) — Constructive real analysis and algebra.
11,138 declarations extracted from Coq source files.
| 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 |