Debian Codegraph @

examples/tait/diplomarbeit_schlenker/auxNT_SHORT.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 ; (pload "./Lem1.scm")
22 ;
23 ; NOTICE: Uncomment modules only when file is run on its own
24 ; ***********************************************************
25
26
27 ; ====================================================
28 ; Section: Auxiliaries for the Normalization Theorem
29 ; ====================================================
30 ; contains all auxiliaries for the Normalization Theorem
31
32
33 ; Subsection: "SCrsSeq"
34 ; =====================
35
36 ; Lemma: "TypJVar"
37 ; ----------------
38 ; an auxiliary for "SCrsSeq"
39 (add-global-assumption "TypJVar"
40 (pf "all sigs,rhos,rho TypJ(sigs:+: (rho::rhos))(Var Lh sigs)rho"))
41
42 ; Lemma: "SCrsSeq"
43 ; ----------------
44 ; Note: Lemma has computational content
45
46 (set-goal
47 (pf "all rhos,sigs ex as^.
48 SCrs(sigs:+:rhos)rhos as^ (Var map(Seq(Lh sigs)(Lh rhos)))"))
49
50 (ind)
51 ; Base Case: (Nil type)
52 (assume "sigs")
53 (ex-intro (pt "(Nil omega)"))
54 (simp "ListAppendNil")
55 (use "SCrsDefNil")
56
57 ; Step Case: r :: rhos
58 (assume "rho" "rhos" "[IH]" "sigs")
59 (inst-with-to "[IH]" (pt "sigs:+:rho:") "[IH 2]")
60 (by-assume-with "[IH 2]" "as^" "[IHInst]")
61
62 (assert (pf "ex a^ SCr(sigs:+: (rho::rhos)) rho a^(Var(Lh sigs))"))
63 (use "LemmaOne")
64 (use "TypJVar")
65 (assume "k" 4)
66 (ex-intro (pt "Var Lh sigs"))
67 (use "Ax3")
68 (use "TypJVar")
69 (assume "[SC]")
70
71 (by-assume-with "[SC]" "a^" "[SC Body]")
72 (ex-intro (pt "a^ ::as^"))
73
74 (ng #t)
75 (use "SCrsDef")
76 (use "SCrsSTotal" (pt "(sigs:+:rho: :+:rhos)")
77 (pt "rhos")(pt "(Var map Seq Lh(sigs:+:rho:)Lh rhos)"))
78 (prop)
79 (use "[SC Body]")
80 (simp (pf "(sigs:+:(rho::rhos))=(sigs:+:rho: :+:rhos)"))
81 (use "[IHInst]")
82 (simp "ListAppendAssoc")
83 (use "Truth-Axiom")
84 (save "SCrsSeq")
85
86
87 ; Subsection: "SubIds"
88 ; ====================
89
90 ; Lemma: "SubIds"
91 ; ---------------
92 (add-global-assumption "SubIds"
93 (pf "all r,rhos, n.Cor rhos r -> Sub r (Wrap n (Var map(Seq 0(Lh rhos))))=r"))
94
95
96 ; Subsection: "FrIntro1"
97 ; ======================
98
99 ; Lemma: "FrIntro1"
100 ; -----------------
101 (add-global-assumption "FrIntro1"
102 (pf "all rhos,r,rho.TypJ rhos r rho -> Fr rhos rho r(Lh rhos)"))