Library FType

Require Import List.
Require Import Utf8.
Require Import StdNotations.
Require Import Fix.
Require Import Omega.

Properties about finite types

Section FType.

Consider a type T inhabited by finitely many elements
  Hypothesis T : Type.
  Hypothesis t0 : T.
  Hypothesis AllT : list T.
  Hypothesis FinT : ∀ x : T, In x AllT.

  Lemma indT : ∀ P, (∀ x, In x AllTP x) → ∀ x, P x.

  Lemma invT : ∀ P, (∀ x, P x) → (∀ x, In x AllTP x).

  Section Max.

    Require Import Max.

    Hypothesis P : natTProp.
    Hypothesis P_all : ∀ r, ∃ n, P n r .
    Hypothesis P_mon : ∀ n n', nn'P nP n'.

    Inductive forallP : list TnatProp :=
    | forallNil : ∀ n r, P n rforallP (r::nil) n
    | forallCons : ∀ r n l n', P n rforallP l n'forallP (r::l) (max n n').

    Lemma forallP_ex : ∀ l, lnil → ∃ n, forallP l n.

    Lemma forallP_mon : ∀ l n, forallP l n → ∀ n', nn'forallP l n'.

    Lemma ex_swap : ∃ n, ∀ r, P n r.

End Max.

End FType.


This page has been generated by coqdoc