-
Notifications
You must be signed in to change notification settings - Fork 0
/
cartierSolution10.v
10520 lines (9370 loc) · 783 KB
/
cartierSolution10.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(** # #
#+TITLE: cartierSolution10.v
Proph
https://github.com/1337777/cartier/blob/master/cartierSolution10.v
solves half of some question of CARTIER which is how to program « geometric homotopic parametrization modos » ( "dependent type" , "fibred category with local internal products" ) ...
ERRATA :: this also solves cartierSolution9.v where the general-cartesian property of the fibred-category was "confused" .
SHORT ::
(1.) The ends is « MODOS » : to program the « form-morphisms » parametrized-over the spans of « parameter-morphisms » ( "fibration" ) , which are generated by some « generating parametrization-functor » and some geometric finitely-presented/compact dataobjects , such that this programming enables the computational-logical introductions-eliminations for the product/pi-object and the computational-logical constructors-destructors for the data/sum/sigma/colimit-objects and the cut/pullback-elimination/admissibility lemmas ; and to do this geometric programming coherently/continuously for the viewing-data/topology sense-decodings (MEMO: search-replace all the quantifiers into quantifiers over some covering ...) . What is cut-elimination ? Cut-elimination enables to cut through the topos while doing computations on the data and to accumulate the cuts/compositions/pullbacks into polymorphic (projection-style) constructors .
(2.) CONTRAST : The internal-representability of the "context-extension"-object is expressed as any form-morphism (generalized-element of any shape , not only terminal/section) parameterized-over any span of parameter-morphisms (not only one object/slice) !1! Memo that in the « Interface Engineering » ( a.k.a the "type theory" or even the "Type Theory" a-la Thorsten) of "comprehension-categry / category-with-family / natural-model" , the internal-representability of the "context-extension"-object metatheoretically-relates type-theory-style (terms are section morphisms of the terminal shape) as-corresponding-to locally-catesian-closed-style (arrows are in the slice over one object) : this is OK for electrical circuits , but NOT OK for mathematics ...
(3.) Any anticipated induction-induction interdependence between morphisms and objects is avoided via the use of « pseudocodes sharing » instead : the objects codes and morphisms codes inductive-families communicate through the sharing of « morphisms pseudocodes » indexes which are intermediate between sense and codes . Moreover the general-cartesian property (more-general than pullback) of the fibred-category , which is really some necessity/symptom of polymorphism , is expressed using these « morphisms pseudocodes » .
(4.) TODO: use better interface engineering (a-la jgross , instead of nested sigma-types everywhere) for effective-performance and clear-correctness . TODO: implement the interface of the geometric finitely-presented/compact dataobjects . TODO: implement the interface of the composition-monoidal associativity-coherence (MEMO: the general-cartesian property requires some explicit associativity ...) of the parameter-congruences (reuse coherence2.v) . TODO: Besides these unavoidable extensional congruences and their associativity-coherence , moreover to relax the proof-assistant ( n00bs should know this is not for free and has some cost named "homotopy-coherence" ) , some intensional congruences (homotopy) may be grammatically-expressed and supported by some model-category sense ( MEMO: cartierSolution6.v + univalent coCartesian fibrations a-la Cisinski ) ...
(5.) Another angle of view :
#+BEGIN_EXAMPLE
E ------------------------- f --------------------------> F
| \ |
. PI_project SUBST_subst F ------- application ------> .
| | |
. . .
| | |
. . .
| | |
v v v
E_ <-> E' <----- project ------- P ------- subst -------> F_
#+END_EXAMPLE
(6.) For instant first impression , the internal-representability of the "context-extension"-object , is written as :
#+BEGIN_EXAMPLE
| Formatting : forall (ff : 'CoMod( E ~> F @_ PParam_EF @^ Form_ff ))
(param_ff : 'CoMod__( Param_E ~> Param_F @_ PParam_EF' ))
(reparam_EF : 'CoMod_$( PParam_EF ~> PParam_EF' @_ Sense1_Param_reparam_EF ))
(param_ee : 'CoMod__( Param_D ~> Param_E @_ PParam_DE )),
'CoMod__( Param_D ~> Format F Param_F @_ _ )
#+END_EXAMPLE
KEYWORDS :: COQ ; computational logic ; geometry ; homotopy ; MODOS
OUTLINE SHORT :: https://gitlab.com/1337777/cartier/blob/master/cartierSolution1.v ( comonad and adjunction cut-eliminations in the style of the pairing-projections cancellation for the cartesian-product )
OUTLINE ::
* Generating parametrization-functor sense
+ Generating parameters
+ Generating parametrized-forms
* Grammatical presentation of the pseudocodes of the finitely-presented/compact dataobjects and the pseudocodes of the morphisms
+ Sense-decodings lemmas : parameter-object as functor , parameter-morphism as natural transformation , form-object as fibration over parameter-object
+ Sense-decodings lemmas : collection of form-elements above one given parameter-element
+ Sense-decodings lemmas : collection of parameter-elements above one given parameter-element
+ Sense-decodings lemmas : fibre of form-objects above one given parameter-object
+ Sense-decodings lemmas : substitution (pullback) of parameter-morphism along given parameter-morphism
+ Sense-decodings lemmas : image of localization (pullback) of parameter-morphism along given parameter-element
+ Sense-decodings lemmas : total (pullback) parameter-object of one given parameter-morphism
+ Sense-decodings of objects : viewing functor of parameter-object , or image of total (pullback) parameter-object of one given parameter-morphism
+ Sense-decodings of objects : viewing functor ( sum-substitution of form-object ) along pparameter-morphisms (span of two parameter-morphisms)
+ Sense-decodings of objects : product-substitution of form-object along pparameter-morphisms (span of two parameter-morphisms)
+ Sense-decodings lemmas : form-morphism (natural transformation) over some given pparameter-morphisms (span of two parameter-morphisms)
+ Sense-decodings of objects : format ( context-extension ) parameter-object of given form-object over given parameter-object
+ Sense-decodings of morphisms : Compos (composition) form-morphism , Unit (identity) form-morphism
+ Sense-decodings of morphisms : introduction and elimination for the product-substitution object
+ Sense-decodings of morphisms : yoneda-embedding form-morphism of generator-arrow
+ Sense-decodings of morphisms : Constructing_default form-morphism over Constructing_PParam_default pparameter-morphisms
+ Sense-decodings lemmas : polymorphism/naturality of some family of morphisms
+ Sense-decodings of morphisms : Destructing_default form-morphism over Destructing_PParam_default pparameter-morphisms
+ Interface for pseudocodes of the finitely-presented/compact dataobjects , and example for the binary-dataobject
+ Pseudocodes of the morphisms
* Grammatical presentation of the objects
* Grammatical presentation of the pseudocodes of the parameter-congruences (reparametrization) and the pseudocodes of the form-congruences (conversion)
+ Sense-decodings of parameter-congruences (reparametrization) : definitions
+ Sense-decodings of parameter-congruences (reparametrization) : reversibility , reflexivity , transitivity
+ Sense-decodings of parameter-congruences (reparametrization) : (Compos_PParam-)composition-monoidal associativity
+ Sense-decodings of parameter-congruences (reparametrization) : etc ...
+ Sense-decodings of form-congruences (conversion) : definitions
+ Sense-decodings of form-congruences (conversion) : reversibility , reflexivity , transitivity
+ Sense-decodings of form-congruences (conversion) : (Compos-)composition-monoidal associativity
+ Sense-decodings of form-congruences (conversion) : etc ...
+ Pseudocodes of the parameter-congruences (reparametrization) with Pseudocodes of the form-congruences (conversion)
* Grammatical presentation of the morphisms , carrying the pseudocodes for morphisms
* Grammatical presentation of the parameter-congruences (reparametrization) with the form-congruences (conversion) , with their interfaces for the (Compos-)composition-monoidal associativity-coherences
+ Interface for the (Compos-)composition-monoidal associativity-coherences of the parameter-congruences (reparametrization) with the form-congruences (conversion)
+ Grammatical presentation of the parameter-congruences (reparametrization) with the form-congruences (conversion)
* Linear total/asymptotic grade and the degradation lemma
* Solution morphisms
+ Solution morphisms without composition
+ Cases-refinement of morphisms with inner-instantiation of codomain object-indexes
* Composition/cut-elimination into polymorphic soiution by computational/total/asymptotic/reduction/(multi-step) resolution using conversions
HINT :: do cartierSolution11.v (geometry, reuse cartierSolution8.v) cartierSolution12.v (homotopy, reuse cartierSolution6.v)
-----
user1@computer1:~$ coqc --version
The Coq Proof Assistant, version 8.10+alpha
-----
* Generating parametrization-functor sense
** Generating parameters
#+BEGIN_SRC coq :exports both :results silent # # **)
Require Import ssreflect ssrfun ssrbool.
Require Lia.
Module PPARAMETRIZATION.
Set Implicit Arguments. Unset Strict Implicit. Unset Printing Implicit Defensive.
Set Primitive Projections.
Notation "'sval'" := (@proj1_sig _ _).
Declare Scope poly_scope. Delimit Scope poly_scope with poly. Open Scope poly.
Parameter obParametrizator : Type.
Parameter morParametrizator : obParametrizator -> obParametrizator -> Type.
Parameter polyParametrizator :
forall A A', morParametrizator A' A -> forall A'', morParametrizator A'' A' -> morParametrizator A'' A .
Parameter unitParametrizator : forall {A : obParametrizator}, morParametrizator A A.
Notation "''Parametrizator' ( A' ~> A )" := (@morParametrizator A' A) (at level 0) : poly_scope.
Notation "_@ A'' o>Parametrizator a'" := (@polyParametrizator _ _ a' A'')
(at level 40, A'' , a' at next level, left associativity) : poly_scope.
Notation "a_ o>Parametrizator a'" := (@polyParametrizator _ _ a' _ a_)
(at level 40, a' at next level) : poly_scope.
Axiom polyParametrizator_morphism :
forall (A A' : obParametrizator) (a' : 'Parametrizator( A' ~> A ))
(A'' : obParametrizator) (a_ : 'Parametrizator( A'' ~> A' )),
forall B (b : 'Parametrizator( B ~> A'' )),
b o>Parametrizator ( a_ o>Parametrizator a' ) = ( b o>Parametrizator a_ ) o>Parametrizator a' .
Axiom polyParametrizator_unitParametrizator :
forall (A A' : obParametrizator) (a' : 'Parametrizator( A' ~> A )),
a' = ( (@unitParametrizator A') o>Parametrizator a' ) .
Axiom unitParametrizator_polyParametrizator :
forall (A : obParametrizator), forall (A'' : obParametrizator) (a_ : 'Parametrizator( A'' ~> A )),
a_ = ( a_ o>Parametrizator (@unitParametrizator A) ) .
(** # #
#+END_SRC
** Generating parametrized-forms
#+BEGIN_SRC coq :exports both :results silent # # **)
Parameter obGenerator : Type.
Parameter morGenerator : obGenerator -> obGenerator -> Type.
Parameter polyGenerator :
forall A A', morGenerator A' A -> forall A'', morGenerator A'' A' -> morGenerator A'' A .
Parameter unitGenerator : forall {A : obGenerator}, morGenerator A A.
Notation "''Generator' ( A' ~> A )" := (@morGenerator A' A)
(at level 0, format "''Generator' ( A' ~> A )") : poly_scope.
Notation "_@ A'' o>Generator a'" := (@polyGenerator _ _ a' A'')
(at level 40, A'' , a' at next level, left associativity) : poly_scope.
Notation "a_ o>Generator a'" := (@polyGenerator _ _ a' _ a_)
(at level 40, a' at next level) : poly_scope.
Axiom polyGenerator_morphism :
forall (A A' : obGenerator) (a' : 'Generator( A' ~> A ))
(A'' : obGenerator) (a_ : 'Generator( A'' ~> A' )),
forall B (b : 'Generator( B ~> A'' )),
b o>Generator ( a_ o>Generator a' ) = ( b o>Generator a_ ) o>Generator a' .
Axiom polyGenerator_unitGenerator :
forall (A A' : obGenerator) (a' : 'Generator( A' ~> A )),
a' = ( (@unitGenerator A') o>Generator a' ) .
Axiom unitGenerator_polyGenerator :
forall (A : obGenerator), forall (A'' : obGenerator) (a_ : 'Generator( A'' ~> A )),
a_ = ( a_ o>Generator (@unitGenerator A) ) .
Parameter Parameter0 : obGenerator -> obParametrizator.
Parameter Parameter1 : forall A A' : obGenerator,
'Generator( A ~> A' ) -> 'Parametrizator( Parameter0 A ~> Parameter0 A') .
Axiom Parameter_morphism :
forall (A A' : obGenerator) (a' : 'Generator( A' ~> A ))
(A'' : obGenerator) (a_ : 'Generator( A'' ~> A' )),
Parameter1 ( a_ o>Generator a' ) = ( Parameter1 a_ ) o>Parametrizator (Parameter1 a').
Axiom Parameter_unitGenerator :
forall (A : obGenerator),
(@unitParametrizator (Parameter0 A)) = ( Parameter1 (@unitGenerator A) ) .
(** # #
#+END_SRC
* Grammatical presentation of the pseudocodes of the finitely-presented/compact dataobjects and the pseudocodes of the morphisms
** Sense-decodings lemmas : parameter-object as functor , parameter-morphism as natural transformation , form-object as fibration over parameter-object
#+BEGIN_SRC coq :exports both :results silent # # **)
Definition Sense01_action (Sense00 : obGenerator -> Type)
(Sense01 : forall G G' : obGenerator,
'Generator( G' ~> G ) -> Sense00 G -> Sense00 G')
G G' (g : 'Generator( G' ~> G)) (x : Sense00 G)
:= (Sense01 G G' g x).
Notation "g o>Generator_ [ Sense01 ] x" := (@Sense01_action _ Sense01 _ _ g x)
(at level 40, x at next level) : poly_scope.
Notation "g o>Generator_ x" := (@Sense01_action _ _ _ _ g x)
(at level 40, x at next level) : poly_scope.
Definition Sense01_functor (Sense00 : obGenerator -> Type)
(Sense01 : forall G G' : obGenerator,
'Generator( G' ~> G ) -> Sense00 G -> Sense00 G') : Prop :=
( forall G G' (g : 'Generator( G' ~> G)) G'' (g' : 'Generator( G'' ~> G')) x,
g' o>Generator_[Sense01] (g o>Generator_[Sense01] x)
= (g' o>Generator g) o>Generator_[Sense01] x ) /\
( forall G x, x = (@unitGenerator G) o>Generator_[Sense01] x ) .
Definition Sense01_data (Sense00 : obGenerator -> Type)
:= { Sense01 : ( forall G G' : obGenerator, 'Generator( G' ~> G ) -> Sense00 G -> Sense00 G' ) |
Sense01_functor Sense01 }.
Definition Sense1_natural
Sense00_F (Sense01_F : Sense01_data Sense00_F)
Sense00_E (Sense01_E : Sense01_data Sense00_E)
(Sense1 : forall G : obGenerator, Sense00_F G -> Sense00_E G) : Prop :=
forall G G' (g : 'Generator( G' ~> G )) (f : Sense00_F G),
g o>Generator_[sval Sense01_E] (Sense1 G f)
= Sense1 G' (g o>Generator_[sval Sense01_F] f) .
Definition Sense1_data
Sense00_F (Sense01_F : Sense01_data Sense00_F)
Sense00_E (Sense01_E : Sense01_data Sense00_E)
:= { Sense1 : ( forall G : obGenerator, Sense00_F G -> Sense00_E G ) |
Sense1_natural Sense01_F Sense01_E Sense1 } .
Definition Sense01_Param_action (Sense00 : obGenerator -> Type)
(Sense01 : forall G G' : obGenerator,
'Parametrizator( Parameter0 G' ~> Parameter0 G ) -> Sense00 G -> Sense00 G')
G G' p x
:= (Sense01 G G' p x).
Notation "p o>Parametrizator_ [ Sense01 ] x" := (@Sense01_Param_action _ Sense01 _ _ p x)
(at level 40, x at next level) : poly_scope.
Notation "p o>Parametrizator_ x" := (@Sense01_Param_action _ _ _ _ p x)
(at level 40, x at next level) : poly_scope.
Definition Sense01_Param_functor (Sense00 : obGenerator -> Type)
(Sense01 : forall G G' : obGenerator,
'Parametrizator( Parameter0 G' ~> Parameter0 G ) -> Sense00 G -> Sense00 G') : Prop :=
( forall G G' (p : 'Parametrizator( Parameter0 G' ~> Parameter0 G )) G'' (p' : 'Parametrizator( Parameter0 G'' ~> Parameter0 G' )) x,
p' o>Parametrizator_[Sense01] (p o>Parametrizator_[Sense01] x)
= (p' o>Parametrizator p) o>Parametrizator_[Sense01] x ) /\
( forall G x, x = (@unitParametrizator (Parameter0 G)) o>Parametrizator_[Sense01] x ) .
Definition Sense01_Param_data (Sense00 : obGenerator -> Type)
:= { Sense01 : ( forall G G' : obGenerator,
'Parametrizator( Parameter0 G' ~> Parameter0 G ) -> Sense00 G -> Sense00 G' ) |
Sense01_Param_functor Sense01 }.
Definition Sense1_Param_natural
Sense00_F (Sense01_F : Sense01_Param_data Sense00_F)
Sense00_E (Sense01_E : Sense01_Param_data Sense00_E)
(Sense1 : forall G : obGenerator, Sense00_F G -> Sense00_E G) : Prop :=
forall G G' (p : 'Parametrizator( Parameter0 G' ~> Parameter0 G )) (f : Sense00_F G),
p o>Parametrizator_[sval Sense01_E] (Sense1 G f)
= Sense1 G' (p o>Parametrizator_[sval Sense01_F] f) .
Definition Sense1_Param_data
Sense00_F (Sense01_F : Sense01_Param_data Sense00_F)
Sense00_E (Sense01_E : Sense01_Param_data Sense00_E)
:= { Sense1 : ( forall G : obGenerator, Sense00_F G -> Sense00_E G ) |
Sense1_Param_natural Sense01_F Sense01_E Sense1 } .
Definition Sense01_data_of_Sense01_Param_data (Sense00 : obGenerator -> Type)
(Sense01 : Sense01_Param_data Sense00) : Sense01_data Sense00.
Proof.
exists (fun G G' g => sval Sense01 G G' (Parameter1 g)).
abstract(move; split; [ intros; simpl; rewrite /Sense01_action /= ; rewrite Parameter_morphism; exact: (proj1 (proj2_sig Sense01))
| intros; simpl; rewrite /Sense01_action /= ; rewrite -Parameter_unitGenerator; exact: (proj2 (proj2_sig Sense01)) ]).
Defined.
Definition Sense1_data_of_Sense1_Param_data
Sense00_F (Sense01_F : Sense01_Param_data Sense00_F)
Sense00_E (Sense01_E : Sense01_Param_data Sense00_E)
(Sense1 : Sense1_Param_data Sense01_F Sense01_E) :
Sense1_data (Sense01_data_of_Sense01_Param_data Sense01_F) (Sense01_data_of_Sense01_Param_data Sense01_E).
Proof.
exists (sval Sense1).
abstract(move; intros; simpl; rewrite /Sense01_action /= ; exact: (proj2_sig Sense1)).
Defined.
Definition Sense1_FormParam_data
Sense00_F (Sense01_F : Sense01_data Sense00_F)
Sense00_E (Sense01_E : Sense01_Param_data Sense00_E)
:= Sense1_data Sense01_F (Sense01_data_of_Sense01_Param_data Sense01_E).
Definition Sense1_FormParam_data_of_Sense1_Param_data
Sense00_F (Sense01_F : Sense01_Param_data Sense00_F)
Sense00_E (Sense01_E : Sense01_Param_data Sense00_E)
(Sense1 : Sense1_Param_data Sense01_F Sense01_E) :
Sense1_FormParam_data (Sense01_data_of_Sense01_Param_data Sense01_F) Sense01_E.
Proof.
intros. exact: (Sense1_data_of_Sense1_Param_data Sense1).
Defined.
Lemma Sense1_Param_Id :
forall Sense00_Param_F (Sense01_Param_F : Sense01_Param_data Sense00_Param_F),
Sense1_Param_data Sense01_Param_F Sense01_Param_F .
Proof.
intros. exists (fun G => id).
abstract (intros; move; intros; reflexivity).
Defined.
Definition Sense1_FormParam_Id :
forall Sense00_Param_F (Sense01_Param_F : Sense01_Param_data Sense00_Param_F),
Sense1_FormParam_data (Sense01_data_of_Sense01_Param_data Sense01_Param_F) Sense01_Param_F .
Proof.
intros. exact: ( Sense1_data_of_Sense1_Param_data (Sense1_Param_Id _) ).
Defined.
Lemma Sense1_Param_Compos :
forall Sense00_F1 (Sense01_F1 : Sense01_Param_data Sense00_F1) Sense00_F2 (Sense01_F2 : Sense01_Param_data Sense00_F2)
(Sense1_ff_ : Sense1_Param_data Sense01_F1 Sense01_F2)
Sense00_F2' (Sense01_F2' : Sense01_Param_data Sense00_F2')
(Sense1_ff' : Sense1_Param_data Sense01_F2 Sense01_F2'),
Sense1_Param_data Sense01_F1 Sense01_F2'.
Proof.
intros. exists (fun A => (sval Sense1_ff') A \o (sval Sense1_ff_) A ).
abstract (intros; move; intros; simpl; rewrite (proj2_sig Sense1_ff')
(proj2_sig Sense1_ff_); reflexivity).
Defined.
Notation "''exists' x ..." := (exist _ x _) (at level 10, x at next level) : poly_scope.
Notation "[< data | ... >]" := (exist (fun data : _ => sval _ _ data = _ ) data _) (at level 0) : poly_scope.
Lemma Sense00_View : forall (G : obGenerator), (obGenerator -> Type).
Proof. intros G. refine (fun H => 'Generator( H ~> G ) ). Defined.
Lemma Sense01_View : forall (G : obGenerator), Sense01_data (Sense00_View G) .
Proof.
intros. unshelve eexists.
- intros H H' h. refine (fun g => h o>Generator g).
- abstract (split; [intros; exact: polyGenerator_morphism
| intros; exact: polyGenerator_unitGenerator]).
Defined.
Lemma Sense00_Param_View : forall (P : obParametrizator), (obGenerator -> Type).
Proof. intros P. refine (fun Q => 'Parametrizator( Parameter0 Q ~> P ) ). Defined.
Lemma Sense01_Param_View : forall (P : obParametrizator), Sense01_Param_data (Sense00_Param_View P) .
Proof.
intros. unshelve eexists.
- intros G G' q. refine (fun p => q o>Parametrizator p).
- abstract (split; [ intros; rewrite /Sense01_Param_action /= ; rewrite polyParametrizator_morphism; reflexivity
| intros; rewrite /Sense01_Param_action /= ; exact: polyParametrizator_unitParametrizator ]) .
Defined.
Lemma Sense1_FormParam_View : forall G : obGenerator , Sense1_FormParam_data (Sense01_View G) (Sense01_Param_View (Parameter0 G)).
Proof.
intros G. unshelve eexists.
- intros H. refine (@Parameter1 H G).
- abstract(move; intros; symmetry; exact: Parameter_morphism).
Defined.
Definition Sense1_Param_ViewMor :
forall (P : obParametrizator) (Q : obParametrizator) (p : 'Parametrizator( P ~> Q )),
Sense1_Param_data (Sense01_Param_View P) (Sense01_Param_View Q).
Proof.
intros. unshelve eexists.
- intros G. refine (_@ (Parameter0 G) o>Parametrizator p ).
- abstract (move; intros; rewrite /Sense01_action /= ; exact: polyParametrizator_morphism).
Defined.
Definition element_to_polyelement : forall Sense00_F (Sense01_F : Sense01_Param_data Sense00_F) G,
Sense00_F G -> Sense1_Param_data (Sense01_Param_View (Parameter0 G)) Sense01_F .
Proof.
intros ? ? G f. unshelve eexists.
apply: (fun G' g => g o>Parametrizator_[sval Sense01_F] f) .
abstract (move; simpl; intros G' G'' g' g;
rewrite -(proj1 (proj2_sig Sense01_F)); reflexivity).
Defined.
(** # #
#+END_SRC
** Sense-decodings lemmas : collection of form-elements above one given parameter-element
#+BEGIN_SRC coq :exports both :results silent # # **)
Section Sense00_AtParam_.
Variables (Sense00_Form_F : obGenerator -> Type)
(Sense01_Form_F : Sense01_data Sense00_Form_F)
(Sense00_Param_F : obGenerator -> Type)
(Sense01_Param_F : Sense01_Param_data Sense00_Param_F)
(Sense1_FormParam_F : Sense1_FormParam_data Sense01_Form_F Sense01_Param_F).
Variables (Sense00_Param_F0' : obGenerator -> Type)
(Sense01_Param_F0' : Sense01_Param_data Sense00_Param_F0').
Variables (Sense1_Param_project : Sense1_Param_data Sense01_Param_F0' Sense01_Param_F).
Definition Sense00_AtParam_
(G : obGenerator) (param : Sense00_Param_F0' G)
:= {form : Sense00_Form_F G | sval Sense1_FormParam_F G form = sval Sense1_Param_project G param} .
Axiom Sense00_AtParam_quotientLogical :
forall (G : obGenerator) (paramlocal : Sense00_Param_F0' G)
(param param' : Sense00_AtParam_ paramlocal), sval param = sval param' -> param = param'.
Definition Sense01_AtParam_action
(Sense01_AtParam : ( forall G (param : Sense00_Param_F0' G) (G' : obGenerator) (g : 'Generator( G' ~> G )),
Sense00_AtParam_ param -> Sense00_AtParam_ ((Parameter1 g ) o>Parametrizator_[sval Sense01_Param_F0'] param) ))
G (param : Sense00_Param_F0' G) (G' : obGenerator) (g : 'Generator( G' ~> G ))(form : Sense00_AtParam_ param)
:= (Sense01_AtParam G param G' g form).
End Sense00_AtParam_.
Notation "''Generator' ( G' ~> G @_ Sense1_Param_project <| param )" :=
(@Sense00_AtParam_ _ _ _ _ (Sense1_FormParam_View G) _ _ Sense1_Param_project G' param) (at level 0) : poly_scope.
Definition polyGenerator_AtParam : forall G (G' : obGenerator) (g' : 'Generator( G' ~> G )),
forall (Sense00_Param_F0' : obGenerator -> Type) (Sense01_Param_F0' : Sense01_Param_data Sense00_Param_F0')
(Sense1_Param_project : Sense1_Param_data Sense01_Param_F0' (Sense01_Param_View (Parameter0 G'))),
forall (G'' : obGenerator) (param' : Sense00_Param_F0' G'') , 'Generator( G'' ~> G' @_ Sense1_Param_project <| param' ) ->
'Generator( G'' ~> G @_ (Sense1_Param_Compos Sense1_Param_project (Sense1_Param_ViewMor (Parameter1 g'))) <| param' ) .
Proof.
intros G G' g' Sense00_Param_F0' Sense01_Param_F0' Sense1_Param_project G'' param' g_; unshelve eexists. refine (sval g_ o>Generator g').
- abstract (simpl; rewrite Parameter_morphism;
rewrite [Parameter1 (sval g_)](proj2_sig g_); reflexivity).
Defined.
Definition unitGenerator_AtParam : forall {G : obGenerator} , 'Generator( G ~> G @_ (Sense1_Param_Id (Sense01_Param_View (Parameter0 G))) <| unitParametrizator ) .
Proof.
intros. exists (@unitGenerator G).
abstract (simpl; symmetry; exact: Parameter_unitGenerator).
Defined.
(*TODO: BAD NOTATION TODO: RENAME TO : o>GeneratorAtParam_View *)
Notation "gp_ o>GeneratorAtParam g'" :=
(@polyGenerator_AtParam _ _ g' _ _ _ _ _ gp_) (at level 40, g' at next level) : poly_scope.
Notation "g o>GeneratorAtParam_ [ Sense01_AtParam ] form" :=
(@Sense01_AtParam_action _ _ _ _ _ _ _ _ Sense01_AtParam _ _ _ g form)
(at level 40, form at next level) : poly_scope.
Notation "g o>GeneratorAtParam_ form" :=
(@Sense01_AtParam_action _ _ _ _ _ _ _ _ _ _ _ _ g form)
(at level 40, form at next level) : poly_scope.
Section Sense01_AtParam_.
Variables (Sense00_Form_F : obGenerator -> Type)
(Sense01_Form_F : Sense01_data Sense00_Form_F)
(Sense00_Param_F : obGenerator -> Type)
(Sense01_Param_F : Sense01_Param_data Sense00_Param_F)
(Sense1_FormParam_F : Sense1_FormParam_data Sense01_Form_F Sense01_Param_F).
Variables (Sense00_Param_F0' : obGenerator -> Type)
(Sense01_Param_F0' : Sense01_Param_data Sense00_Param_F0').
Variables (Sense1_Param_project : Sense1_Param_data Sense01_Param_F0' Sense01_Param_F).
Definition Sense01_AtParam_functor
(Sense01_AtParam : forall G (param : Sense00_Param_F0' G) (G' : obGenerator) (g : 'Generator( G' ~> G )),
Sense00_AtParam_ Sense1_FormParam_F Sense1_Param_project param ->
Sense00_AtParam_ Sense1_FormParam_F Sense1_Param_project ((Parameter1 g) o>Parametrizator_[sval Sense01_Param_F0'] param) ) : Prop :=
( forall G param G' (g : 'Generator( G' ~> G)) G'' (g' : 'Generator( G'' ~> G')) (form : Sense00_AtParam_ Sense1_FormParam_F Sense1_Param_project param),
sval (g' o>GeneratorAtParam_[Sense01_AtParam] (g o>GeneratorAtParam_[Sense01_AtParam] form)) =
sval ((g' o>Generator g) o>GeneratorAtParam_[Sense01_AtParam] form )) /\
( forall G param (form : Sense00_AtParam_ Sense1_FormParam_F Sense1_Param_project param),
sval form = sval ((@unitGenerator G) o>GeneratorAtParam_[Sense01_AtParam] form) ) .
Definition Sense01_AtParam_data
:= { Sense01_AtParam : ( forall G (param : Sense00_Param_F0' G) (G' : obGenerator) (g : 'Generator( G' ~> G )),
Sense00_AtParam_ Sense1_FormParam_F Sense1_Param_project param -> Sense00_AtParam_ Sense1_FormParam_F Sense1_Param_project ((Parameter1 g) o>Parametrizator_[sval Sense01_Param_F0'] param) ) |
Sense01_AtParam_functor Sense01_AtParam }.
Definition Sense01_AtParam_ : Sense01_AtParam_data.
Proof.
unshelve eexists.
- intros G param G' g form. exists (g o>Generator_[sval Sense01_Form_F] (sval form)).
abstract(rewrite -[RHS](proj2_sig Sense1_Param_project);
rewrite -[LHS](proj2_sig Sense1_FormParam_F); rewrite [in LHS](proj2_sig form); reflexivity).
- abstract(split; move; simpl; intros; [ exact: (proj1 (proj2_sig Sense01_Form_F))
| exact: (proj2 (proj2_sig Sense01_Form_F)) ]).
Defined.
(** TODO: AtParam_ is not functor , instead use everywhere only LocalParam_
which is functor and is really pullback/fiber of element and is over functor View and over functor Param_F .
and also using LocalParam_ in defining SumSubstFunctor will make SumSubstFunctor into more structured (?fibration over Param_F?) ...
and does such directly defined SumSubstFunctor functor fibration over Param_F coincides with colimit of over all the fibers/pullpacks transformations in the topos ? **)
Definition Sense01_AtParam_transp' :
forall G (param param' : Sense00_Param_F0' G), param = param' ->
Sense00_AtParam_ Sense1_FormParam_F Sense1_Param_project param ->
Sense00_AtParam_ Sense1_FormParam_F Sense1_Param_project param' .
Proof.
(** /!\ NO! intros until 1; subst; exact: id. Defined. /!\ **)
intros ? ? ? Heq form. exists (sval form).
abstract (simpl; subst; exact: (proj2_sig form)).
Defined.
Lemma Sense01_AtParam_transp'P
(G : obGenerator) (param param' : Sense00_Param_F0' G)
(Heq : param = param') (form : Sense00_AtParam_ Sense1_FormParam_F Sense1_Param_project param) :
sval form = sval (Sense01_AtParam_transp' Heq form).
Proof.
reflexivity.
Qed.
Section Section1.
Variables (Sense1_Param_project' : Sense1_Param_data Sense01_Param_F0' Sense01_Param_F).
Definition Sense01_AtParam_transp : forall G (param param' : Sense00_Param_F0' G),
sval Sense1_Param_project _ param = sval Sense1_Param_project' _ param' ->
Sense00_AtParam_ Sense1_FormParam_F Sense1_Param_project param ->
Sense00_AtParam_ Sense1_FormParam_F Sense1_Param_project' param' .
Proof.
(** /!\ NO! intros until 1; subst; exact: id. Defined. /!\ **)
intros ? ? ? Heq form. exists (sval form).
abstract (simpl; rewrite (proj2_sig form); assumption).
(* abstract (simpl; subst; exact: (proj2_sig form)). *)
Defined.
End Section1.
End Sense01_AtParam_.
Lemma Sense01_AtParam_transp'' (*TODO: DO Sense01_AtParam_transp''_prop *)
: forall (Sense00_Form_F : obGenerator -> Type) (Sense01_Form_F : Sense01_data Sense00_Form_F) (Sense00_Param_F : obGenerator -> Type) (Sense01_Param_F : Sense01_Param_data Sense00_Param_F)
(Sense1_FormParam_F : Sense1_FormParam_data Sense01_Form_F Sense01_Param_F) (Sense00_Param_F0' : obGenerator -> Type) (Sense01_Param_F0' : Sense01_Param_data Sense00_Param_F0')
(Sense1_Param_project : Sense1_Param_data Sense01_Param_F0' Sense01_Param_F)
(Sense00_Param_F0'' : obGenerator -> Type) (Sense01_Param_F0'' : Sense01_Param_data Sense00_Param_F0'')
(Sense1_Param_project' : Sense1_Param_data Sense01_Param_F0'' Sense01_Param_F)
(G : obGenerator) (param : Sense00_Param_F0' G) ( param' : Sense00_Param_F0'' G),
sval Sense1_Param_project G param = sval Sense1_Param_project' G param' ->
Sense00_AtParam_ Sense1_FormParam_F Sense1_Param_project param -> Sense00_AtParam_ Sense1_FormParam_F Sense1_Param_project' param' .
Proof.
(** /!\ NO! intros until 1; subst; exact: id. Defined. /!\ **)
intros ? ? ? ? ? ? ? ? ? ? ? ? ? ? Heq form. exists (sval form).
abstract (simpl; rewrite (proj2_sig form); assumption).
(* abstract (simpl; subst; exact: (proj2_sig form)). *)
Defined.
(** # #
#+END_SRC
** Sense-decodings lemmas : collection of parameter-elements above one given parameter-element
#+BEGIN_SRC coq :exports both :results silent # # **)
Section Sense00_Param_AtParam_.
Variables (Sense00_Param_F' : obGenerator -> Type)
(Sense01_Param_F' : Sense01_Param_data Sense00_Param_F')
(Sense00_Param_F : obGenerator -> Type)
(Sense01_Param_F : Sense01_Param_data Sense00_Param_F)
(Sense1_Param_subst : Sense1_Param_data Sense01_Param_F' Sense01_Param_F).
Definition Sense00_Param_AtParam_
(G : obGenerator) (param : Sense00_Param_F G)
:= {form : Sense00_Param_F' G | sval Sense1_Param_subst G form = param} .
Definition Sense01_Param_AtParam_action
(Sense01_Param_AtParam : ( forall G (param : Sense00_Param_F G) (G' : obGenerator) (g : 'Parametrizator( Parameter0 G' ~> Parameter0 G )),
Sense00_Param_AtParam_ param -> Sense00_Param_AtParam_ ( g o>Parametrizator_[sval Sense01_Param_F] param) ))
G (param : Sense00_Param_F G) (G' : obGenerator) (g : 'Parametrizator( Parameter0 G' ~> Parameter0 G ))(form : Sense00_Param_AtParam_ param)
:= (Sense01_Param_AtParam G param G' g form).
Definition Sense00_Param_AtParam_self
(G : obGenerator) (param : Sense00_Param_F' G): Sense00_Param_AtParam_ (sval Sense1_Param_subst G param).
Proof.
exists param. abstract(reflexivity).
Defined.
Definition Sense00_Param_AtParam_selfP
(G : obGenerator) (param : Sense00_Param_F' G):
sval (Sense00_Param_AtParam_self param) = param .
Proof.
reflexivity.
Qed.
Definition Sense00_Param_AtParam_self'
(G : obGenerator) (param : Sense00_Param_F' G) paramlocal: (sval Sense1_Param_subst G param) = paramlocal -> Sense00_Param_AtParam_ paramlocal.
Proof.
exists param. abstract(assumption).
Defined.
Definition Sense00_Param_AtParam_self'P
(G : obGenerator) (param : Sense00_Param_F' G) paramlocal (Heqparam : (sval Sense1_Param_subst G param) = paramlocal) :
sval (Sense00_Param_AtParam_self' Heqparam) = param .
Proof.
reflexivity.
Qed.
End Sense00_Param_AtParam_.
Notation "''Parametrizator' ( G' ~> P @_ param )" :=
(@Sense00_Param_AtParam_ _ _ _ _ (Sense1_Param_Id (Sense01_Param_View P)) G' param) (at level 0) : poly_scope.
Definition polyGenerator_Param_AtParam : forall P P' (g' : 'Parametrizator( P' ~> P )),
forall (G'' : obGenerator) (param' : (Sense00_Param_View P') G'') , 'Parametrizator( G'' ~> P' @_ param' ) ->
'Parametrizator( G'' ~> P @_ (param' o>Parametrizator g') ) .
Proof.
intros until param' . intros g_. exists (sval g_ o>Parametrizator g').
- abstract (simpl; (*rewrite Parameter_morphism;*)
rewrite [(*Parameter1*) (sval g_)](proj2_sig g_); reflexivity).
Defined.
Definition unitGenerator_Param_AtParam : forall {G : obGenerator} , 'Parametrizator( G ~> Parameter0 G @_ unitParametrizator ) .
Proof.
intros. exists (@unitParametrizator (Parameter0 G)).
abstract (simpl; reflexivity (* symmetry; exact: Parameter_unitGenerator *) ).
Defined.
(*TODO: BAD NOTATION TODO: RENAME TO : o>GeneratorAtParam_View *)
Notation "gp_ o>ParametrizatorAtParam g'" :=
(@polyGenerator_Param_AtParam _ _ g' _ _ gp_) (at level 40, g' at next level) : poly_scope.
Notation "g o>ParametrizatorAtParam_ [ Sense01_Param_AtParam ] form" :=
(@Sense01_Param_AtParam_action _ _ _ _ _ Sense01_Param_AtParam _ _ _ g form)
(at level 40, form at next level) : poly_scope.
Notation "g o>ParametrizatorAtParam_ form" :=
(@Sense01_Param_AtParam_action _ _ _ _ _ _ _ _ _ g form)
(at level 40, form at next level) : poly_scope.
Section Sense01_Param_AtParam_.
Variables (Sense00_Param_F' : obGenerator -> Type)
(Sense01_Param_F' : Sense01_Param_data Sense00_Param_F')
(Sense00_Param_F : obGenerator -> Type)
(Sense01_Param_F : Sense01_Param_data Sense00_Param_F)
(Sense1_Param_subst : Sense1_Param_data Sense01_Param_F' Sense01_Param_F).
Definition Sense01_Param_AtParam_functor
(Sense01_Param_AtParam : forall G (param : Sense00_Param_F G) (G' : obGenerator) (g : 'Parametrizator( Parameter0 G' ~> Parameter0 G )),
Sense00_Param_AtParam_ Sense1_Param_subst param ->
Sense00_Param_AtParam_ Sense1_Param_subst ( g o>Parametrizator_[sval Sense01_Param_F] param) ) : Prop :=
( forall G param G' (g : 'Parametrizator( Parameter0 G' ~> Parameter0 G)) G'' (g' : 'Parametrizator( Parameter0 G'' ~> Parameter0 G')) (form : Sense00_Param_AtParam_ Sense1_Param_subst param),
sval (g' o>ParametrizatorAtParam_[Sense01_Param_AtParam] (g o>ParametrizatorAtParam_[Sense01_Param_AtParam] form)) =
sval ((g' o>Parametrizator g) o>ParametrizatorAtParam_[Sense01_Param_AtParam] form )) /\
( forall G param (form : Sense00_Param_AtParam_ Sense1_Param_subst param),
sval form = sval ((@unitParametrizator (Parameter0 G)) o>ParametrizatorAtParam_[Sense01_Param_AtParam] form) ) .
Definition Sense01_Param_AtParam_data
:= { Sense01_Param_AtParam : ( forall G (param : Sense00_Param_F G) (G' : obGenerator) (g : 'Parametrizator( Parameter0 G' ~> Parameter0 G )),
Sense00_Param_AtParam_ Sense1_Param_subst param ->
Sense00_Param_AtParam_ Sense1_Param_subst ( g o>Parametrizator_[sval Sense01_Param_F] param) ) |
Sense01_Param_AtParam_functor Sense01_Param_AtParam }.
Definition Sense01_Param_AtParam_ : Sense01_Param_AtParam_data.
Proof.
unshelve eexists.
- intros G param G' g form. exists (g o>Parametrizator_[sval Sense01_Param_F'] (sval form)).
abstract(rewrite -[LHS](proj2_sig Sense1_Param_subst); rewrite [in LHS](proj2_sig form); reflexivity).
- abstract(split; move; simpl; intros; [ exact: (proj1 (proj2_sig Sense01_Param_F'))
| exact: (proj2 (proj2_sig Sense01_Param_F')) ]).
Defined.
(** TODO: AtParam_ is not functor , instead use everywhere only LocalParam_
which is functor and is really pullback/fiber of element and is over functor View and over functor Param_F .
and also using LocalParam_ in defining SumSubstFunctor will make SumSubstFunctor into more structured (?fibration over Param_F?) ...
and does such directly defined SumSubstFunctor functor fibration over Param_F coincides with colimit of over all the fibers/pullpacks transformations in the topos ? **)
Definition Sense01_Param_AtParam_transp :
forall G (param param' : Sense00_Param_F G), param = param' ->
Sense00_Param_AtParam_ Sense1_Param_subst param ->
Sense00_Param_AtParam_ Sense1_Param_subst param' .
Proof.
(** /!\ NO! intros until 1; subst; exact: id. Defined. /!\ **)
intros ? ? ? Heq form. exists (sval form).
abstract (simpl; subst; exact: (proj2_sig form)).
Defined.
End Sense01_Param_AtParam_.
(** # #
#+END_SRC
** Sense-decodings lemmas : fibre of form-objects above one given parameter-object
#+BEGIN_SRC coq :exports both :results silent # # **)
Module Export inFibre.
Definition reparamCongrGenerator (G' G : obGenerator)
:= { reparam_reparam_rev : 'Generator( G' ~> G ) * 'Generator( G ~> G' )
| ((fst reparam_reparam_rev) o>Generator (snd reparam_reparam_rev) = unitGenerator) /\
((snd reparam_reparam_rev) o>Generator (fst reparam_reparam_rev) = unitGenerator) } .
Definition unitGenerator_reparamCongrGenerator (G : obGenerator) : reparamCongrGenerator G G.
intros. unshelve eexists. split.
exact: unitGenerator.
exact: unitGenerator.
abstract (split; simpl; rewrite -unitGenerator_polyGenerator; reflexivity).
Defined.
Definition reparamCongrParametrizator (P' P : obParametrizator)
:= { reparam_reparam_rev : 'Parametrizator( P' ~> P ) * 'Parametrizator( P ~> P' )
| ((fst reparam_reparam_rev) o>Parametrizator (snd reparam_reparam_rev) = unitParametrizator) /\
((snd reparam_reparam_rev) o>Parametrizator (fst reparam_reparam_rev) = unitParametrizator) } .
Definition unitParametrizator_reparamCongrParametrizator (P : obParametrizator) : reparamCongrParametrizator P P.
intros. unshelve eexists. split.
exact: unitParametrizator.
exact: unitParametrizator.
abstract (split; simpl; rewrite -unitParametrizator_polyParametrizator; reflexivity).
Defined.
Notation InFibre G := (unitParametrizator_reparamCongrParametrizator (Parameter0 G)) .
Section inFibre.
Variables (G : obGenerator).
(**TODO: change, the argument [P : obParametrizator] should be given outer first , then [G : obGenerator] is inner *)
Definition inFibre (P : obParametrizator) := reparamCongrParametrizator (Parameter0 G) P .
(*TODO: INLINE *)Definition inFibre_transp_rev_codom : forall (P : obParametrizator) (inFibre_P : inFibre P),
forall Q (p : 'Parametrizator( Q ~> Parameter0 G )), 'Parametrizator( Q ~> P ).
Proof.
intros. exact: (p o>Parametrizator (fst (sval inFibre_P))) .
Defined.
(*TODO: INLINE , AS NOTATION ? *)Definition inFibre_transp_codom : forall (P : obParametrizator) (inFibre_P : inFibre P),
forall Q (p : 'Parametrizator( Q ~> P )), 'Parametrizator( Q ~> Parameter0 G ).
Proof.
intros. exact: (p o>Parametrizator (snd (sval inFibre_P))) .
Defined.
End inFibre.
Definition inFibre_transformation :
forall (G' G : obGenerator) (g : reparamCongrGenerator G' G),
( forall (P : obParametrizator) (inFibre_P : inFibre G P), inFibre G' P ) .
Proof.
unshelve eexists. split.
- exact: (Parameter1 (fst (sval g)) o>Parametrizator (fst (sval inFibre_P))).
- exact: ((snd (sval inFibre_P)) o>Parametrizator (Parameter1 (snd (sval g)))).
- abstract (split; simpl;
[ simpl; rewrite polyParametrizator_morphism; rewrite -[X in X o>Parametrizator _ = _ ]polyParametrizator_morphism;
rewrite (proj1 (proj2_sig inFibre_P)); rewrite -unitParametrizator_polyParametrizator;
rewrite -Parameter_morphism; rewrite (proj1 (proj2_sig g)); rewrite -Parameter_unitGenerator; reflexivity
| simpl; rewrite polyParametrizator_morphism; rewrite -[X in X o>Parametrizator _ = _ ]polyParametrizator_morphism;
rewrite -Parameter_morphism; rewrite (proj2 (proj2_sig g)); rewrite -Parameter_unitGenerator; rewrite -unitParametrizator_polyParametrizator;
rewrite (proj2 (proj2_sig inFibre_P)); reflexivity ] ).
Defined.
Lemma inFibre_transformation_morphism' :
forall (G : obGenerator) (P : obParametrizator) (inFibre_P : inFibre G P),
fst (sval inFibre_P) = fst (sval (inFibre_transformation (unitGenerator_reparamCongrGenerator _) inFibre_P)) .
intros. simpl. destruct inFibre_P as [x ?]. simpl. destruct x. simpl.
rewrite -Parameter_unitGenerator; rewrite -polyParametrizator_unitParametrizator. reflexivity.
Qed.
End inFibre.
(** # #
#+END_SRC
** Sense-decodings lemmas : substitution (pullback) of parameter-morphism along given parameter-morphism
#+BEGIN_SRC coq :exports both :results silent # # **)
Section Subst.
Section Section1.
Variables (Sense00_Param_F : obGenerator -> Type)
(Sense01_Param_F : Sense01_Param_data Sense00_Param_F)
(Sense00_Param_F_ : obGenerator -> Type)
(Sense01_Param_F_ : Sense01_Param_data Sense00_Param_F_)
(Sense1_Param_proj : Sense1_Param_data Sense01_Param_F Sense01_Param_F_)
(Sense00_Param_F_' : obGenerator -> Type)
(Sense01_Param_F_' : Sense01_Param_data Sense00_Param_F_')
(Sense1_Param_subst : Sense1_Param_data Sense01_Param_F_' Sense01_Param_F_).
(** objectwise/componentwise pullback in functor category *)
Definition Sense00_Param_Subst : obGenerator -> Type.
Proof.
refine (fun H : obGenerator => { xf : Sense00_Param_F_' H &
Sense00_Param_AtParam_ Sense1_Param_proj (sval Sense1_Param_subst _ xf) } ).
Defined.
Axiom Sense00_Param_Subst_quotientLogical :
forall G (form form' : Sense00_Param_Subst G), projT1 form = projT1 form' ->
(sval (projT2 form)) = (sval (projT2 form')) -> form = form'.
Definition Sense01_Param_Subst : Sense01_Param_data Sense00_Param_Subst.
Proof.
unshelve eexists.
- intros H H' h xf.
exists ( h o>Parametrizator_[sval Sense01_Param_F_'] (projT1 xf)).
apply: Sense01_Param_AtParam_transp; last (by exact (h o>ParametrizatorAtParam_[sval (Sense01_Param_AtParam_ _ )] (projT2 xf)));
abstract(exact:(proj2_sig Sense1_Param_subst)).
- abstract (split; simpl;
first (by intros; apply: Sense00_Param_Subst_quotientLogical; simpl;
[ rewrite -[in RHS](proj1 (proj2_sig (Sense01_Param_F_')))
| rewrite -[in RHS](proj1 (proj2_sig (Sense01_Param_F)))]; reflexivity );
intros H xf; apply: Sense00_Param_Subst_quotientLogical; simpl;
[ rewrite -[in RHS](proj2 (proj2_sig (Sense01_Param_F_')))
| rewrite -[in RHS](proj2 (proj2_sig (Sense01_Param_F))) ]; reflexivity).
Defined.
Definition Sense1_Param_Subst_proj : Sense1_Param_data Sense01_Param_Subst Sense01_Param_F_'.
Proof.
unshelve eexists.
- intros G xf. exact: (projT1 xf).
- abstract (move; reflexivity).
Defined.
Definition Sense1_Param_Subst_subst : Sense1_Param_data Sense01_Param_Subst Sense01_Param_F.
Proof.
unshelve eexists.
- intros G xf. exact: (sval (projT2 xf)).
- abstract (move; reflexivity).
Defined.
Definition Sense1_Param_Subst : Sense1_Param_data Sense01_Param_Subst Sense01_Param_F_.
Proof.
unshelve eexists.
- intros G xf. exact: (sval Sense1_Param_subst _ (projT1 xf )).
- abstract (move; simpl; intros; apply: (proj2_sig Sense1_Param_subst)).
Defined.
End Section1.
Definition Sense1_Param_Subst1 :
forall (Sense00_Param_F : obGenerator -> Type)
(Sense01_Param_F : Sense01_Param_data Sense00_Param_F)
(Sense00_Param_F_ : obGenerator -> Type)
(Sense01_Param_F_ : Sense01_Param_data Sense00_Param_F_)
(Sense1_Param_proj_FF_ : Sense1_Param_data Sense01_Param_F Sense01_Param_F_)
(Sense00_Param_F_' : obGenerator -> Type)
(Sense01_Param_F_' : Sense01_Param_data Sense00_Param_F_')
(Sense1_Param_subst_F_'F_ : Sense1_Param_data Sense01_Param_F_' Sense01_Param_F_)
(Sense00_Param_G : obGenerator -> Type)
(Sense01_Param_G : Sense01_Param_data Sense00_Param_G)
(Sense1_Param_proj_GF_ : Sense1_Param_data Sense01_Param_G Sense01_Param_F_)
(Sense00_Param_G_' : obGenerator -> Type)
(Sense01_Param_G_' : Sense01_Param_data Sense00_Param_G_')
(Sense1_Param_subst_G_'F_ : Sense1_Param_data Sense01_Param_G_' Sense01_Param_F_)
(Sense1_Param_FG : Sense1_Param_data Sense01_Param_F Sense01_Param_G)
(Heq_Param_FG : forall G param, (sval Sense1_Param_proj_GF_ G) ((sval Sense1_Param_FG G) param)
= (sval Sense1_Param_proj_FF_ G) param)
(Sense1_Param_F_'G_' : Sense1_Param_data Sense01_Param_F_' Sense01_Param_G_')
(Heq_Param_F_'G_' : forall G param, (sval Sense1_Param_subst_G_'F_ G) ((sval Sense1_Param_F_'G_' G) param)
= (sval Sense1_Param_subst_F_'F_ G) param),
Sense1_Param_data (Sense01_Param_Subst Sense1_Param_proj_FF_ Sense1_Param_subst_F_'F_) (Sense01_Param_Subst Sense1_Param_proj_GF_ Sense1_Param_subst_G_'F_).
Proof.
intros; unshelve eexists.
- intros G sp. exists ( sval Sense1_Param_F_'G_' _ (projT1 sp) ).
exists ( sval Sense1_Param_FG _ (sval (projT2 sp)) ).
+ abstract(simpl; rewrite [LHS]Heq_Param_FG [RHS]Heq_Param_F_'G_'; exact: (proj2_sig (projT2 sp))).
- abstract (move; intros; apply: Sense00_Param_Subst_quotientLogical; simpl;
first (by exact: (proj2_sig Sense1_Param_F_'G_' _ _ )) ;
exact: (proj2_sig Sense1_Param_FG _ _ )) .
Defined.
End Subst.
(** # #
#+END_SRC
** Sense-decodings lemmas : image of localization (pullback) of parameter-morphism along given parameter-element
#+BEGIN_SRC coq :exports both :results silent # # **)
Section Sense00_LocalParam_.
Section Section0.
Variables (Sense00_Param_F : obGenerator -> Type)
(Sense01_Param_F : Sense01_Param_data Sense00_Param_F).
Variables (Sense00_Param_F0' : obGenerator -> Type)
(Sense01_Param_F0' : Sense01_Param_data Sense00_Param_F0').
Variables (Sense1_Param_subst : Sense1_Param_data Sense01_Param_F Sense01_Param_F0').
Definition Sense00_LocalParam_ (G : obGenerator) (paramlocal : Sense00_Param_F0' G) : obGenerator -> Type.
Proof.
refine (fun H : obGenerator => { param : Sense00_Param_View (Parameter0 G) H &
Sense00_Param_AtParam_ Sense1_Param_subst
(sval (element_to_polyelement Sense01_Param_F0' paramlocal) _ param) } ).
Defined.
(**TODO: add consequence lemma with : [Sense1_LocalParam_proj param = Sense1_LocalParam_proj param' -> param - param']
MEMO: must quotient the data as such , instead of using ex properties in Sense00_LocalParam_ := { _ | ex _ } . *)
Axiom Sense00_LocalParam_quotientLogical :
forall (G : obGenerator) (paramlocal : Sense00_Param_F0' G), forall H (param param' : Sense00_LocalParam_ paramlocal H),
projT1 param = projT1 param' -> param = param' .
Definition Sense01_LocalParam_
(G : obGenerator) (paramlocal : Sense00_Param_F0' G) : Sense01_Param_data (Sense00_LocalParam_ paramlocal).
Proof.
unshelve eexists.
- intros H H' h param.
exists ( h o>Parametrizator_[sval (Sense01_Param_View (Parameter0 G))] (projT1 param)).
apply: Sense01_Param_AtParam_transp; last (by exact (h o>ParametrizatorAtParam_[sval (Sense01_Param_AtParam_ _ )] (projT2 param)));
abstract(exact:(proj2_sig (element_to_polyelement Sense01_Param_F0' paramlocal))).
- abstract (split; simpl;
[ intros; apply: Sense00_LocalParam_quotientLogical; simpl;
rewrite -[in RHS](proj1 (proj2_sig (Sense01_Param_View (Parameter0 G)))); reflexivity
| intros H param; apply: Sense00_LocalParam_quotientLogical; simpl;
rewrite -[in RHS](proj2 (proj2_sig ((Sense01_Param_View (Parameter0 G))))); reflexivity ] ).
Defined.
Definition Sense1_LocalParam_proj (G : obGenerator) (paramlocal : Sense00_Param_F0' G) : forall (P : obParametrizator) (inFibre_P : inFibre G P), Sense1_Param_data (Sense01_LocalParam_ paramlocal) (Sense01_Param_View P).
Proof.
intros. refine (Sense1_Param_Compos _ (Sense1_Param_ViewMor (fst (sval inFibre_P)))). unshelve eexists.
- intros G0 param. exact: (projT1 param).
- abstract (move; intros; simpl; reflexivity).
Defined.
Definition Sense1_LocalParam (G : obGenerator) (paramlocal : Sense00_Param_F0' G) : Sense1_Param_data (Sense01_LocalParam_ paramlocal) Sense01_Param_F0'.
Proof.
unshelve eexists.
- intros H param.
exact: ((projT1 param) o>Parametrizator_[sval Sense01_Param_F0'] paramlocal).
- abstract (move; simpl; intros; exact: (proj1 (proj2_sig Sense01_Param_F0'))).
Defined.
Definition Sense01_LocalParam_transp
(G : obGenerator) (param param' : Sense00_Param_F0' G) :
param = param' -> Sense1_Param_data (Sense01_LocalParam_ param)
(Sense01_LocalParam_ param').
Proof.
(** /!\ NO! intros; subst; exact: Sense1_Param_Id. Defined. /!\ **)
intros Heq. unshelve eexists.
- intros H h_form. exists (projT1 h_form).
apply: Sense01_Param_AtParam_transp; last (by exact: (projT2 h_form));
abstract(simpl; subst; reflexivity).
- abstract (move; intros; apply: Sense00_LocalParam_quotientLogical; reflexivity).
Defined.
Lemma Sense01_LocalParam_transpP
(G : obGenerator) (param param' : Sense00_Param_F0' G) (H : obGenerator)
(Heq : param = param') (h_form : Sense00_LocalParam_ param H) :
projT1 h_form = projT1 (sval (Sense01_LocalParam_transp Heq) _ h_form).
Proof.
reflexivity.
Qed.
Definition Sense00_LocalParam_of_Sense00_Param_AtParam_
(G : obGenerator) (param : Sense00_Param_F0' G) :
Sense00_Param_AtParam_ Sense1_Param_subst param -> Sense00_LocalParam_ param G.
Proof.
intros paramlocal. exists unitParametrizator. exists (sval paramlocal).
abstract (simpl; rewrite -(proj2 (proj2_sig Sense01_Param_F0')); exact: (proj2_sig paramlocal)).
Defined.
Definition Sense01_LocalParam_postcomposition
(G : obGenerator) (param : Sense00_Param_F0' G) G' (p : 'Parametrizator( Parameter0 G' ~> Parameter0 G)):
Sense1_Param_data (Sense01_LocalParam_ (p o>Parametrizator_[sval Sense01_Param_F0' ] param))
(Sense01_LocalParam_ param).
Proof.
unshelve eexists.
intros H h_form. exists ( projT1 h_form o>Parametrizator p ). exists (sval (projT2 h_form)).
abstract (simpl; rewrite [LHS](proj2_sig (projT2 h_form)); simpl; rewrite (proj1 (proj2_sig Sense01_Param_F0')); reflexivity).
abstract (move; simpl; intros; apply: Sense00_LocalParam_quotientLogical; simpl;
exact: polyParametrizator_morphism).
Defined.
Definition Sense01_LocalParam_postcomposition'
(G : obGenerator) (param : Sense00_Param_F0' G) G'
(p : 'Parametrizator( Parameter0 G' ~> Parameter0 G)) (param' : Sense00_Param_F0' G')
(Heq: param' = (p o>Parametrizator_[sval Sense01_Param_F0' ] param)) :
Sense1_Param_data (Sense01_LocalParam_ param')
(Sense01_LocalParam_ param).
Proof.
unshelve eexists. intros H h_form. exists ( projT1 h_form o>Parametrizator p ). exists (sval (projT2 h_form)).
abstract (simpl; intros; subst; rewrite [LHS](proj2_sig (projT2 h_form)); simpl; rewrite (proj1 (proj2_sig Sense01_Param_F0')); reflexivity).
abstract (move; simpl; intros; apply: Sense00_LocalParam_quotientLogical; simpl;
exact: polyParametrizator_morphism).
Defined.
End Section0.
End Sense00_LocalParam_.
(** # #
#+END_SRC
** Sense-decodings lemmas : total (pullback) parameter-object of one given parameter-morphism
#+BEGIN_SRC coq :exports both :results silent # # **)
Section Sum.
Variables (Sense00_Param_F : obGenerator -> Type)
(Sense01_Param_F : Sense01_Param_data Sense00_Param_F)
(Sense00_Param_SumF : obGenerator -> Type)
(Sense01_Param_SumF : Sense01_Param_data Sense00_Param_SumF)
(Sense1_Param_subst : Sense1_Param_data Sense01_Param_F Sense01_Param_SumF).
Definition Sense00_Param_Sum : obGenerator -> Type
:= Sense00_Param_Subst Sense1_Param_subst (Sense1_Param_Id _) .
Lemma Sense00_Param_Sum_quotientLogical :
forall G (form form' : Sense00_Param_Sum G), projT1 form = projT1 form' -> sval (projT2 form) = sval (projT2 form') -> form = form' .
Proof.
intros; apply: Sense00_Param_Subst_quotientLogical; simpl; assumption.
Qed.
Definition Sense01_Param_Sum : Sense01_Param_data Sense00_Param_Sum
:= Sense01_Param_Subst Sense1_Param_subst (Sense1_Param_Id _) .
Definition Sense1_Param_Sum : Sense1_Param_data Sense01_Param_Sum Sense01_Param_SumF
:= Sense1_Param_Subst Sense1_Param_subst (Sense1_Param_Id _) .
(**TODO: this is used at reparamCongr_Constructing_default_comp_Destructing_default_reparam *)
Definition Sense1_Param_Sum_subst : Sense1_Param_data Sense01_Param_Sum Sense01_Param_F
:= Sense1_Param_Subst_subst Sense1_Param_subst (Sense1_Param_Id _) .
End Sum.
(** # #
#+END_SRC
** Sense-decodings of objects : viewing functor of parameter-object , or image of total (pullback) parameter-object of one given parameter-morphism
#+BEGIN_SRC coq :exports both :results silent # # **)
Section SumImage.
Variables (Sense00_Param_SubstF : obGenerator -> Type)
(Sense01_Param_SubstF : Sense01_Param_data Sense00_Param_SubstF)
(Sense00_Param_F : obGenerator -> Type)
(Sense01_Param_F : Sense01_Param_data Sense00_Param_F)
(Sense1_Param_subst : Sense1_Param_data Sense01_Param_SubstF Sense01_Param_F).