Proof Assistant Projects
Collection
Digesting proof assistant libraries for AI ingestion. • 103 items • Updated • 3
fact stringlengths 14 26.5k | statement stringlengths 5 4.15k | proof stringlengths 0 26.3k | type stringclasses 26
values | kind stringclasses 9
values | symbolic_name stringlengths 0 75 | library stringclasses 44
values | filename stringclasses 463
values | imports listlengths 0 25 | deps listlengths 0 64 | docstring stringlengths 3 2.4k ⌀ | line_start int64 3 4.06k | line_end int64 5 4.06k | has_proof bool 2
classes | source_url stringclasses 1
value | commit stringclasses 1
value | content_level stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
#[local]
Definition le_n_0_eq_stt := fun n Hle => eq_sym (proj1 (Nat.le_0_r n) Hle). | #[local]
Definition le_n_0_eq_stt | := fun n Hle => eq_sym (proj1 (Nat.le_0_r n) Hle). | Definition | definition | le_n_0_eq_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"eq_sym",
"le_0_r"
] | Le.le_n_S Le.le_n_Sn Le.le_Sn_n | 43 | 44 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition lt_le_S_stt := fun n m => (proj2 (Nat.le_succ_l n m)). | #[local]
Definition lt_le_S_stt | := fun n m => (proj2 (Nat.le_succ_l n m)). | Definition | definition | lt_le_S_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"le_succ_l"
] | Lt.lt_irrefl | 53 | 54 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition lt_n_Sm_le_stt := fun n m => (proj1 (Nat.lt_succ_r n m)). | #[local]
Definition lt_n_Sm_le_stt | := fun n m => (proj1 (Nat.lt_succ_r n m)). | Definition | definition | lt_n_Sm_le_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"lt_succ_r"
] | Lt.lt_le_S | 59 | 60 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition le_lt_n_Sm_stt := fun n m => (proj2 (Nat.lt_succ_r n m)). | #[local]
Definition le_lt_n_Sm_stt | := fun n m => (proj2 (Nat.lt_succ_r n m)). | Definition | definition | le_lt_n_Sm_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"lt_succ_r"
] | Lt.lt_n_Sm_le | 65 | 66 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition le_not_lt_stt := fun n m => (proj1 (Nat.le_ngt n m)). | #[local]
Definition le_not_lt_stt | := fun n m => (proj1 (Nat.le_ngt n m)). | Definition | definition | le_not_lt_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"le_ngt"
] | Lt.le_lt_n_Sm | 71 | 72 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition lt_not_le_stt := fun n m => (proj1 (Nat.lt_nge n m)). | #[local]
Definition lt_not_le_stt | := fun n m => (proj1 (Nat.lt_nge n m)). | Definition | definition | lt_not_le_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"lt_nge"
] | Lt.le_not_lt | 77 | 78 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition neq_0_lt_stt := fun n Hn => proj1 (Nat.neq_0_lt_0 n) (Nat.neq_sym 0 n Hn). | #[local]
Definition neq_0_lt_stt | := fun n Hn => proj1 (Nat.neq_0_lt_0 n) (Nat.neq_sym 0 n Hn). | Definition | definition | neq_0_lt_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"neq_0_lt_0",
"neq_sym"
] | Lt.lt_0_Sn Lt.lt_n_0 | 85 | 86 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition lt_0_neq_stt := fun n Hlt => Nat.neq_sym n 0 (proj2 (Nat.neq_0_lt_0 n) Hlt). | #[local]
Definition lt_0_neq_stt | := fun n Hlt => Nat.neq_sym n 0 (proj2 (Nat.neq_0_lt_0 n) Hlt). | Definition | definition | lt_0_neq_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"neq_0_lt_0",
"neq_sym"
] | null | 89 | 90 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition lt_n_S_stt := fun n m => (proj1 (Nat.succ_lt_mono n m)). | #[local]
Definition lt_n_S_stt | := fun n m => (proj1 (Nat.succ_lt_mono n m)). | Definition | definition | lt_n_S_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"succ_lt_mono"
] | Lt.lt_n_Sn Lt.lt_S | 97 | 98 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition lt_S_n_stt := fun n m => (proj2 (Nat.succ_lt_mono n m)). | #[local]
Definition lt_S_n_stt | := fun n m => (proj2 (Nat.succ_lt_mono n m)). | Definition | definition | lt_S_n_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"succ_lt_mono"
] | Lt.lt_n_S | 103 | 104 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition lt_pred_stt := fun n m => proj1 (Nat.lt_succ_lt_pred n m). | #[local]
Definition lt_pred_stt | := fun n m => proj1 (Nat.lt_succ_lt_pred n m). | Definition | definition | lt_pred_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"lt_succ_lt_pred"
] | Lt.lt_S_n | 109 | 110 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition lt_pred_n_n_stt := fun n Hlt => Nat.lt_pred_l n (proj2 (Nat.neq_0_lt_0 n) Hlt). | #[local]
Definition lt_pred_n_n_stt | := fun n Hlt => Nat.lt_pred_l n (proj2 (Nat.neq_0_lt_0 n) Hlt). | Definition | definition | lt_pred_n_n_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"lt_pred_l",
"neq_0_lt_0"
] | Lt.lt_pred | 115 | 116 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition gt_Sn_O_stt : forall n, S n > 0 := Nat.lt_0_succ. | #[local]
Definition gt_Sn_O_stt : forall n, S n > 0 | := Nat.lt_0_succ. | Definition | definition | gt_Sn_O_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"S",
"lt_0_succ"
] | Lt.lt_le_weak | 125 | 126 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition gt_Sn_n_stt : forall n, S n > n := Nat.lt_succ_diag_r. | #[local]
Definition gt_Sn_n_stt : forall n, S n > n | := Nat.lt_succ_diag_r. | Definition | definition | gt_Sn_n_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"S",
"lt_succ_diag_r"
] | Gt.gt_Sn_O | 131 | 132 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition gt_n_S_stt : forall n m, n > m -> S n > S m := fun n m Hgt => proj1 (Nat.succ_lt_mono m n) Hgt. | #[local]
Definition gt_n_S_stt : forall n m, n > m -> S n > S m | := fun n m Hgt => proj1 (Nat.succ_lt_mono m n) Hgt. | Definition | definition | gt_n_S_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"S",
"succ_lt_mono"
] | Gt.gt_Sn_n | 137 | 138 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition gt_S_n_stt : forall n m, S m > S n -> m > n := fun n m Hgt => proj2 (Nat.succ_lt_mono n m) Hgt. | #[local]
Definition gt_S_n_stt : forall n m, S m > S n -> m > n | := fun n m Hgt => proj2 (Nat.succ_lt_mono n m) Hgt. | Definition | definition | gt_S_n_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"S",
"succ_lt_mono"
] | Gt.gt_n_S | 143 | 144 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition gt_pred_stt : forall n m, m > S n -> pred m > n := fun n m Hgt => proj1 (Nat.lt_succ_lt_pred n m) Hgt. | #[local]
Definition gt_pred_stt : forall n m, m > S n -> pred m > n | := fun n m Hgt => proj1 (Nat.lt_succ_lt_pred n m) Hgt. | Definition | definition | gt_pred_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"S",
"lt_succ_lt_pred",
"pred"
] | Gt.gt_S_n | 149 | 150 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition gt_irrefl_stt : forall n, ~ n > n := Nat.lt_irrefl. | #[local]
Definition gt_irrefl_stt : forall n, ~ n > n | := Nat.lt_irrefl. | Definition | definition | gt_irrefl_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"lt_irrefl"
] | Gt.gt_pred | 155 | 156 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition gt_asym_stt : forall n m, n > m -> ~ m > n := fun n m => Nat.lt_asymm m n. | #[local]
Definition gt_asym_stt : forall n m, n > m -> ~ m > n | := fun n m => Nat.lt_asymm m n. | Definition | definition | gt_asym_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"lt_asymm"
] | Gt.gt_irrefl | 161 | 162 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition le_not_gt_stt : forall n m, n <= m -> ~ n > m := fun n m => proj1 (Nat.le_ngt n m). | #[local]
Definition le_not_gt_stt : forall n m, n <= m -> ~ n > m | := fun n m => proj1 (Nat.le_ngt n m). | Definition | definition | le_not_gt_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"le_ngt"
] | Gt.gt_asym | 167 | 168 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition gt_not_le_stt: forall n m, n > m -> ~ n <= m := fun n m => proj1 (Nat.lt_nge m n). | #[local]
Definition gt_not_le_stt: forall n m, n > m -> ~ n <= m | := fun n m => proj1 (Nat.lt_nge m n). | Definition | definition | gt_not_le_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"lt_nge"
] | Gt.le_not_gt | 173 | 174 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition le_S_gt_stt: forall n m, S n <= m -> m > n := fun n m => proj1 (Nat.le_succ_l n m). | #[local]
Definition le_S_gt_stt: forall n m, S n <= m -> m > n | := fun n m => proj1 (Nat.le_succ_l n m). | Definition | definition | le_S_gt_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"S",
"le_succ_l"
] | Gt.gt_not_le | 179 | 180 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition gt_S_le_stt : forall n m, S m > n -> n <= m := fun n m => proj2 (Nat.succ_le_mono n m). | #[local]
Definition gt_S_le_stt : forall n m, S m > n -> n <= m | := fun n m => proj2 (Nat.succ_le_mono n m). | Definition | definition | gt_S_le_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"S",
"succ_le_mono"
] | Gt.le_S_gt | 185 | 186 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition gt_le_S_stt : forall n m, m > n -> S n <= m := fun n m => proj2 (Nat.le_succ_l n m). | #[local]
Definition gt_le_S_stt : forall n m, m > n -> S n <= m | := fun n m => proj2 (Nat.le_succ_l n m). | Definition | definition | gt_le_S_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"S",
"le_succ_l"
] | Gt.gt_S_le | 191 | 192 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition le_gt_S_stt : forall n m, n <= m -> S m > n := fun n m => proj1 (Nat.succ_le_mono n m). | #[local]
Definition le_gt_S_stt : forall n m, n <= m -> S m > n | := fun n m => proj1 (Nat.succ_le_mono n m). | Definition | definition | le_gt_S_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"S",
"succ_le_mono"
] | Gt.gt_le_S | 197 | 198 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition gt_trans_S_stt : forall n m p, S n > m -> m > p -> n > p
:= fun n m p Hgt1 Hgt2 => Nat.lt_le_trans p m n Hgt2 (proj2 (Nat.succ_le_mono _ _) Hgt1). | #[local]
Definition gt_trans_S_stt : forall n m p, S n > m -> m > p -> n > p | := fun n m p Hgt1 Hgt2 => Nat.lt_le_trans p m n Hgt2 (proj2 (Nat.succ_le_mono _ _) Hgt1). | Definition | definition | gt_trans_S_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"S",
"lt_le_trans",
"p",
"succ_le_mono"
] | Gt.le_gt_S | 203 | 205 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition le_gt_trans_stt : forall n m p, m <= n -> m > p -> n > p
:= fun n m p Hle Hgt => Nat.lt_le_trans p m n Hgt Hle. | #[local]
Definition le_gt_trans_stt : forall n m p, m <= n -> m > p -> n > p | := fun n m p Hle Hgt => Nat.lt_le_trans p m n Hgt Hle. | Definition | definition | le_gt_trans_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"lt_le_trans",
"p"
] | Gt.gt_trans_S | 210 | 212 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition gt_le_trans_stt : forall n m p, n > m -> p <= m -> n > p
:= fun n m p Hgt Hle => Nat.le_lt_trans p m n Hle Hgt. | #[local]
Definition gt_le_trans_stt : forall n m p, n > m -> p <= m -> n > p | := fun n m p Hgt Hle => Nat.le_lt_trans p m n Hle Hgt. | Definition | definition | gt_le_trans_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"le_lt_trans",
"p"
] | Gt.le_gt_trans | 217 | 219 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition plus_gt_compat_l_stt : forall n m p, n > m -> p + n > p + m
:= fun n m p Hgt => proj1 (Nat.add_lt_mono_l m n p) Hgt. | #[local]
Definition plus_gt_compat_l_stt : forall n m p, n > m -> p + n > p + m | := fun n m p Hgt => proj1 (Nat.add_lt_mono_l m n p) Hgt. | Definition | definition | plus_gt_compat_l_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"add_lt_mono_l",
"p"
] | Gt.gt_le_trans | 224 | 226 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition plus_assoc_reverse_stt := fun n m p => eq_sym (Nat.add_assoc n m p). | #[local]
Definition plus_assoc_reverse_stt | := fun n m p => eq_sym (Nat.add_assoc n m p). | Definition | definition | plus_assoc_reverse_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"add_assoc",
"eq_sym",
"p"
] | Plus.plus_assoc | 237 | 238 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition le_plus_r_stt := (fun n m => Nat.le_add_l m n). | #[local]
Definition le_plus_r_stt | := (fun n m => Nat.le_add_l m n). | Definition | definition | le_plus_r_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"le_add_l"
] | Plus.plus_le_compat_r | 247 | 248 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition le_plus_trans_stt := (fun n m p Hle => Nat.le_trans n _ _ Hle (Nat.le_add_r m p)). | #[local]
Definition le_plus_trans_stt | := (fun n m p Hle => Nat.le_trans n _ _ Hle (Nat.le_add_r m p)). | Definition | definition | le_plus_trans_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"le_add_r",
"le_trans",
"p"
] | null | 249 | 250 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition lt_plus_trans_stt := (fun n m p Hlt => Nat.lt_le_trans n _ _ Hlt (Nat.le_add_r m p)). | #[local]
Definition lt_plus_trans_stt | := (fun n m p Hlt => Nat.lt_le_trans n _ _ Hlt (Nat.le_add_r m p)). | Definition | definition | lt_plus_trans_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"le_add_r",
"lt_le_trans",
"p"
] | Plus.le_plus_l Plus.le_plus_r_stt Plus.le_plus_trans_stt | 256 | 257 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition minus_n_O_stt := fun n => eq_sym (Nat.sub_0_r n). | #[local]
Definition minus_n_O_stt | := fun n => eq_sym (Nat.sub_0_r n). | Definition | definition | minus_n_O_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"eq_sym",
"sub_0_r"
] | ** [sub] | 269 | 270 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition minus_Sn_m_stt := fun n m Hle => eq_sym (Nat.sub_succ_l m n Hle). | #[local]
Definition minus_Sn_m_stt | := fun n m Hle => eq_sym (Nat.sub_succ_l m n Hle). | Definition | definition | minus_Sn_m_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"eq_sym",
"sub_succ_l"
] | Minus.minus_n_O | 275 | 276 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition minus_diag_reverse_stt := fun n => eq_sym (Nat.sub_diag n). | #[local]
Definition minus_diag_reverse_stt | := fun n => eq_sym (Nat.sub_diag n). | Definition | definition | minus_diag_reverse_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"eq_sym",
"sub_diag"
] | Minus.minus_Sn_m | 281 | 282 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Lemma minus_plus_simpl_l_reverse_stt n m p : n - m = p + n - (p + m).
Proof.
now rewrite Nat.sub_add_distr, Nat.add_comm, Nat.add_sub.
Qed. | #[local]
Lemma minus_plus_simpl_l_reverse_stt n m p : n - m = p + n - (p + m). | Proof.
now rewrite Nat.sub_add_distr, Nat.add_comm, Nat.add_sub.
Qed. | Lemma | theorem | minus_plus_simpl_l_reverse_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"add_comm",
"add_sub",
"p",
"sub_add_distr"
] | Minus.minus_diag_reverse | 287 | 291 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition plus_minus_stt := fun n m p Heq => eq_sym (Nat.add_sub_eq_l n m p (eq_sym Heq)). | #[local]
Definition plus_minus_stt | := fun n m p Heq => eq_sym (Nat.add_sub_eq_l n m p (eq_sym Heq)). | Definition | definition | plus_minus_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"add_sub_eq_l",
"eq_sym",
"p"
] | Minus.minus_plus_simpl_l_reverse | 295 | 296 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition minus_plus_stt := (fun n m => eq_ind _ (fun x => x - n = m) (Nat.add_sub m n) _ (Nat.add_comm _ _)). | #[local]
Definition minus_plus_stt | := (fun n m => eq_ind _ (fun x => x - n = m) (Nat.add_sub m n) _ (Nat.add_comm _ _)). | Definition | definition | minus_plus_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"add_comm",
"add_sub"
] | Minus.plus_minus | 301 | 302 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition le_plus_minus_stt := fun n m Hle => eq_sym (eq_trans (Nat.add_comm _ _) (Nat.sub_add n m Hle)). | #[local]
Definition le_plus_minus_stt | := fun n m Hle => eq_sym (eq_trans (Nat.add_comm _ _) (Nat.sub_add n m Hle)). | Definition | definition | le_plus_minus_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"add_comm",
"eq_sym",
"eq_trans",
"sub_add"
] | Minus.minus_plus | 307 | 308 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition le_plus_minus_r_stt := fun n m Hle => eq_trans (Nat.add_comm _ _) (Nat.sub_add n m Hle). | #[local]
Definition le_plus_minus_r_stt | := fun n m Hle => eq_trans (Nat.add_comm _ _) (Nat.sub_add n m Hle). | Definition | definition | le_plus_minus_r_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"add_comm",
"eq_trans",
"sub_add"
] | Minus.le_plus_minus | 313 | 314 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition lt_O_minus_lt_stt : forall n m, 0 < n - m -> m < n
:= fun n m => proj2 (Nat.lt_add_lt_sub_r 0 n m). | #[local]
Definition lt_O_minus_lt_stt : forall n m, 0 < n - m -> m < n | := fun n m => proj2 (Nat.lt_add_lt_sub_r 0 n m). | Definition | definition | lt_O_minus_lt_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"lt_add_lt_sub_r"
] | Minus.lt_minus | 321 | 323 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition mult_assoc_reverse_stt := fun n m p => eq_sym (Nat.mul_assoc n m p). | #[local]
Definition mult_assoc_reverse_stt | := fun n m p => eq_sym (Nat.mul_assoc n m p). | Definition | definition | mult_assoc_reverse_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"eq_sym",
"mul_assoc",
"p"
] | Mult.mult_minus_distr_l | 340 | 341 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Lemma mult_O_le_stt n m : m = 0 \/ n <= m * n.
Proof.
destruct m; [left|right]; simpl; trivial using Nat.le_add_r.
Qed. | #[local]
Lemma mult_O_le_stt n m : m = 0 \/ n <= m * n. | Proof.
destruct m; [left|right]; simpl; trivial using Nat.le_add_r.
Qed. | Lemma | theorem | mult_O_le_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"le_add_r",
"left",
"right"
] | Mult.mult_assoc_reverse Mult.mult_assoc | 346 | 350 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[local]
Definition mult_S_lt_compat_l_stt := (fun n m p Hlt => proj1 (Nat.mul_lt_mono_pos_l (S n) m p (Nat.lt_0_succ n)) Hlt). | #[local]
Definition mult_S_lt_compat_l_stt | := (fun n m p Hlt => proj1 (Nat.mul_lt_mono_pos_l (S n) m p (Nat.lt_0_succ n)) Hlt). | Definition | definition | mult_S_lt_compat_l_stt | Arith | theories/Arith/Arith_base.v | [
"Stdlib",
"Factorial",
"Between",
"Peano_dec",
"Compare_dec",
"EqNat",
"Wf_nat"
] | [
"S",
"lt_0_succ",
"mul_lt_mono_pos_l",
"p"
] | Mult.mult_le_compat_l | 356 | 357 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Inductive between k : nat -> Prop :=
| bet_emp : between k k
| bet_S : forall l, between k l -> P l -> between k (S l). | Inductive between k : nat -> Prop | :=
| bet_emp : between k k
| bet_S : forall l, between k l -> P l -> between k (S l). | Inductive | inductive | between | Arith | theories/Arith/Between.v | [] | [
"P",
"S"
] | The [between] type expresses the concept
[forall i: nat, k <= i < l -> P i.]. | 22 | 24 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma bet_eq : forall k l, l = k -> between k l.
Proof.
intros * ->; constructor.
Qed. | Lemma bet_eq : forall k l, l = k -> between k l. | Proof.
intros * ->; constructor.
Qed. | Lemma | theorem | bet_eq | Arith | theories/Arith/Between.v | [] | [
"between"
] | null | 29 | 32 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma between_le : forall k l, between k l -> k <= l.
Proof.
induction 1; auto.
Qed. | Lemma between_le : forall k l, between k l -> k <= l. | Proof.
induction 1; auto.
Qed. | Lemma | theorem | between_le | Arith | theories/Arith/Between.v | [] | [
"between",
"induction"
] | null | 37 | 40 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma between_Sk_l : forall k l, between k l -> S k <= l -> between (S k) l.
Proof.
induction 1 as [|* [|]]; auto.
- intros Hle; exfalso; apply (Nat.nle_succ_diag_l _ Hle).
- intros Hle; inversion Hle; constructor; auto.
Qed. | Lemma between_Sk_l : forall k l, between k l -> S k <= l -> between (S k) l. | Proof.
induction 1 as [|* [|]]; auto.
- intros Hle; exfalso; apply (Nat.nle_succ_diag_l _ Hle).
- intros Hle; inversion Hle; constructor; auto.
Qed. | Lemma | theorem | between_Sk_l | Arith | theories/Arith/Between.v | [] | [
"S",
"between",
"induction",
"nle_succ_diag_l"
] | null | 44 | 49 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma between_restr :
forall k l (m:nat), k <= l -> l <= m -> between k m -> between l m.
Proof.
induction 1; auto.
intros; auto.
apply between_Sk_l; auto.
apply IHle; auto.
transitivity (S m0); auto.
Qed. | Lemma between_restr :
forall k l (m:nat), k <= l -> l <= m -> between k m -> between l m. | Proof.
induction 1; auto.
intros; auto.
apply between_Sk_l; auto.
apply IHle; auto.
transitivity (S m0); auto.
Qed. | Lemma | theorem | between_restr | Arith | theories/Arith/Between.v | [] | [
"S",
"between",
"between_Sk_l",
"induction"
] | null | 53 | 61 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Inductive exists_between k : nat -> Prop :=
| exists_S : forall l, exists_between k l -> exists_between k (S l)
| exists_le : forall l, k <= l -> Q l -> exists_between k (S l). | Inductive exists_between k : nat -> Prop | :=
| exists_S : forall l, exists_between k l -> exists_between k (S l)
| exists_le : forall l, k <= l -> Q l -> exists_between k (S l). | Inductive | inductive | exists_between | Arith | theories/Arith/Between.v | [] | [
"Q",
"S"
] | The [exists_between] type expresses the concept
[exists i: nat, k <= i < l /\ Q i]. | 65 | 67 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma exists_le_S : forall k l, exists_between k l -> S k <= l.
Proof.
induction 1; auto.
apply -> Nat.succ_le_mono; assumption.
Qed. | Lemma exists_le_S : forall k l, exists_between k l -> S k <= l. | Proof.
induction 1; auto.
apply -> Nat.succ_le_mono; assumption.
Qed. | Lemma | theorem | exists_le_S | Arith | theories/Arith/Between.v | [] | [
"S",
"exists_between",
"induction",
"succ_le_mono"
] | null | 72 | 76 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma exists_lt : forall k l, exists_between k l -> k < l.
Proof.
exact exists_le_S.
Qed. | Lemma exists_lt : forall k l, exists_between k l -> k < l. | Proof.
exact exists_le_S.
Qed. | Lemma | theorem | exists_lt | Arith | theories/Arith/Between.v | [] | [
"exists_between",
"exists_le_S"
] | null | 78 | 81 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma exists_S_le : forall k l, exists_between k (S l) -> k <= l.
Proof.
intros; apply le_S_n; auto.
Qed. | Lemma exists_S_le : forall k l, exists_between k (S l) -> k <= l. | Proof.
intros; apply le_S_n; auto.
Qed. | Lemma | theorem | exists_S_le | Arith | theories/Arith/Between.v | [] | [
"S",
"exists_between"
] | null | 85 | 88 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Definition in_int p q r := p <= r /\ r < q. | Definition in_int p q r | := p <= r /\ r < q. | Definition | definition | in_int | Arith | theories/Arith/Between.v | [] | [
"p",
"r"
] | null | 92 | 92 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma in_int_intro : forall p q r, p <= r -> r < q -> in_int p q r.
Proof.
split; assumption.
Qed. | Lemma in_int_intro : forall p q r, p <= r -> r < q -> in_int p q r. | Proof.
split; assumption.
Qed. | Lemma | theorem | in_int_intro | Arith | theories/Arith/Between.v | [] | [
"in_int",
"p",
"r",
"split"
] | null | 94 | 97 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma in_int_lt : forall p q r, in_int p q r -> p < q.
Proof.
intros * [].
eapply Nat.le_lt_trans; eassumption.
Qed. | Lemma in_int_lt : forall p q r, in_int p q r -> p < q. | Proof.
intros * [].
eapply Nat.le_lt_trans; eassumption.
Qed. | Lemma | theorem | in_int_lt | Arith | theories/Arith/Between.v | [] | [
"in_int",
"le_lt_trans",
"p",
"r"
] | null | 101 | 105 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma in_int_p_Sq :
forall p q r, in_int p (S q) r -> in_int p q r \/ r = q.
Proof.
intros p q r [].
destruct (proj1 (Nat.lt_eq_cases r q)); auto.
apply Nat.lt_succ_r; assumption.
Qed. | Lemma in_int_p_Sq :
forall p q r, in_int p (S q) r -> in_int p q r \/ r = q. | Proof.
intros p q r [].
destruct (proj1 (Nat.lt_eq_cases r q)); auto.
apply Nat.lt_succ_r; assumption.
Qed. | Lemma | theorem | in_int_p_Sq | Arith | theories/Arith/Between.v | [] | [
"S",
"in_int",
"lt_eq_cases",
"lt_succ_r",
"p",
"r"
] | null | 107 | 113 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma in_int_S : forall p q r, in_int p q r -> in_int p (S q) r.
Proof.
intros * []; auto.
Qed. | Lemma in_int_S : forall p q r, in_int p q r -> in_int p (S q) r. | Proof.
intros * []; auto.
Qed. | Lemma | theorem | in_int_S | Arith | theories/Arith/Between.v | [] | [
"S",
"in_int",
"p",
"r"
] | null | 115 | 118 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma in_int_Sp_q : forall p q r, in_int (S p) q r -> in_int p q r.
Proof.
intros * []; auto.
apply in_int_intro; auto.
transitivity (S p); auto.
Qed. | Lemma in_int_Sp_q : forall p q r, in_int (S p) q r -> in_int p q r. | Proof.
intros * []; auto.
apply in_int_intro; auto.
transitivity (S p); auto.
Qed. | Lemma | theorem | in_int_Sp_q | Arith | theories/Arith/Between.v | [] | [
"S",
"in_int",
"in_int_intro",
"p",
"r"
] | null | 122 | 127 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma between_in_int :
forall k l, between k l -> forall r, in_int k l r -> P r.
Proof.
intro k; induction 1 as [|l]; intros r ?.
- absurd (k < k). { apply Nat.lt_irrefl. }
eapply in_int_lt; eassumption.
- destruct (in_int_p_Sq k l r) as [| ->]; auto.
Qed. | Lemma between_in_int :
forall k l, between k l -> forall r, in_int k l r -> P r. | Proof.
intro k; induction 1 as [|l]; intros r ?.
- absurd (k < k). { apply Nat.lt_irrefl. }
eapply in_int_lt; eassumption.
- destruct (in_int_p_Sq k l r) as [| ->]; auto.
Qed. | Lemma | theorem | between_in_int | Arith | theories/Arith/Between.v | [] | [
"P",
"between",
"in_int",
"in_int_lt",
"in_int_p_Sq",
"induction",
"lt_irrefl",
"r"
] | null | 131 | 138 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma in_int_between :
forall k l, k <= l -> (forall r, in_int k l r -> P r) -> between k l.
Proof.
induction 1; auto.
Qed. | Lemma in_int_between :
forall k l, k <= l -> (forall r, in_int k l r -> P r) -> between k l. | Proof.
induction 1; auto.
Qed. | Lemma | theorem | in_int_between | Arith | theories/Arith/Between.v | [] | [
"P",
"between",
"in_int",
"induction",
"r"
] | null | 140 | 144 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma exists_in_int :
forall k l, exists_between k l -> exists2 m : nat, in_int k l m & Q m.
Proof.
induction 1 as [* ? (p, ?, ?)|l].
- exists p; auto.
- exists l; auto.
Qed. | Lemma exists_in_int :
forall k l, exists_between k l -> exists2 m : nat, in_int k l m & Q m. | Proof.
induction 1 as [* ? (p, ?, ?)|l].
- exists p; auto.
- exists l; auto.
Qed. | Lemma | theorem | exists_in_int | Arith | theories/Arith/Between.v | [] | [
"Q",
"exists_between",
"in_int",
"induction",
"p"
] | null | 146 | 152 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma in_int_exists : forall k l r, in_int k l r -> Q r -> exists_between k l.
Proof.
intros * (?, lt_r_l) ?.
induction lt_r_l; auto.
Qed. | Lemma in_int_exists : forall k l r, in_int k l r -> Q r -> exists_between k l. | Proof.
intros * (?, lt_r_l) ?.
induction lt_r_l; auto.
Qed. | Lemma | theorem | in_int_exists | Arith | theories/Arith/Between.v | [] | [
"Q",
"exists_between",
"in_int",
"induction",
"r"
] | null | 154 | 158 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma between_or_exists :
forall k l,
k <= l ->
(forall n:nat, in_int k l n -> P n \/ Q n) ->
between k l \/ exists_between k l.
Proof.
induction 1 as [|m ? IHle].
- auto.
- intros P_or_Q.
destruct IHle; auto.
destruct (P_or_Q m); auto.
Qed. | Lemma between_or_exists :
forall k l,
k <= l ->
(forall n:nat, in_int k l n -> P n \/ Q n) ->
between k l \/ exists_between k l. | Proof.
induction 1 as [|m ? IHle].
- auto.
- intros P_or_Q.
destruct IHle; auto.
destruct (P_or_Q m); auto.
Qed. | Lemma | theorem | between_or_exists | Arith | theories/Arith/Between.v | [] | [
"P",
"Q",
"between",
"exists_between",
"in_int",
"induction"
] | null | 160 | 171 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma between_not_exists :
forall k l,
between k l ->
(forall n:nat, in_int k l n -> P n -> ~ Q n) -> ~ exists_between k l.
Proof.
intro k; induction 1 as [|l]; red; intros.
- absurd (k < k). { apply Nat.lt_irrefl. } auto.
- absurd (Q l). { auto. }
destruct (exists_in_int k (S l)) as... | Lemma between_not_exists :
forall k l,
between k l ->
(forall n:nat, in_int k l n -> P n -> ~ Q n) -> ~ exists_between k l. | Proof.
intro k; induction 1 as [|l]; red; intros.
- absurd (k < k). { apply Nat.lt_irrefl. } auto.
- absurd (Q l). { auto. }
destruct (exists_in_int k (S l)) as (l',[],?).
+ auto.
+ replace l with l'. { trivial. }
destruct (proj1 (Nat.lt_eq_cases l' l)); auto.
* apply Nat.l... | Lemma | theorem | between_not_exists | Arith | theories/Arith/Between.v | [] | [
"P",
"Q",
"S",
"between",
"exists_between",
"exists_in_int",
"in_int",
"in_int_exists",
"induction",
"lt_eq_cases",
"lt_irrefl",
"lt_succ_r",
"replace"
] | null | 173 | 188 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Inductive P_nth (init:nat) : nat -> nat -> Prop :=
| nth_O : P_nth init init 0
| nth_S :
forall k l (n:nat),
P_nth init k n -> between (S k) l -> Q l -> P_nth init l (S n). | Inductive P_nth (init:nat) : nat -> nat -> Prop | :=
| nth_O : P_nth init init 0
| nth_S :
forall k l (n:nat),
P_nth init k n -> between (S k) l -> Q l -> P_nth init l (S n). | Inductive | inductive | P_nth | Arith | theories/Arith/Between.v | [] | [
"Q",
"S",
"between",
"init"
] | null | 190 | 194 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma nth_le : forall (init:nat) l (n:nat), P_nth init l n -> init <= l.
Proof.
induction 1 as [|a b c H0 H1 H2 H3].
- auto.
- eapply Nat.le_trans; eauto.
apply between_le in H2.
transitivity (S a); auto.
Qed. | Lemma nth_le : forall (init:nat) l (n:nat), P_nth init l n -> init <= l. | Proof.
induction 1 as [|a b c H0 H1 H2 H3].
- auto.
- eapply Nat.le_trans; eauto.
apply between_le in H2.
transitivity (S a); auto.
Qed. | Lemma | theorem | nth_le | Arith | theories/Arith/Between.v | [] | [
"P_nth",
"S",
"between_le",
"induction",
"init",
"le_trans"
] | null | 196 | 203 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Definition eventually (n:nat) := exists2 k : nat, k <= n & Q k. | Definition eventually (n:nat) | := exists2 k : nat, k <= n & Q k. | Definition | definition | eventually | Arith | theories/Arith/Between.v | [] | [
"Q"
] | null | 205 | 205 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma event_O : eventually 0 -> Q 0.
Proof.
intros (x, ?, ?).
replace 0 with x; auto.
apply Nat.le_0_r; assumption.
Qed. | Lemma event_O : eventually 0 -> Q 0. | Proof.
intros (x, ?, ?).
replace 0 with x; auto.
apply Nat.le_0_r; assumption.
Qed. | Lemma | theorem | event_O | Arith | theories/Arith/Between.v | [] | [
"Q",
"eventually",
"le_0_r",
"replace"
] | null | 207 | 212 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[deprecated(since="8.20", note="Use Coq.Arith.Compare_dec.zerop instead")]
Definition notzerop n := sumbool_not _ _ (zerop n). | #[deprecated(since="8.20", note="Use Coq.Arith.Compare_dec.zerop instead")]
Definition notzerop n | := sumbool_not _ _ (zerop n). | Definition | definition | notzerop | Arith | theories/Arith/Bool_nat.v | [
"Stdlib",
"Compare_dec",
"Peano_dec",
"Sumbool"
] | [
"zerop"
] | The decidability of equality and order relations over
type [nat] give some boolean functions with the adequate specification. | 23 | 24 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[deprecated(since="8.20",
note="Use Arith.Compare_dec.lt_dec and PeanoNat.Nat.nlt_ge instead")]
Definition lt_ge_dec : forall x y, {x < y} + {x >= y} :=
fun n m => sumbool_not _ _ (le_lt_dec m n). | #[deprecated(since="8.20",
note="Use Arith.Compare_dec.lt_dec and PeanoNat.Nat.nlt_ge instead")]
Definition lt_ge_dec : forall x y, {x < y} + {x >= y} | :=
fun n m => sumbool_not _ _ (le_lt_dec m n). | Definition | definition | lt_ge_dec | Arith | theories/Arith/Bool_nat.v | [
"Stdlib",
"Compare_dec",
"Peano_dec",
"Sumbool"
] | [
"and",
"le_lt_dec",
"lt_dec",
"nlt_ge"
] | null | 26 | 29 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[deprecated(since="8.20", note="Use PeanoNat.Nat.ltb instead")]
Definition nat_lt_ge_bool x y := bool_of_sumbool (lt_ge_dec x y). | #[deprecated(since="8.20", note="Use PeanoNat.Nat.ltb instead")]
Definition nat_lt_ge_bool x y | := bool_of_sumbool (lt_ge_dec x y). | Definition | definition | nat_lt_ge_bool | Arith | theories/Arith/Bool_nat.v | [
"Stdlib",
"Compare_dec",
"Peano_dec",
"Sumbool"
] | [
"lt_ge_dec",
"ltb"
] | null | 31 | 32 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[deprecated(since="8.20", note="Use PeanoNat.Nat.leb instead")]
Definition nat_ge_lt_bool x y :=
bool_of_sumbool (sumbool_not _ _ (lt_ge_dec x y)). | #[deprecated(since="8.20", note="Use PeanoNat.Nat.leb instead")]
Definition nat_ge_lt_bool x y | :=
bool_of_sumbool (sumbool_not _ _ (lt_ge_dec x y)). | Definition | definition | nat_ge_lt_bool | Arith | theories/Arith/Bool_nat.v | [
"Stdlib",
"Compare_dec",
"Peano_dec",
"Sumbool"
] | [
"leb",
"lt_ge_dec"
] | null | 34 | 36 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[deprecated(since="8.20", note="Use PeanoNat.Nat.leb instead")]
Definition nat_le_gt_bool x y := bool_of_sumbool (le_gt_dec x y). | #[deprecated(since="8.20", note="Use PeanoNat.Nat.leb instead")]
Definition nat_le_gt_bool x y | := bool_of_sumbool (le_gt_dec x y). | Definition | definition | nat_le_gt_bool | Arith | theories/Arith/Bool_nat.v | [
"Stdlib",
"Compare_dec",
"Peano_dec",
"Sumbool"
] | [
"le_gt_dec",
"leb"
] | null | 38 | 39 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[deprecated(since="8.20", note="Use PeanoNat.Nat.ltb instead")]
Definition nat_gt_le_bool x y :=
bool_of_sumbool (sumbool_not _ _ (le_gt_dec x y)). | #[deprecated(since="8.20", note="Use PeanoNat.Nat.ltb instead")]
Definition nat_gt_le_bool x y | :=
bool_of_sumbool (sumbool_not _ _ (le_gt_dec x y)). | Definition | definition | nat_gt_le_bool | Arith | theories/Arith/Bool_nat.v | [
"Stdlib",
"Compare_dec",
"Peano_dec",
"Sumbool"
] | [
"le_gt_dec",
"ltb"
] | null | 41 | 43 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[deprecated(since="8.20", note="Use PeanoNat.Nat.eqb instead")]
Definition nat_eq_bool x y := bool_of_sumbool (eq_nat_dec x y). | #[deprecated(since="8.20", note="Use PeanoNat.Nat.eqb instead")]
Definition nat_eq_bool x y | := bool_of_sumbool (eq_nat_dec x y). | Definition | definition | nat_eq_bool | Arith | theories/Arith/Bool_nat.v | [
"Stdlib",
"Compare_dec",
"Peano_dec",
"Sumbool"
] | [
"eq_nat_dec",
"eqb"
] | null | 45 | 46 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[deprecated(since="8.20", note="Use PeanoNat.Nat.eqb instead")]
Definition nat_noteq_bool x y :=
bool_of_sumbool (sumbool_not _ _ (eq_nat_dec x y)). | #[deprecated(since="8.20", note="Use PeanoNat.Nat.eqb instead")]
Definition nat_noteq_bool x y | :=
bool_of_sumbool (sumbool_not _ _ (eq_nat_dec x y)). | Definition | definition | nat_noteq_bool | Arith | theories/Arith/Bool_nat.v | [
"Stdlib",
"Compare_dec",
"Peano_dec",
"Sumbool"
] | [
"eq_nat_dec",
"eqb"
] | null | 48 | 50 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[deprecated(since="8.20", note="Use Coq.Arith.Compare_dec.zerop instead")]
Definition zerop_bool x := bool_of_sumbool (zerop x). | #[deprecated(since="8.20", note="Use Coq.Arith.Compare_dec.zerop instead")]
Definition zerop_bool x | := bool_of_sumbool (zerop x). | Definition | definition | zerop_bool | Arith | theories/Arith/Bool_nat.v | [
"Stdlib",
"Compare_dec",
"Peano_dec",
"Sumbool"
] | [
"zerop"
] | null | 52 | 53 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
#[deprecated(since="8.20", note="Use Coq.Arith.Compare_dec.zerop instead")]
Definition notzerop_bool x := bool_of_sumbool (notzerop x). | #[deprecated(since="8.20", note="Use Coq.Arith.Compare_dec.zerop instead")]
Definition notzerop_bool x | := bool_of_sumbool (notzerop x). | Definition | definition | notzerop_bool | Arith | theories/Arith/Bool_nat.v | [
"Stdlib",
"Compare_dec",
"Peano_dec",
"Sumbool"
] | [
"notzerop",
"zerop"
] | null | 55 | 56 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Definition to_nat '(x, y) : nat :=
y + (nat_rec _ 0 (fun i m => (S i) + m) (y + x)). | Definition to_nat '(x, y) : nat | :=
y + (nat_rec _ 0 (fun i m => (S i) + m) (y + x)). | Definition | definition | to_nat | Arith | theories/Arith/Cantor.v | [] | [
"S"
] | Cantor pairing [to_nat] | 19 | 20 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Definition of_nat (n : nat) : nat * nat :=
nat_rec _ (0, 0) (fun _ '(x, y) =>
match x with | S x => (x, S y) | _ => (S y, 0) end) n. | Definition of_nat (n : nat) : nat * nat | :=
nat_rec _ (0, 0) (fun _ '(x, y) =>
match x with | S x => (x, S y) | _ => (S y, 0) end) n. | Definition | definition | of_nat | Arith | theories/Arith/Cantor.v | [] | [
"S"
] | Cantor pairing inverse [of_nat] | 24 | 26 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma cancel_of_to p : of_nat (to_nat p) = p.
Proof.
enough (H : forall n p, to_nat p = n -> of_nat n = p) by now apply H.
intro n. induction n as [|n IHn].
- now intros [[|?] [|?]].
- intros [x [|y]].
+ destruct x as [|x]; [discriminate|].
intros [=H]. cbn. fold (of_nat n).
rewrite (IHn (0, x))... | Lemma cancel_of_to p : of_nat (to_nat p) = p. | Proof.
enough (H : forall n p, to_nat p = n -> of_nat n = p) by now apply H.
intro n. induction n as [|n IHn].
- now intros [[|?] [|?]].
- intros [x [|y]].
+ destruct x as [|x]; [discriminate|].
intros [=H]. cbn. fold (of_nat n).
rewrite (IHn (0, x)); [reflexivity|].
rewrite <- H. cbn. now... | Lemma | theorem | cancel_of_to | Arith | theories/Arith/Cantor.v | [] | [
"S",
"add_0_r",
"add_succ_r",
"fold",
"induction",
"of_nat",
"p",
"to_nat"
] | [of_nat] is the left inverse for [to_nat] | 30 | 43 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Corollary to_nat_inj p q : to_nat p = to_nat q -> p = q.
Proof.
intros H %(f_equal of_nat). now rewrite ?cancel_of_to in H.
Qed. | Corollary to_nat_inj p q : to_nat p = to_nat q -> p = q. | Proof.
intros H %(f_equal of_nat). now rewrite ?cancel_of_to in H.
Qed. | Corollary | theorem | to_nat_inj | Arith | theories/Arith/Cantor.v | [] | [
"cancel_of_to",
"of_nat",
"p",
"to_nat"
] | [to_nat] is injective | 47 | 50 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma cancel_to_of n : to_nat (of_nat n) = n.
Proof.
induction n as [|n IHn]; [reflexivity|].
cbn. fold (of_nat n). destruct (of_nat n) as [[|x] y].
- rewrite <- IHn. cbn. now rewrite PeanoNat.Nat.add_0_r.
- rewrite <- IHn. cbn. now rewrite (Nat.add_succ_r y x).
Qed. | Lemma cancel_to_of n : to_nat (of_nat n) = n. | Proof.
induction n as [|n IHn]; [reflexivity|].
cbn. fold (of_nat n). destruct (of_nat n) as [[|x] y].
- rewrite <- IHn. cbn. now rewrite PeanoNat.Nat.add_0_r.
- rewrite <- IHn. cbn. now rewrite (Nat.add_succ_r y x).
Qed. | Lemma | theorem | cancel_to_of | Arith | theories/Arith/Cantor.v | [] | [
"add_0_r",
"add_succ_r",
"fold",
"induction",
"of_nat",
"to_nat"
] | [to_nat] is the left inverse for [of_nat] | 54 | 60 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Corollary of_nat_inj n m : of_nat n = of_nat m -> n = m.
Proof.
intros H %(f_equal to_nat). now rewrite ?cancel_to_of in H.
Qed. | Corollary of_nat_inj n m : of_nat n = of_nat m -> n = m. | Proof.
intros H %(f_equal to_nat). now rewrite ?cancel_to_of in H.
Qed. | Corollary | theorem | of_nat_inj | Arith | theories/Arith/Cantor.v | [] | [
"cancel_to_of",
"of_nat",
"to_nat"
] | [of_nat] is injective | 64 | 67 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma to_nat_spec x y :
to_nat (x, y) * 2 = y * 2 + (y + x) * S (y + x).
Proof.
cbn; induction (y + x) as [|n IHn]; cbn; [now rewrite !Nat.add_0_r|].
rewrite <-plus_Sn_m, Nat.add_assoc, (Nat.add_comm y), <-Nat.add_assoc.
rewrite Nat.mul_add_distr_r, IHn, Nat.add_comm, <-Nat.add_assoc.
apply f_equal2; [reflexi... | Lemma to_nat_spec x y :
to_nat (x, y) * 2 = y * 2 + (y + x) * S (y + x). | Proof.
cbn; induction (y + x) as [|n IHn]; cbn; [now rewrite !Nat.add_0_r|].
rewrite <-plus_Sn_m, Nat.add_assoc, (Nat.add_comm y), <-Nat.add_assoc.
rewrite Nat.mul_add_distr_r, IHn, Nat.add_comm, <-Nat.add_assoc.
apply f_equal2; [reflexivity|].
rewrite Nat.mul_comm, <-Nat.mul_add_distr_l.
rewrite <-!plus_Sn... | Lemma | theorem | to_nat_spec | Arith | theories/Arith/Cantor.v | [] | [
"S",
"add_0_r",
"add_1_r",
"add_assoc",
"add_comm",
"induction",
"mul_1_l",
"mul_add_distr_l",
"mul_add_distr_r",
"mul_comm",
"to_nat"
] | Polynomial specifications of [to_nat] | 71 | 82 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma to_nat_spec2 x y :
to_nat (x, y) = y + (y + x) * S (y + x) / 2.
Proof.
now rewrite <- Nat.div_add_l, <- to_nat_spec, Nat.div_mul.
Qed. | Lemma to_nat_spec2 x y :
to_nat (x, y) = y + (y + x) * S (y + x) / 2. | Proof.
now rewrite <- Nat.div_add_l, <- to_nat_spec, Nat.div_mul.
Qed. | Lemma | theorem | to_nat_spec2 | Arith | theories/Arith/Cantor.v | [] | [
"S",
"div_add_l",
"div_mul",
"to_nat",
"to_nat_spec"
] | null | 84 | 88 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma to_nat_non_decreasing x y : y + x <= to_nat (x, y).
Proof.
pose proof (to_nat_spec x y).
rewrite (Nat.mul_le_mono_pos_r _ _ 2 Nat.lt_0_2), H.
rewrite Nat.mul_add_distr_r, <-Nat.add_le_mono_l.
case x as [|x]; [now rewrite Nat.mul_0_l; apply le_0_n|].
rewrite Nat.mul_add_distr_r, <-(Nat.add_0_l (S x * 2))... | Lemma to_nat_non_decreasing x y : y + x <= to_nat (x, y). | Proof.
pose proof (to_nat_spec x y).
rewrite (Nat.mul_le_mono_pos_r _ _ 2 Nat.lt_0_2), H.
rewrite Nat.mul_add_distr_r, <-Nat.add_le_mono_l.
case x as [|x]; [now rewrite Nat.mul_0_l; apply le_0_n|].
rewrite Nat.mul_add_distr_r, <-(Nat.add_0_l (S x * 2)); apply Nat.add_le_mono.
now apply le_0_n.
apply Nat... | Lemma | theorem | to_nat_non_decreasing | Arith | theories/Arith/Cantor.v | [] | [
"S",
"add_0_l",
"add_1_r",
"add_assoc",
"add_le_mono",
"add_le_mono_l",
"le_add_l",
"lt_0_2",
"mul_0_l",
"mul_add_distr_r",
"mul_le_mono_l",
"mul_le_mono_pos_r",
"proof",
"to_nat",
"to_nat_spec"
] | [to_nat] is non-decreasing in (the sum of) pair components | 92 | 103 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Notation not_eq_sym := not_eq_sym (only parsing). | Notation not_eq_sym | := not_eq_sym (only parsing). | Notation | notation | not_eq_sym | Arith | theories/Arith/Compare.v | [
"Stdlib",
"PeanoNat",
"Compare_dec",
"Wf_nat"
] | [] | null | 15 | 15 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Definition le_or_le_S := le_le_S_dec. | Definition le_or_le_S | := le_le_S_dec. | Definition | definition | le_or_le_S | Arith | theories/Arith/Compare.v | [
"Stdlib",
"PeanoNat",
"Compare_dec",
"Wf_nat"
] | [
"le_le_S_dec"
] | null | 21 | 21 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Definition Pcompare := gt_eq_gt_dec. | Definition Pcompare | := gt_eq_gt_dec. | Definition | definition | Pcompare | Arith | theories/Arith/Compare.v | [
"Stdlib",
"PeanoNat",
"Compare_dec",
"Wf_nat"
] | [
"gt_eq_gt_dec"
] | null | 23 | 23 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma le_dec : forall n m, {n <= m} + {m <= n}.
Proof.
exact le_ge_dec.
Qed. | Lemma le_dec : forall n m, {n <= m} + {m <= n}. | Proof.
exact le_ge_dec.
Qed. | Lemma | theorem | le_dec | Arith | theories/Arith/Compare.v | [
"Stdlib",
"PeanoNat",
"Compare_dec",
"Wf_nat"
] | [
"le_ge_dec"
] | null | 25 | 28 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Definition lt_or_eq n m := {m > n} + {n = m}. | Definition lt_or_eq n m | := {m > n} + {n = m}. | Definition | definition | lt_or_eq | Arith | theories/Arith/Compare.v | [
"Stdlib",
"PeanoNat",
"Compare_dec",
"Wf_nat"
] | [] | null | 30 | 30 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma le_decide : forall n m, n <= m -> lt_or_eq n m.
Proof.
exact le_lt_eq_dec.
Qed. | Lemma le_decide : forall n m, n <= m -> lt_or_eq n m. | Proof.
exact le_lt_eq_dec.
Qed. | Lemma | theorem | le_decide | Arith | theories/Arith/Compare.v | [
"Stdlib",
"PeanoNat",
"Compare_dec",
"Wf_nat"
] | [
"le_lt_eq_dec",
"lt_or_eq"
] | null | 32 | 35 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma le_le_S_eq : forall n m, n <= m -> S n <= m \/ n = m.
Proof.
exact (fun n m Hle => proj1 (Nat.lt_eq_cases n m) Hle).
Qed. | Lemma le_le_S_eq : forall n m, n <= m -> S n <= m \/ n = m. | Proof.
exact (fun n m Hle => proj1 (Nat.lt_eq_cases n m) Hle).
Qed. | Lemma | theorem | le_le_S_eq | Arith | theories/Arith/Compare.v | [
"Stdlib",
"PeanoNat",
"Compare_dec",
"Wf_nat"
] | [
"S",
"lt_eq_cases"
] | null | 37 | 40 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Lemma discrete_nat :
forall n m, n < m -> S n = m \/ (exists r : nat, m = S (S (n + r))).
Proof.
intros m n H.
lapply (proj1 (Nat.le_succ_l m n)); auto.
intro H'; lapply (proj1 (Nat.lt_eq_cases (S m) n)); auto.
induction 1; auto.
right; exists (n - S (S m)); simpl.
rewrite (Nat.add_comm m (n - S (S m))).
... | Lemma discrete_nat :
forall n m, n < m -> S n = m \/ (exists r : nat, m = S (S (n + r))). | Proof.
intros m n H.
lapply (proj1 (Nat.le_succ_l m n)); auto.
intro H'; lapply (proj1 (Nat.lt_eq_cases (S m) n)); auto.
induction 1; auto.
right; exists (n - S (S m)); simpl.
rewrite (Nat.add_comm m (n - S (S m))).
rewrite (plus_n_Sm (n - S (S m)) m).
rewrite (plus_n_Sm (n - S (S m)) (S m)).
rewrite ... | Lemma | theorem | discrete_nat | Arith | theories/Arith/Compare.v | [
"Stdlib",
"PeanoNat",
"Compare_dec",
"Wf_nat"
] | [
"S",
"add_0_r",
"add_comm",
"add_sub_assoc",
"induction",
"le_succ_l",
"lt_eq_cases",
"r",
"right",
"sub_diag"
] | By special request of G. Kahn - Used in Group Theory | 43 | 60 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Definition zerop n : {n = 0} + {0 < n}.
Proof.
destruct n; [left|right]; auto.
apply Nat.lt_0_succ.
Defined. | Definition zerop n : {n = 0} + {0 < n}. | Proof.
destruct n; [left|right]; auto.
apply Nat.lt_0_succ.
Defined. | Definition | definition | zerop | Arith | theories/Arith/Compare_dec.v | [] | [
"left",
"lt_0_succ",
"right"
] | null | 17 | 21 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Definition lt_eq_lt_dec n m : {n < m} + {n = m} + {m < n}.
Proof.
induction n as [|n IHn] in m |- *; destruct m as [|m]; auto.
- left; left; apply Nat.lt_0_succ.
- right; apply Nat.lt_0_succ.
- destruct (IHn m) as [[H|H]|H]; auto.
+ left; left; now apply Nat.succ_lt_mono in H.
+ right; now apply Nat.suc... | Definition lt_eq_lt_dec n m : {n < m} + {n = m} + {m < n}. | Proof.
induction n as [|n IHn] in m |- *; destruct m as [|m]; auto.
- left; left; apply Nat.lt_0_succ.
- right; apply Nat.lt_0_succ.
- destruct (IHn m) as [[H|H]|H]; auto.
+ left; left; now apply Nat.succ_lt_mono in H.
+ right; now apply Nat.succ_lt_mono in H.
Defined. | Definition | definition | lt_eq_lt_dec | Arith | theories/Arith/Compare_dec.v | [] | [
"induction",
"left",
"lt_0_succ",
"right",
"succ_lt_mono"
] | null | 23 | 31 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Definition gt_eq_gt_dec n m : {m > n} + {n = m} + {n > m}.
Proof.
now apply lt_eq_lt_dec.
Defined. | Definition gt_eq_gt_dec n m : {m > n} + {n = m} + {n > m}. | Proof.
now apply lt_eq_lt_dec.
Defined. | Definition | definition | gt_eq_gt_dec | Arith | theories/Arith/Compare_dec.v | [] | [
"lt_eq_lt_dec"
] | null | 33 | 36 | true | https://github.com/rocq-prover/stdlib | f76a666b0b2c28c671d4fdf6dd25bcab865b9c36 | statement+proof |
Structured dataset of definitions and theorems from the Coq standard library.
f76a666b0b2c28c671d4fdf6dd25bcab865b9c36| Column | Type | Description |
|---|---|---|
| fact | string | Verbatim declaration: statement followed by proof where present |
| statement | string | Verbatim statement (keyword through the closing period) |
| proof | string | Verbatim proof block (Proof. ... Qed./Defined.), empty if none |
| type | string | Raw declaration keyword |
| kind | string | Normalized kind |
| symbolic_name | string | Declaration identifier |
| library | string | Sub-library |
| filename | string | Repository-relative source path |
| imports | list[string] | File-level Require/Import modules |
| deps | list[string] | Intra-corpus identifiers referenced |
| docstring | string | Preceding documentation comment, null if absent |
| line_start | int | First source line |
| line_end | int | Last source line |
| has_proof | bool | Whether a proof block was captured |
| source_url | string | Upstream repository |
| commit | string | Upstream commit extracted |
| content_level | string | statement+proof |
| Type | Count |
|---|---|
| Lemma | 10,586 |
| Definition | 2,880 |
| Notation | 1,716 |
| Theorem | 1,398 |
| Instance | 770 |
| Ltac | 662 |
| Fixpoint | 545 |
| Parameter | 364 |
| Inductive | 185 |
| Hypothesis | 133 |
| Axiom | 132 |
| Let | 116 |
| Record | 60 |
| Class | 45 |
| Example | 42 |
| Corollary | 24 |
| Fact | 17 |
| Coercion | 16 |
| Scheme | 15 |
| Remark | 11 |
| Parameters | 6 |
| CoFixpoint | 5 |
| Variant | 3 |
| CoInductive | 3 |
| Proposition | 1 |
| Structure | 1 |
#[local]
Lemma minus_plus_simpl_l_reverse_stt n m p : n - m = p + n - (p + m).
Proof.
now rewrite Nat.sub_add_distr, Nat.add_comm, Nat.add_sub.
Qed.
minus_plus_simpl_l_reverse_stt | theories/Arith/Arith_base.v:287Statement and proof are available both joined (fact) and split (statement, proof) for
proof-term modeling, autoformalization, retrieval, and dependency analysis via deps.
@misc{coq_stdlib_dataset,
title = {Coq-Stdlib},
author = {Norton, Charles},
year = {2026},
note = {Extracted from https://github.com/rocq-prover/stdlib, commit f76a666b0b2c},
url = {https://huggingface.co/datasets/phanerozoic/Coq-Stdlib}
}