Debian Codegraph @

examples/tait/diplomarbeit_schlenker/Lem1.scm

raw
1 ; ***********************************************************
2 ; ; Adapt path if necessary:
3 ; (define path "~/minlog/examples/tait/diplomarbeit_schlenker/")
4
5 ; ; Defines the function "pload" to load files
6 ; ; from the path defined above
7 ; (define pload (lambda (x) (load (string-append path x))))
8
9 ; ; Used Modules:
10 ; (pload "./initiate.scm")
11 ; (pload "./defsLamCalc.scm")
12 ; (pload "./defsSubst.scm")
13 ; (pload "./omega.scm")
14 ; (pload "./defsNT.scm")
15 ; (pload "./defsAxiomsSpecial.scm")
16 ; (pload "./defsAxioms.scm")
17 ; (pload "./trivial.scm")
18 ; (pload "./auxSC.scm")
19 ; (pload "./auxGlobal_SHORT.scm")
20 ; (pload "./auxLem1_SHORT.scm")
21
22 ; NOTICE: Uncomment modules only when file is run on its own
23 ; ***********************************************************
24
25
26 ; ==================
27 ; Section: Lemma 1
28 ; ==================
29 ; contains Lemma 1 of the Normalization Proof
30
31 ; Lemma: "LemmaOne"
32 ; -----------------
33 ; Lemma 1 of the Normalization Proof
34 ; Sketch: (SC -> SN) & (SA -> SC)
35
36 (set-goal
37 (pf "all rho allnc rhos,r.TypJ rhos r rho ->
38 (ex a^ SCr rhos rho a^r ->
39 all k.Fr rhos rho r k -> ex s N rhos rho r s) &
40 ((all k.Fr rhos rho r k -> ex s A rhos rho r s) ->
41 ex a^ SCr rhos rho a^r)"))
42
43 (ind)
44
45 ; Base Case: Iota
46 (assume "rhos" "r" "[TypJ]")
47 (split)
48
49 ; SC -> SN
50 (use "LemmaSCIotaUnfold")
51
52 ; SA -> SC
53 (assume "[SA]")
54 (use "LemmaSCIotaFold")
55 (use "[TypJ]")
56 (assume "k" "[Fr]")
57
58 (cut (pf "ex s A rhos Iota r s"))
59 (assume "[ex.Body]")
60 (by-assume-with "[ex.Body]" "s" "[Body]")
61
62 (ex-intro (pt "s"))
63 (use "Ax2")
64 (use "[Body]")
65 (use-with "[SA]" (pt "k") "[Fr]")
66
67 ; Step Case: rho to sig
68 (assume "rho" "sig" "[IHrho]" "[IHsig]" "rhos" "r" "[TypJ]")
69 (split)
70
71 ; goal: SC -> SN
72 (assume "[SC]" "k" "[Fr]")
73
74 (cut (pf "ex s N(rhos:+:(ExtCtx rhos k rho))sig(r(Var k))s"))
75 (assume "[ex.Body]")
76 (by-assume-with "[ex.Body]" "s" "[Body]")
77 (ex-intro (pt "ABS k rho s"))
78
79 (use "Ax1")
80 (use "[Fr]")
81 (use "[Body]")
82
83 (assert (pf "ex a^ SCr(rhos:+:(ExtCtx rhos k rho))rho a^(Var k)"))
84 (use "[IHrho]")
85 (use "LemmaOneAux1" (pt "sig") (pt "r"))
86 (use "[Fr]")
87 (assume "k1" "[Fr 2]")
88 (ex-intro (pt "Var k"))
89 (use "Ax3")
90 (use "LemmaOneAux1" (pt "sig") (pt "r"))
91 (use "[Fr]")
92 (assume "[SC 2]")
93
94 (use "[IHsig]" (pt "k+1"))
95 (use "LemmaOneAux2" (pt "sig") (pt "r"))
96 (use "[Fr]")
97
98 (use "LemmaSCUnfold" (pt "rho"))
99 (use "[SC]")
100 (use "[SC 2]")
101 (use "LemmaOneAux3")
102 (use "[Fr]")
103
104 ; goal: SA -> SC
105 (assume "[SA]")
106 (use "LemmaSCFold")
107 (use "[TypJ]")
108 (assume "sigs" "s" "[SC]")
109 (use "[IHsig]")
110 (use "TypJAppIntro" (pt "rho"))
111 (use "[TypJ]")
112 (use "LemmaOneAux8")
113 (prop)
114
115 (assume "k" "[Fr]")
116 (cut (pf "ex t A rhos(rho to sig)r t"))
117 (assume "[ex.Body]")
118 (by-assume-with "[ex.Body]" "r1" "[Body]")
119
120 (cut (pf "ex s1 N(rhos:+:sigs)rho s s1"))
121 (assume "[ex.Body 2]")
122 (by-assume-with "[ex.Body 2]" "s1" "[Body 2]")
123
124 (ex-intro (pt "r1 s1"))
125 (use "Ax4" (pt "rho"))
126 (use "Ax10")
127 (use "[Body]")
128 (use "LemmaOneAux8")
129 (prop)
130
131 (use "[Body 2]")
132 (use "[IHrho]" (pt "k"))
133 (use "LemmaOneAux8")
134 (prop)
135
136 (use "[SC]")
137 (use "LemmaOneAux5" (pt "sig") (pt "r"))
138 (use "[Fr]")
139
140 (use "LemmaOneAux8")
141 (prop)
142
143 (use "[SA]" (pt "k"))
144 (use "LemmaOneAux7" (pt "sigs") (pt "s"))
145 (use "[Fr]")
146 (use "[TypJ]")
147 (save "LemmaOne")