From 467648250620f63c4c6d1338167dc46ccbb92051 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Mon, 24 Nov 2008 16:19:54 +0000 Subject: [PATCH] formal topologies --- helm/software/matita/contribs/igft/Makefile | 16 +++++ helm/software/matita/contribs/igft/depends | 1 + helm/software/matita/contribs/igft/igft.ma | 65 +++++++++++++++++++++ helm/software/matita/contribs/igft/root | 1 + 4 files changed, 83 insertions(+) create mode 100644 helm/software/matita/contribs/igft/Makefile create mode 100644 helm/software/matita/contribs/igft/depends create mode 100644 helm/software/matita/contribs/igft/igft.ma create mode 100644 helm/software/matita/contribs/igft/root diff --git a/helm/software/matita/contribs/igft/Makefile b/helm/software/matita/contribs/igft/Makefile new file mode 100644 index 000000000..27d6bc4ee --- /dev/null +++ b/helm/software/matita/contribs/igft/Makefile @@ -0,0 +1,16 @@ +include ../Makefile.defs + +DIR=$(shell basename $$PWD) + +$(DIR) all: + $(BIN)matitac +$(DIR).opt opt all.opt: + $(BIN)matitac.opt +clean: + $(BIN)matitaclean +clean.opt: + $(BIN)matitaclean.opt +depend: + $(BIN)matitadep -dot && rm depends.dot +depend.opt: + $(BIN)matitadep.opt -dot && rm depends.dot diff --git a/helm/software/matita/contribs/igft/depends b/helm/software/matita/contribs/igft/depends new file mode 100644 index 000000000..6fef337d0 --- /dev/null +++ b/helm/software/matita/contribs/igft/depends @@ -0,0 +1 @@ +igft.ma diff --git a/helm/software/matita/contribs/igft/igft.ma b/helm/software/matita/contribs/igft/igft.ma new file mode 100644 index 000000000..b6da8620f --- /dev/null +++ b/helm/software/matita/contribs/igft/igft.ma @@ -0,0 +1,65 @@ + +record powerset (A : Type) : Type := { content : A → CProp }. + +notation > "Ω ^ A" non associative with precedence 50 for @{'P $A}. +notation "Ω \sup A" non associative with precedence 50 for @{'P $A}. +interpretation "Powerset" 'P A = (powerset A). + +record AxiomSet : Type := { + S :> Type; + I_ : S → Type; + C_ : ∀a.I_ a → Ω ^ S +}. + +notation "'I'" non associative with precedence 90 for @{'I}. +interpretation "I" 'I = (I_ _). +notation < "'I' \lpar a \rpar" non associative with precedence 90 for @{'I1 $a}. +interpretation "I a" 'I1 a = (I_ _ a). +notation "'C'" non associative with precedence 90 for @{'C}. +interpretation "C" 'C = (C_ _). +notation < "'C' \lpar a \rpar" non associative with precedence 90 for @{'C1 $a}. +interpretation "C a" 'C1 a = (C_ _ a). +notation < "'C' \lpar a , i \rpar" non associative with precedence 90 for @{'C2 $a $i}. +interpretation "C a i" 'C2 a i = (C_ _ a i). + +definition in_subset := + λA:AxiomSet.λa:A.λU:Ω^A.content A U a. + +notation "hvbox(a break εU)" non associative with precedence 50 for +@{'in_subset $a $U}. +interpretation "In subset" 'in_subset a U = (in_subset _ a U). + +definition for_all ≝ λA:AxiomSet.λU:Ω^A.λP:A → CProp.∀x.xεU → P x. + +inductive covers (A : AxiomSet) (U : Ω ^ A) : A → CProp := + | reflexivity : ∀a.aεU → covers A U a + | infinity : ∀a.∀i : I a. for_all A (C a i) (covers A U) → covers A U a. + +notation "U ⊲ V" non associative with precedence 45 +for @{ 'covers_subsets $U $V}. +interpretation "Covers subsets" 'covers_subsets U V = (for_all _ U (covers _ V)). +interpretation "Covers elem subset" 'covers_subsets U V = (covers _ V U). + +definition subseteq := λA:AxiomSet.λU,V:Ω^A.∀x.xεU → xεV. + +interpretation "subseteq" 'subseteq u v = (subseteq _ u v). + +definition covers_elim ≝ + λA:AxiomSet.λU,P: Ω^A.λH1: U ⊆ P. + λH2:∀a:A.∀j:I a. C a j ⊲ U → C a j ⊆ P → aεP. + let rec aux (a:A) (p:a ⊲ U) on p : aεP ≝ + match p return λaa.λ_:aa ⊲ U.aa ε P with + [ reflexivity a q ⇒ H1 a q + | infinity a j q ⇒ H2 a j q (λb.λr. aux b (q b r))] + in + aux. + +interpretation "char" 'subset p = (mk_powerset _ p). + +theorem transitivity: ∀A:AxiomSet.∀a:A.∀U,V. a ⊲ U → U ⊲ V → a ⊲ V. + intros; + apply (covers_elim ?? {a | a ⊲ V} ??? H); + [ intros 2; apply (H1 ? H2); + | intros; apply (infinity ??? j); + intros 2; apply (H3 ? H4);] +qed. diff --git a/helm/software/matita/contribs/igft/root b/helm/software/matita/contribs/igft/root new file mode 100644 index 000000000..4307b42d1 --- /dev/null +++ b/helm/software/matita/contribs/igft/root @@ -0,0 +1 @@ +baseuri=cic:/matita/igft -- 2.39.2