| 1 |
(* File reduced by coq-bug-finder from original input, then from 1334 lines to 1518 lines, then from 849 lines to 59 lines *) |
| 2 |
(* coqc version 8.5 (January 2016) compiled on Jan 22 2016 18:20:47 with OCaml 4.02.3 |
| 3 |
coqtop version r-schnelltop:/home/r/src/coq/coq,(HEAD detached at V8.5) (5e23fb90b39dfa014ae5c4fb46eb713cca09dbff) *) |
| 4 |
Require Corelib.Setoids.Setoid. |
| 5 |
Import Corelib.Setoids.Setoid. |
| 6 |
|
| 7 |
Class Equiv A := equiv: relation A. |
| 8 |
Infix "≡" := equiv (at level 70, no associativity). |
| 9 |
Notation "(≡)" := equiv (only parsing). |
| 10 |
|
| 11 |
(* If I remove this line, everything compiles. *) |
| 12 |
Set Primitive Projections. |
| 13 |
|
| 14 |
Class Dist A := dist : nat -> relation A. |
| 15 |
Notation "x ={ n }= y" := (dist n x y) |
| 16 |
(at level 70, n at next level, format "x ={ n }= y"). |
| 17 |
|
| 18 |
Record CofeMixin A `{Equiv A, Dist A} := { |
| 19 |
mixin_equiv_dist x y : x ≡ y <-> forall n, x ={n}= y; |
| 20 |
mixin_dist_equivalence n : Equivalence (dist n); |
| 21 |
}. |
| 22 |
|
| 23 |
Structure cofeT := CofeT { |
| 24 |
cofe_car :> Type; |
| 25 |
cofe_equiv : Equiv cofe_car; |
| 26 |
cofe_dist : Dist cofe_car; |
| 27 |
cofe_mixin : CofeMixin cofe_car |
| 28 |
}. |
| 29 |
#[export] Existing Instances cofe_equiv cofe_dist. |
| 30 |
Arguments cofe_car : simpl never. |
| 31 |
|
| 32 |
Section cofe_mixin. |
| 33 |
Context {A : cofeT}. |
| 34 |
Implicit Types x y : A. |
| 35 |
Lemma equiv_dist x y : x ≡ y <-> forall n, x ={n}= y. |
| 36 |
Admitted. |
| 37 |
End cofe_mixin. |
| 38 |
#[warning="context-outside-section"] Context {A : cofeT}. |
| 39 |
Global Instance cofe_equivalence : Equivalence ((≡) : relation A). |
| 40 |
Proof. |
| 41 |
split. |
| 42 |
* |
| 43 |
intros x. |
| 44 |
apply equiv_dist. |
| 45 |
Abort. |