~ubuntu-branches/ubuntu/wily/coq-doc/wily

« back to all changes in this revision

Viewing changes to test-suite/success/setoid_test_function_space.v

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu, Stéphane Glondu, Samuel Mimram
  • Date: 2010-01-07 22:50:39 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100107225039-n3cq82589u0qt0s2
Tags: 8.2pl1-1
[ Stéphane Glondu ]
* New upstream release (Closes: #563669)
  - remove patches
* Packaging overhaul:
  - use git, advertise it in Vcs-* fields of debian/control
  - use debhelper 7 and dh with override
  - use source format 3.0 (quilt)
* debian/control:
  - set Maintainer to d-o-m, set Uploaders to Sam and myself
  - add Homepage field
  - bump Standards-Version to 3.8.3
* Register PDF documentation into doc-base
* Add debian/watch
* Update debian/copyright

[ Samuel Mimram ]
* Change coq-doc's description to mention that it provides documentation in
  pdf format, not postscript, closes: #543545.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Require Export Setoid.
 
2
Set Implicit Arguments.
 
3
Section feq.
 
4
Variables A B:Type.
 
5
Definition feq (f g: A -> B):=forall a, (f a)=(g a).
 
6
Infix "=f":= feq  (at level 80, right associativity).
 
7
Hint Unfold feq.
 
8
 
 
9
Lemma feq_refl: forall f, f =f f.
 
10
intuition.
 
11
Qed.
 
12
                                                                                
 
13
Lemma feq_sym: forall f g, f =f g-> g =f f.
 
14
intuition.
 
15
Qed.
 
16
                                                                                
 
17
Lemma feq_trans: forall f g h, f =f g-> g =f h -> f  =f h.
 
18
unfold feq. intuition.
 
19
rewrite H.
 
20
auto.
 
21
Qed.
 
22
End feq.
 
23
Infix "=f":= feq  (at level 80, right associativity).
 
24
Hint Unfold feq. Hint Resolve feq_refl feq_sym feq_trans.
 
25
                                                                                
 
26
Variable K:(nat -> nat)->Prop.
 
27
Variable K_ext:forall a b, (K a)->(a =f b)->(K b).
 
28
 
 
29
Add Parametric Relation (A B : Type) : (A -> B) (@feq A B)
 
30
 reflexivity proved by (@feq_refl A B)
 
31
 symmetry proved by (@feq_sym A B)
 
32
 transitivity proved by (@feq_trans A B) as funsetoid.
 
33
                                                                             
 
34
Add Morphism K with signature (@feq nat nat) ==> iff as K_ext1.
 
35
intuition. apply (K_ext H0 H).
 
36
intuition. assert (y =f x);auto.  apply (K_ext H0 H1).
 
37
Qed.
 
38
 
 
39
Lemma three:forall n, forall a, (K a)->(a =f (fun m => (a (n+m))))-> (K (fun m
 
40
=> (a (n+m)))).
 
41
intuition.
 
42
setoid_rewrite <- H0.
 
43
assumption.
 
44
Qed.
 
45