1 Require Export tbs_rop.
3 Section Subset_From_Functions_Definitions.
7 Definition Img: (I,S:Set) (I -> S) -> (S -> Set) := [I,S;f;a] (LEx I [i](Id S (f i) a)).
9 Definition FDFImg: (S:Set) (FDF S) -> (S -> Set) := [S;v](Img (Fin (fdf_n S v)) S (fdf_f S v)).
13 Section relative_image_domain_subset.
15 Definition RImg: (I,S:Set) (I -> S) -> (I -> Set) -> (S -> Set) := [I,S;f;T;a](REx I T [i](Id S (f i) a)).
17 Definition RDom: (I,S:Set) (I -> S) -> (S -> Set) -> (I -> Set) := [I,S;f;U;i](REx S U [a](Id S (f i) a)).
19 End relative_image_domain_subset.
21 End Subset_From_Functions_Definitions.
23 Section Subset_From_Functions_Results.
27 Theorem img_eps_i: (I:Set; i:I; S:Set; a:S; f:I->S) (Id S (f i) a) -> (Eps S a (Img I S f)).
34 Theorem img_eps_e: (I,S:Set; f:I->S; a:S; P:Set) (Eps S a (Img I S f)) -> ((i:I) (Id S (f i) a) -> P) -> P.
36 MCut '(LEx I [i](Id S (f i) a)).
43 Theorem img_seq: (S:Set; U:(S -> Set)) (SEq S U (Img (Sigma S U) S (sp S U))).
48 MApply '(img_eps_i (Sigma S U) (pair S U a H0)).
50 MApply '(img_eps_e (Sigma S U) S (sp S U) a).
51 MApply '(id_repl S a (sp S U i)).
55 Theorem img_sbe_i: (I,J,S:Set; f:I->S; g:J->S) (LEx I->J [h](i:I)(Id S (f i) (g (h i)))) -> (SbE S (Img I S f) (Img J S g)).
59 MApply '(img_eps_e I S f a0).
60 MApply '(img_eps_i J (a i)).
61 MApply '(id_repl S a0 (f i)).
66 Theorem img_xfdf_add_i: (S:Set; m:N; v:(Fin m)->S; n:N; w:(Fin n)->S) (SbE S (SOr S (Img (Fin m) S v) (Img (Fin n) S w)) (Img (Fin (add m n)) S (xfdf_add S m v n w))).
70 MApply '(lex_i (Fin m)->(Fin (add m n)) (fil m n)).
74 MApply '(lex_i (Fin n)->(Fin (add m n)) (fir m n)).
83 Theorem fdfimg_eps_i: (S:Set; v:(FDF S); i:(Fin (fdf_n S v)); a:S) (Id S (fdf_f S v i) a) -> (Eps S a (FDFImg S v)).
86 MApply '(img_eps_i (Fin (fdf_n S v)) i).
89 Theorem fdfimg_eps_e: (S:Set; v:(FDF S); a:S; P:Set) (Eps S a (FDFImg S v)) -> ((i:(Fin (fdf_n S v))) (Id S (fdf_f S v i) a) -> P) -> P.
91 MApply '(img_eps_e (Fin (fdf_n S v)) S (fdf_f S v) a).
95 Theorem img_fdf_add_i: (S:Set; v,w:(FDF S)) (SbE S (SOr S (FDFImg S v) (FDFImg S w)) (FDFImg S (fdf_add S v w))).
97 Unfold FDFImg fdf_add.
99 MApply 'img_xfdf_add_i.
104 Section relative_image.
106 Theorem rimg_eps_i: (I:Set; i:I; T:I->Set) (Eps I i T) -> (S:Set; a:S; f:I->S) (Id S (f i) a) -> (Eps S a (RImg I S f T)).
113 Theorem rimg_eps_e: (I,S:Set; a:S; T:I->Set; f:I->S; P:Set) ((i:I) (Eps I i T) -> (Id S (f i) a) -> P) -> (Eps S a (RImg I S f T)) -> P.
116 MCut '(REx I T [i:I](Id S (f i) a)).
118 MApply '(rex_e I T [i:I](Id S (f i) a)).
122 Theorem rimg_sbe: (I,S:Set; f:I->S; U,V:I->Set) (SbE I U V) -> (SbE S (RImg I S f U) (RImg I S f V)).
125 MApply '(rimg_eps_e I S a U f).
126 MApply '(rimg_eps_i I i).
130 Theorem rimg_sing_i: (I,S:Set; f:I->S; T:I->Set) (SbE S (SREx I T S [i;_](Sing S (f i))) (SREx S (RImg I S f T) S [a;_](Sing S a))).
133 MCut '(LEx I [i:I](REps (T i) S a [_:?](Sing S (f i)))).
134 MApply '(srex_eps_e I T S a [i:I; _:(T i)](Sing S (f i))).
136 MApply '(srex_eps_i S (f a0)).
137 MApply '(reps_e (T a0) S a [_:(T a0)](Sing S (f a0))).
138 MCut '(RImg I S f T (f a0)).
140 MApply '(rimg_eps_i I a0).
142 MApply '(reps_i (RImg I S f T (f a0)) H2).
145 Theorem rimg_sing_e: (I,S:Set; f:I->S; T:I->Set) (SbE S (SREx S (RImg I S f T) S [a;_](Sing S a)) (SREx I T S [i;_](Sing S (f i)))).
148 MCut '(LEx S [a0:?](REps (RImg I S f T a0) S a [_:?](Sing S a0))).
149 MApply '(srex_eps_e S (RImg I S f T) S a [a0:S; _:(RImg I S f T a0)](Sing S a0)).
151 MApply '(reps_e (RImg I S f T a0) S a [_:(RImg I S f T a0)](Sing S a0)).
152 MCut '(Eps S a0 (RImg I S f T)).
154 MApply '(rimg_eps_e I S a0 T f).
155 MApply '(srex_eps_i I i0).
158 MApply '(reps_i (T i0) H5).
160 MApply '(id_repl S (f i0) a0).
164 Theorem rimg_sing: (I,S:Set; f:I->S; T:I->Set) (SEq S (SREx I T S [i;_](Sing S (f i))) (SREx S (RImg I S f T) S [a;_](Sing S a))).
171 Theorem rimg_srex: (I,S:Set; f:I->S; T:I->Set) (SEq S (SREx I T S [i;_](Sing S (f i))) (RImg I S f T)).
173 MApply '(seq_t S (SREx S (RImg I S f T) S [a:S; _:(RImg I S f T a)](Sing S a))).
178 Theorem rimg_img_i: (I,S:Set; f:I->S; T:I->Set) (SbE S (Img (Sigma I T) S [x](f (sp I T x))) (RImg I S f T)).
181 Apply (img_eps_e (Sigma I T) S [x:(Sigma I T)](f (sp I T x)) a).
185 MApply '(rimg_eps_i I a0).
189 Theorem rimg_img_e: (I,S:Set; f:I->S; T:I->Set) (SbE S (RImg I S f T) (Img (Sigma I T) S [x](f (sp I T x)))).
192 MApply '(rimg_eps_e I S a T f).
195 MApply '(img_eps_i (Sigma I T) (pair I T i H2)).
198 Theorem rimg_img: (I,S:Set; f:I->S; T:I->Set) (SEq S (Img (Sigma I T) S [x](f (sp I T x))) (RImg I S f T)).
207 End Subset_From_Functions_Results.