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

« back to all changes in this revision

Viewing changes to theories/ZArith/Zminmax.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
(************************************************************************)
 
2
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team     *)
 
3
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
 
4
(*   \VV/  **************************************************************)
 
5
(*    //   *      This file is distributed under the terms of the       *)
 
6
(*         *       GNU Lesser General Public License Version 2.1        *)
 
7
(************************************************************************)
 
8
(*i $Id: Zminmax.v 9245 2006-10-17 12:53:34Z notin $ i*)
 
9
 
 
10
Require Import Zmin Zmax.
 
11
Require Import BinInt Zorder.
 
12
 
 
13
Open Local Scope Z_scope.
 
14
 
 
15
(** Lattice properties of min and max on Z *)
 
16
 
 
17
(** Absorption *)
 
18
 
 
19
Lemma Zmin_max_absorption_r_r : forall n m, Zmax n (Zmin n m) = n.
 
20
Proof.
 
21
  intros; apply Zmin_case_strong; intro; apply Zmax_case_strong; intro; 
 
22
    reflexivity || apply Zle_antisym; trivial.
 
23
Qed.
 
24
 
 
25
Lemma Zmax_min_absorption_r_r : forall n m, Zmin n (Zmax n m) = n.
 
26
Proof.
 
27
  intros; apply Zmax_case_strong; intro; apply Zmin_case_strong; intro; 
 
28
    reflexivity || apply Zle_antisym; trivial.
 
29
Qed.
 
30
 
 
31
(** Distributivity *)
 
32
 
 
33
Lemma Zmax_min_distr_r : 
 
34
  forall n m p, Zmax n (Zmin m p) = Zmin (Zmax n m) (Zmax n p).
 
35
Proof.
 
36
  intros.
 
37
  repeat apply Zmax_case_strong; repeat apply Zmin_case_strong; intros; 
 
38
    reflexivity ||
 
39
      apply Zle_antisym; (assumption || eapply Zle_trans; eassumption).
 
40
Qed.
 
41
 
 
42
Lemma Zmin_max_distr_r : 
 
43
  forall n m p, Zmin n (Zmax m p) = Zmax (Zmin n m) (Zmin n p).
 
44
Proof.
 
45
  intros.
 
46
  repeat apply Zmax_case_strong; repeat apply Zmin_case_strong; intros; 
 
47
    reflexivity ||
 
48
      apply Zle_antisym; (assumption || eapply Zle_trans; eassumption).
 
49
Qed.
 
50
 
 
51
(** Modularity *)
 
52
 
 
53
Lemma Zmax_min_modular_r :
 
54
  forall n m p, Zmax n (Zmin m (Zmax n p)) = Zmin (Zmax n m) (Zmax n p).
 
55
Proof.
 
56
  intros; repeat apply Zmax_case_strong; repeat apply Zmin_case_strong; intros;
 
57
    reflexivity ||
 
58
      apply Zle_antisym; (assumption || eapply Zle_trans; eassumption).
 
59
Qed.
 
60
 
 
61
Lemma Zmin_max_modular_r :
 
62
  forall n m p, Zmin n (Zmax m (Zmin n p)) = Zmax (Zmin n m) (Zmin n p).
 
63
Proof.
 
64
  intros; repeat apply Zmax_case_strong; repeat apply Zmin_case_strong; intros;
 
65
    reflexivity ||
 
66
      apply Zle_antisym; (assumption || eapply Zle_trans; eassumption).
 
67
Qed.
 
68
 
 
69
(** Disassociativity *)
 
70
 
 
71
Lemma max_min_disassoc : forall n m p, Zmin n (Zmax m p) <= Zmax (Zmin n m) p.
 
72
Proof.
 
73
  intros; repeat apply Zmax_case_strong; repeat apply Zmin_case_strong; intros;
 
74
    apply Zle_refl || (assumption || eapply Zle_trans; eassumption).
 
75
Qed.
 
76