├── notes └── lf │ ├── _CoqProject │ ├── Basics.pptx │ ├── Preface.pptx │ ├── LICENSE │ ├── CoqMakefile.conf │ ├── Makefile.conf │ ├── Postscript.v │ ├── Induction.v │ ├── Lists.v │ └── IndPrinciples.v ├── textbook └── lf │ ├── _CoqProject │ ├── .gitignore │ ├── common │ ├── media │ │ ├── image │ │ │ ├── qc_bg.jpg │ │ │ ├── slf-bg.jpg │ │ │ ├── vc-bg.jpg │ │ │ ├── lf_icon.jpg │ │ │ ├── plf_icon.jpg │ │ │ ├── qc_icon.jpg │ │ │ ├── slf-icon.png │ │ │ ├── vc-icon.png │ │ │ ├── vfa_icon.jpg │ │ │ ├── arrow_down.jpg │ │ │ ├── arrow_right.jpg │ │ │ ├── core_mem_bg.jpg │ │ │ ├── sf_logo_lg.png │ │ │ ├── sf_logo_sm.png │ │ │ ├── verified_bg.jpg │ │ │ ├── prog_lang_bg.jpg │ │ │ ├── core_mem_hdr_bg.jpg │ │ │ ├── slf-bg-original.jpg │ │ │ └── logical_foundations_bg.jpg │ │ └── font │ │ │ ├── Open-Sans-300 │ │ │ ├── Open-Sans-300.eot │ │ │ ├── Open-Sans-300.ttf │ │ │ ├── Open-Sans-300.woff │ │ │ ├── Open-Sans-300.woff2 │ │ │ └── LICENSE.txt │ │ │ ├── Open-Sans-600 │ │ │ ├── Open-Sans-600.eot │ │ │ ├── Open-Sans-600.ttf │ │ │ ├── Open-Sans-600.woff │ │ │ └── Open-Sans-600.woff2 │ │ │ ├── Open-Sans-700 │ │ │ ├── Open-Sans-700.eot │ │ │ ├── Open-Sans-700.ttf │ │ │ ├── Open-Sans-700.woff │ │ │ └── Open-Sans-700.woff2 │ │ │ ├── Open-Sans-800 │ │ │ ├── Open-Sans-800.eot │ │ │ ├── Open-Sans-800.ttf │ │ │ ├── Open-Sans-800.woff │ │ │ └── Open-Sans-800.woff2 │ │ │ ├── Open-Sans-italic │ │ │ ├── Open-Sans-italic.eot │ │ │ ├── Open-Sans-italic.ttf │ │ │ ├── Open-Sans-italic.woff │ │ │ └── Open-Sans-italic.woff2 │ │ │ ├── Open-Sans-regular │ │ │ ├── Open-Sans-regular.eot │ │ │ ├── Open-Sans-regular.ttf │ │ │ ├── Open-Sans-regular.woff │ │ │ └── Open-Sans-regular.woff2 │ │ │ ├── Open-Sans-300italic │ │ │ ├── Open-Sans-300italic.eot │ │ │ ├── Open-Sans-300italic.ttf │ │ │ ├── Open-Sans-300italic.woff │ │ │ └── Open-Sans-300italic.woff2 │ │ │ ├── Open-Sans-600italic │ │ │ ├── Open-Sans-600italic.eot │ │ │ ├── Open-Sans-600italic.ttf │ │ │ ├── Open-Sans-600italic.woff │ │ │ └── Open-Sans-600italic.woff2 │ │ │ ├── Open-Sans-700italic │ │ │ ├── Open-Sans-700italic.eot │ │ │ ├── Open-Sans-700italic.ttf │ │ │ ├── Open-Sans-700italic.woff │ │ │ └── Open-Sans-700italic.woff2 │ │ │ └── Open-Sans-800italic │ │ │ ├── Open-Sans-800italic.eot │ │ │ ├── Open-Sans-800italic.ttf │ │ │ ├── Open-Sans-800italic.woff │ │ │ └── Open-Sans-800italic.woff2 │ ├── jquery-ui │ │ ├── images │ │ │ ├── ui-icons_444444_256x240.png │ │ │ ├── ui-icons_555555_256x240.png │ │ │ ├── ui-icons_777620_256x240.png │ │ │ ├── ui-icons_777777_256x240.png │ │ │ ├── ui-icons_cc0000_256x240.png │ │ │ └── ui-icons_ffffff_256x240.png │ │ ├── LICENSE.txt │ │ └── package.json │ ├── toggleproofs.js │ ├── css │ │ ├── vfa.css │ │ ├── lf.css │ │ ├── plf.css │ │ ├── qc.css │ │ ├── vc.css │ │ ├── slides.css │ │ ├── slf.css │ │ └── jscoq.css │ ├── jscoq.js │ └── slides.js │ ├── README │ ├── Makefile │ ├── LICENSE │ ├── impdriver.ml │ ├── Bib.v │ ├── deps.html │ ├── BibTest.v │ ├── RelTest.v │ ├── AutoTest.v │ ├── PrefaceTest.v │ ├── ExtractionTest.v │ ├── ImpParserTest.v │ ├── PostscriptTest.v │ ├── index.html │ ├── MapsTest.v │ ├── ImpCEvalFunTest.v │ ├── IndPrinciplesTest.v │ ├── Postscript.v │ ├── Bib.html │ ├── Extraction.v │ ├── Postscript.html │ ├── InductionTest.v │ ├── TacticsTest.v │ ├── AltAutoTest.v │ ├── BasicsTest.v │ ├── IndPropTest.v │ ├── ImpTest.v │ └── ProofObjectsTest.v ├── LICENSE ├── .gitignore ├── README.md └── install.md /notes/lf/_CoqProject: -------------------------------------------------------------------------------- 1 | -Q . LF 2 | -------------------------------------------------------------------------------- /textbook/lf/_CoqProject: -------------------------------------------------------------------------------- 1 | -Q . LF 2 | -------------------------------------------------------------------------------- /textbook/lf/.gitignore: -------------------------------------------------------------------------------- 1 | imp.ml 2 | imp.mli 3 | imp1.ml 4 | imp1.mli 5 | imp2.ml 6 | imp2.mli -------------------------------------------------------------------------------- /notes/lf/Basics.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/notes/lf/Basics.pptx -------------------------------------------------------------------------------- /notes/lf/Preface.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/notes/lf/Preface.pptx -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2022 by Michael Clarkson. 2 | 3 | Subdirectories may have their own LICENSE that overrides this file. 4 | -------------------------------------------------------------------------------- /textbook/lf/common/media/image/qc_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/image/qc_bg.jpg -------------------------------------------------------------------------------- /textbook/lf/common/media/image/slf-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/image/slf-bg.jpg -------------------------------------------------------------------------------- /textbook/lf/common/media/image/vc-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/image/vc-bg.jpg -------------------------------------------------------------------------------- /textbook/lf/common/media/image/lf_icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/image/lf_icon.jpg -------------------------------------------------------------------------------- /textbook/lf/common/media/image/plf_icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/image/plf_icon.jpg -------------------------------------------------------------------------------- /textbook/lf/common/media/image/qc_icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/image/qc_icon.jpg -------------------------------------------------------------------------------- /textbook/lf/common/media/image/slf-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/image/slf-icon.png -------------------------------------------------------------------------------- /textbook/lf/common/media/image/vc-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/image/vc-icon.png -------------------------------------------------------------------------------- /textbook/lf/common/media/image/vfa_icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/image/vfa_icon.jpg -------------------------------------------------------------------------------- /textbook/lf/common/media/image/arrow_down.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/image/arrow_down.jpg -------------------------------------------------------------------------------- /textbook/lf/common/media/image/arrow_right.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/image/arrow_right.jpg -------------------------------------------------------------------------------- /textbook/lf/common/media/image/core_mem_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/image/core_mem_bg.jpg -------------------------------------------------------------------------------- /textbook/lf/common/media/image/sf_logo_lg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/image/sf_logo_lg.png -------------------------------------------------------------------------------- /textbook/lf/common/media/image/sf_logo_sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/image/sf_logo_sm.png -------------------------------------------------------------------------------- /textbook/lf/common/media/image/verified_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/image/verified_bg.jpg -------------------------------------------------------------------------------- /textbook/lf/common/media/image/prog_lang_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/image/prog_lang_bg.jpg -------------------------------------------------------------------------------- /textbook/lf/common/media/image/core_mem_hdr_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/image/core_mem_hdr_bg.jpg -------------------------------------------------------------------------------- /textbook/lf/common/media/image/slf-bg-original.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/image/slf-bg-original.jpg -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.vo 2 | *.vok 3 | *.vos 4 | *.glob 5 | *.aux 6 | *.coq.d 7 | *.lia.cache 8 | 9 | .Makefile.d 10 | 11 | .DS_Store 12 | *~ 13 | ~\$* 14 | \#*\# -------------------------------------------------------------------------------- /textbook/lf/common/media/image/logical_foundations_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/image/logical_foundations_bg.jpg -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-300/Open-Sans-300.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-300/Open-Sans-300.eot -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-300/Open-Sans-300.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-300/Open-Sans-300.ttf -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-600/Open-Sans-600.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-600/Open-Sans-600.eot -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-600/Open-Sans-600.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-600/Open-Sans-600.ttf -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-700/Open-Sans-700.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-700/Open-Sans-700.eot -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-700/Open-Sans-700.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-700/Open-Sans-700.ttf -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-800/Open-Sans-800.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-800/Open-Sans-800.eot -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-800/Open-Sans-800.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-800/Open-Sans-800.ttf -------------------------------------------------------------------------------- /textbook/lf/common/jquery-ui/images/ui-icons_444444_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/jquery-ui/images/ui-icons_444444_256x240.png -------------------------------------------------------------------------------- /textbook/lf/common/jquery-ui/images/ui-icons_555555_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/jquery-ui/images/ui-icons_555555_256x240.png -------------------------------------------------------------------------------- /textbook/lf/common/jquery-ui/images/ui-icons_777620_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/jquery-ui/images/ui-icons_777620_256x240.png -------------------------------------------------------------------------------- /textbook/lf/common/jquery-ui/images/ui-icons_777777_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/jquery-ui/images/ui-icons_777777_256x240.png -------------------------------------------------------------------------------- /textbook/lf/common/jquery-ui/images/ui-icons_cc0000_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/jquery-ui/images/ui-icons_cc0000_256x240.png -------------------------------------------------------------------------------- /textbook/lf/common/jquery-ui/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/jquery-ui/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-300/Open-Sans-300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-300/Open-Sans-300.woff -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-300/Open-Sans-300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-300/Open-Sans-300.woff2 -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-600/Open-Sans-600.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-600/Open-Sans-600.woff -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-600/Open-Sans-600.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-600/Open-Sans-600.woff2 -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-700/Open-Sans-700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-700/Open-Sans-700.woff -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-700/Open-Sans-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-700/Open-Sans-700.woff2 -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-800/Open-Sans-800.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-800/Open-Sans-800.woff -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-800/Open-Sans-800.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-800/Open-Sans-800.woff2 -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-italic/Open-Sans-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-italic/Open-Sans-italic.eot -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-italic/Open-Sans-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-italic/Open-Sans-italic.ttf -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-italic/Open-Sans-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-italic/Open-Sans-italic.woff -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-italic/Open-Sans-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-italic/Open-Sans-italic.woff2 -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-regular/Open-Sans-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-regular/Open-Sans-regular.eot -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-regular/Open-Sans-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-regular/Open-Sans-regular.ttf -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-regular/Open-Sans-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-regular/Open-Sans-regular.woff -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-regular/Open-Sans-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-regular/Open-Sans-regular.woff2 -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-300italic/Open-Sans-300italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-300italic/Open-Sans-300italic.eot -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-300italic/Open-Sans-300italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-300italic/Open-Sans-300italic.ttf -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-600italic/Open-Sans-600italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-600italic/Open-Sans-600italic.eot -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-600italic/Open-Sans-600italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-600italic/Open-Sans-600italic.ttf -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-700italic/Open-Sans-700italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-700italic/Open-Sans-700italic.eot -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-700italic/Open-Sans-700italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-700italic/Open-Sans-700italic.ttf -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-800italic/Open-Sans-800italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-800italic/Open-Sans-800italic.eot -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-800italic/Open-Sans-800italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-800italic/Open-Sans-800italic.ttf -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-300italic/Open-Sans-300italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-300italic/Open-Sans-300italic.woff -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-300italic/Open-Sans-300italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-300italic/Open-Sans-300italic.woff2 -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-600italic/Open-Sans-600italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-600italic/Open-Sans-600italic.woff -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-600italic/Open-Sans-600italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-600italic/Open-Sans-600italic.woff2 -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-700italic/Open-Sans-700italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-700italic/Open-Sans-700italic.woff -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-700italic/Open-Sans-700italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-700italic/Open-Sans-700italic.woff2 -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-800italic/Open-Sans-800italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-800italic/Open-Sans-800italic.woff -------------------------------------------------------------------------------- /textbook/lf/common/media/font/Open-Sans-800italic/Open-Sans-800italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/clarksmr/sf-lectures/HEAD/textbook/lf/common/media/font/Open-Sans-800italic/Open-Sans-800italic.woff2 -------------------------------------------------------------------------------- /textbook/lf/common/toggleproofs.js: -------------------------------------------------------------------------------- 1 | function toggleDisplay(id) 2 | { 3 | $(document.getElementById(id)).toggleClass('hidden'); 4 | } 5 | 6 | function hideAll(cls) 7 | { 8 | $('div.' + cls).addClass('hidden'); 9 | } 10 | 11 | $(document).ready(function () { 12 | hideAll('proofscript'); 13 | }); 14 | 15 | -------------------------------------------------------------------------------- /textbook/lf/common/css/vfa.css: -------------------------------------------------------------------------------- 1 | /* Styles for SF: V3: Verified Algorithms */ 2 | 3 | /* Background */ 4 | body { background-image: url('../media/image/verified_bg.jpg'); } 5 | #header { background-color: rgba(75, 95, 77, 0.53); 6 | } 7 | /* This volume's color */ 8 | .section, ul#menu li.section_name, div.button { background-color: #c2c26c; } 9 | 10 | -------------------------------------------------------------------------------- /textbook/lf/common/css/lf.css: -------------------------------------------------------------------------------- 1 | /* Styles for SF: V1: Logical Foundations */ 2 | 3 | /* Background */ 4 | body { background-image: url('../media/image/logical_foundations_bg.jpg'); } 5 | 6 | #header { background-color: rgba(75, 82, 95, 0.53); } 7 | 8 | /* This volume's color */ 9 | .section, ul#menu li.section_name, div.button, td.logical_tab, .ui-state-active { background-color: #91a1d1; } 10 | 11 | -------------------------------------------------------------------------------- /textbook/lf/common/css/plf.css: -------------------------------------------------------------------------------- 1 | /* Styles for SF: V2: Programming Language Foundations */ 2 | 3 | /* Background */ 4 | body { background-image: url('../media/image/prog_lang_bg.jpg'); } 5 | 6 | #header { background-color: rgba(75, 82, 95, 0.53); 7 | } 8 | 9 | /* This volume's color */ 10 | .section, ul#menu li.section_name, div.button, td.logical_tab, .ui-state-active { background-color: #b25959; } 11 | 12 | -------------------------------------------------------------------------------- /textbook/lf/common/css/qc.css: -------------------------------------------------------------------------------- 1 | /* Styles for SF: V4: QuickChick */ 2 | 3 | /* Background */ 4 | body { background-image: url('../media/image/qc_bg.jpg'); } 5 | #header { background-color: rgba(190, 170, 190, 0.5); } 6 | 7 | /* This volume's color */ 8 | .section, ul#menu li.section_name, div.button { background-color: #8b7d95; } 9 | 10 | .slide img { 11 | border: 2px solid gray; 12 | margin: 1em; 13 | } 14 | -------------------------------------------------------------------------------- /textbook/lf/common/css/vc.css: -------------------------------------------------------------------------------- 1 | /* Styles for SF: V5: Verifiable C */ 2 | 3 | /* Background */ 4 | body { background-image: url('../media/image/vc-bg.jpg'); } 5 | /* #header { background-color: rgb(89, 48, 53); */ 6 | #header { background-color: rgb(166, 89, 101); 7 | } 8 | 9 | /* This volume's color */ 10 | /* .section, ul#menu li.section_name, div.button { background-color: rgb(89,48,53); } */ 11 | .section, ul#menu li.section_name, div.button { background-color: rgb(159, 125, 140); 12 | 13 | h2.section { 14 | color: rgb(112,50,80); 15 | } 16 | 17 | h2.section { 18 | color: rgb(102,40,70); 19 | } 20 | -------------------------------------------------------------------------------- /textbook/lf/common/css/slides.css: -------------------------------------------------------------------------------- 1 | #main, #main_home { 2 | padding: 100px; 3 | padding-top: 10px; 4 | margin: 0 0; 5 | max-width: 1000px; 6 | } 7 | 8 | #main h1 { 9 | line-height: 80%; 10 | /* Demitri: font-size: 22pt; */ 11 | font-size: 150%; /* BCP */ 12 | } 13 | 14 | h1.libtitle { 15 | font-size: 300% !important; 16 | margin: 0; 17 | margin-top: 20px; 18 | margin-bottom: 30px; 19 | } 20 | 21 | /* 22 | .subtitle { 23 | font-size: 170%; 24 | line-height: 100%; 25 | }*/ 26 | 27 | #main .doc { 28 | font-size: 22px; 29 | line-height: 34px; 30 | } 31 | 32 | .code { 33 | font-size: 22px; 34 | line-height: 34px; 35 | } 36 | 37 | body { 38 | background: white; 39 | } 40 | 41 | -------------------------------------------------------------------------------- /textbook/lf/README: -------------------------------------------------------------------------------- 1 | ######################################################################### 2 | SOFTWARE FOUNDATIONS 3 | ######################################################################### 4 | 5 | This directory contains both Coq scripts (.v files) and more readable 6 | HTML files for Volume 1 of the Software Foundations electronic 7 | textbook series. 8 | 9 | - Preface.v or Preface.html 10 | The place to start reading, including details on how to install 11 | required software 12 | 13 | - index.html 14 | The book's cover page and navigation starting point 15 | 16 | - deps.html 17 | Overview of the ordering of chapters 18 | 19 | - LICENSE 20 | Explanation of how these files may be redistributed -------------------------------------------------------------------------------- /textbook/lf/Makefile: -------------------------------------------------------------------------------- 1 | COQMFFLAGS := -Q . LF 2 | 3 | ALLVFILES := Preface.v Basics.v Induction.v Lists.v Poly.v Tactics.v Logic.v IndProp.v Maps.v ProofObjects.v IndPrinciples.v Rel.v Imp.v ImpParser.v ImpCEvalFun.v Extraction.v Auto.v AltAuto.v Postscript.v Bib.v PrefaceTest.v BasicsTest.v InductionTest.v ListsTest.v PolyTest.v TacticsTest.v LogicTest.v IndPropTest.v MapsTest.v ProofObjectsTest.v IndPrinciplesTest.v RelTest.v ImpTest.v ImpParserTest.v ImpCEvalFunTest.v ExtractionTest.v AutoTest.v AltAutoTest.v PostscriptTest.v BibTest.v 4 | 5 | build: Makefile.coq 6 | $(MAKE) -f Makefile.coq 7 | 8 | clean:: 9 | if [ -e Makefile.coq ]; then $(MAKE) -f Makefile.coq cleanall; fi 10 | $(RM) $(wildcard Makefile.coq Makefile.coq.conf) imp.ml imp.mli imp1.ml imp1.mli imp2.ml imp2.mli 11 | 12 | Makefile.coq: 13 | coq_makefile $(COQMFFLAGS) -o Makefile.coq $(ALLVFILES) 14 | 15 | -include Makefile.coq 16 | 17 | .PHONY: build clean 18 | -------------------------------------------------------------------------------- /notes/lf/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2022 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /textbook/lf/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2022 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /textbook/lf/impdriver.ml: -------------------------------------------------------------------------------- 1 | open Imp 2 | 3 | let explode s = 4 | let rec exp i l = 5 | if i < 0 then l else exp (i - 1) (s.[i] :: l) in 6 | exp (String.length s - 1) [];; 7 | 8 | let test s = 9 | print_newline(); 10 | print_endline ("Propgram: " ^ s); 11 | let parse_res = parse (explode s) in 12 | (match parse_res with 13 | NoneE _ -> print_endline ("Syntax error"); 14 | | SomeE c -> 15 | let fuel = 1000 in 16 | match (ceval_step empty_st c fuel) with 17 | None -> 18 | print_endline 19 | ("Still running after " ^ string_of_int fuel ^ " steps") 20 | | Some res -> 21 | print_endline ( 22 | "Result: [" 23 | ^ string_of_int (res ['w']) ^ " " 24 | ^ string_of_int (res ['x']) ^ " " 25 | ^ string_of_int (res ['y']) ^ " " 26 | ^ string_of_int (res ['z']) ^ " ...]")) 27 | ;; 28 | 29 | test "x:=1 ; y:=2";; 30 | 31 | test "true";; (* syntax error *) 32 | test "skip";; 33 | test "skip;skip";; 34 | test "while true do skip end";; 35 | test "x:=3";; 36 | test "x:=3; while 0<=x do skip end";; 37 | test "x:=3; while 1<=x do y:=y+1; x:=x-1 end";; 38 | -------------------------------------------------------------------------------- /textbook/lf/Bib.v: -------------------------------------------------------------------------------- 1 | (** * Bib: Bibliography *) 2 | 3 | (* ################################################################# *) 4 | (** * Resources cited in this volume *) 5 | 6 | (** 7 | 8 | [Bertot 2004] Interactive Theorem Proving and Program Development: 9 | Coq'Art: The Calculus of Inductive Constructions, by Yves Bertot and 10 | Pierre Casteran. Springer-Verlag, 2004. 11 | {https://tinyurl.com/z3o7nqu} 12 | 13 | [Chlipala 2013] Certified Programming with Dependent Types, by 14 | Adam Chlipala. MIT Press. 2013. {https://tinyurl.com/zqdnyg2} 15 | 16 | [Lipovaca 2011] Learn You a Haskell for Great Good! A Beginner's 17 | Guide, by Miran Lipovaca, No Starch Press, April 2011. 18 | {http://learnyouahaskell.com} 19 | 20 | [O'Sullivan 2008] Bryan O'Sullivan, John Goerzen, and Don Stewart: 21 | Real world Haskell - code you can believe in. O'Reilly 22 | 2008. {http://book.realworldhaskell.org} 23 | 24 | [Pugh 1991] Pugh, William. "The Omega test: a fast and practical 25 | integer programming algorithm for dependence analysis." Proceedings 26 | of the 1991 ACM/IEEE conference on Supercomputing. ACM, 1991. 27 | {https://dl.acm.org/citation.cfm?id=125848} 28 | 29 | [Wadler 2015] Philip Wadler. "Propositions as types." 30 | Communications of the ACM 58, no. 12 (2015): 75-84. 31 | {https://dl.acm.org/citation.cfm?id=2699407} 32 | 33 | *) 34 | 35 | (* 2022-06-16 11:18 *) 36 | -------------------------------------------------------------------------------- /textbook/lf/common/css/slf.css: -------------------------------------------------------------------------------- 1 | /* Styles for SF: V6: Separation Logic Foundations */ 2 | 3 | /* Background */ 4 | body { background-image: url('../media/image/slf-bg.jpg'); } 5 | 6 | #header { background-color: rgba(75, 95, 77, 0.53); } 7 | 8 | /* This volume's color */ 9 | .section, ul#menu li.section_name, div.button, td.logical_tab, .ui-state-active { 10 | background-color: #dbb27f; 11 | } 12 | 13 | /* EXPERIMENTAL change style of h2 sections */ 14 | 15 | /* 16 | h2.section, h3.section { 17 | color: #6e4d25; 18 | } 19 | */ 20 | h3.section { 21 | color: #6e4d25; 22 | } 23 | 24 | h2.section { 25 | color: #ffffff; 26 | background-color: #dbb27f; 27 | padding: 3px 8px 4px 8px; 28 | } 29 | 30 | /* BCP, May 2021 -- swap h1 and h2 colors */ 31 | h1.section { 32 | background-color: #C7883D; 33 | } 34 | 35 | 36 | /* Quoted pieces of OCaml code */ 37 | 38 | .inlinecode-ocaml { 39 | display: block; 40 | font-family: monospace; 41 | font-weight: bold; 42 | background-color: rgba(230,204,173,.3); 43 | padding: 3px; 44 | margin-top: 5px; 45 | margin-bottom: 8px; 46 | font-size: 100%; 47 | border: 1px dotted gray; } 48 | 49 | .inlinecode-ocaml keyword { 50 | color: #697f2f; 51 | } 52 | 53 | /* Make comments in proof less ugly by using green */ 54 | 55 | .comment { 56 | color: rgb(30%,50%,30%); 57 | } 58 | 59 | .gray-font { 60 | color: #CCCCCC; 61 | } 62 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Lectures on Software Foundations 2 | 3 | **By [Michael Clarkson][mrc].** 4 | 5 | 6 | 7 | This repo contains materials to accompany a series of [YouTube videos][yt] on 8 | the textbook [*Software Foundations*][sf], volume 1. The videos grew out CS 4160 9 | Formal Verification, a course taught at Cornell University by Michael Clarkson. 10 | The textbook is a project led by Benjamin C. Pierce at the University of 11 | Pennsylvania. Clarkson is a contributing author. 12 | 13 | - Some [Coq installation advice][install] is available. 14 | 15 | - The [notes][notes] directory contains the Coq source files used in the 16 | lecture videos. You can follow along with them yourself while watching. 17 | 18 | - An [HTML version of the textbook][lf-html] is available. After watching 19 | the lectures on a chapter, you can read the full chapter. 20 | 21 | - The [textbook][textbook] directory contains the Coq source files for the 22 | full textbook chapters. You can download them to complete the textbook 23 | exercises yourself. 24 | 25 | [install]: https://clarksmr.github.io/sf-lectures/install.html 26 | [notes]: https://github.com/clarksmr/sf-lectures/tree/main/notes/lf 27 | [textbook]: https://github.com/clarksmr/sf-lectures/tree/main/textbook/lf 28 | [mrc]: https://www.cs.cornell.edu/~clarkson/ 29 | [yt]: https://www.youtube.com/playlist?list=PLre5AT9JnKShFK9l9HYzkZugkJSsXioFs 30 | [sf]: https://softwarefoundations.cis.upenn.edu/ 31 | [lf-html]: https://clarksmr.github.io/sf-lectures/textbook/lf/toc.html 32 | -------------------------------------------------------------------------------- /textbook/lf/deps.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | Chapter Dependencies 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 29 | 30 |
31 | 32 |

Chapter Dependencies

33 | 34 | 35 | 36 | 37 |
38 |
39 | -------------------------------------------------------------------------------- /textbook/lf/common/jquery-ui/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright jQuery Foundation and other contributors, https://jquery.org/ 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | available at https://github.com/jquery/jquery-ui 6 | 7 | The following license applies to all parts of this software except as 8 | documented below: 9 | 10 | ==== 11 | 12 | Permission is hereby granted, free of charge, to any person obtaining 13 | a copy of this software and associated documentation files (the 14 | "Software"), to deal in the Software without restriction, including 15 | without limitation the rights to use, copy, modify, merge, publish, 16 | distribute, sublicense, and/or sell copies of the Software, and to 17 | permit persons to whom the Software is furnished to do so, subject to 18 | the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be 21 | included in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | 31 | ==== 32 | 33 | Copyright and related rights for sample code are waived via CC0. Sample 34 | code is defined as all source code contained within the demos directory. 35 | 36 | CC0: http://creativecommons.org/publicdomain/zero/1.0/ 37 | 38 | ==== 39 | 40 | All files located in the node_modules and external directories are 41 | externally maintained libraries used by this software which have their 42 | own licenses; we recommend you read them, as their terms may differ from 43 | the terms above. 44 | -------------------------------------------------------------------------------- /textbook/lf/BibTest.v: -------------------------------------------------------------------------------- 1 | Set Warnings "-notation-overridden,-parsing". 2 | From Coq Require Export String. 3 | From LF Require Import Bib. 4 | 5 | Parameter MISSING: Type. 6 | 7 | Module Check. 8 | 9 | Ltac check_type A B := 10 | match type of A with 11 | | context[MISSING] => idtac "Missing:" A 12 | | ?T => first [unify T B; idtac "Type: ok" | idtac "Type: wrong - should be (" B ")"] 13 | end. 14 | 15 | Ltac print_manual_grade A := 16 | match eval compute in A with 17 | | Some (_ ?S ?C) => 18 | idtac "Score:" S; 19 | match eval compute in C with 20 | | ""%string => idtac "Comment: None" 21 | | _ => idtac "Comment:" C 22 | end 23 | | None => 24 | idtac "Score: Ungraded"; 25 | idtac "Comment: None" 26 | end. 27 | 28 | End Check. 29 | 30 | From LF Require Import Bib. 31 | Import Check. 32 | 33 | Goal True. 34 | 35 | idtac " ". 36 | 37 | idtac "Max points - standard: 0". 38 | idtac "Max points - advanced: 0". 39 | idtac "". 40 | idtac "Allowed Axioms:". 41 | idtac "functional_extensionality". 42 | idtac "FunctionalExtensionality.functional_extensionality_dep". 43 | idtac "plus_le". 44 | idtac "le_trans". 45 | idtac "le_plus_l". 46 | idtac "add_le_cases". 47 | idtac "Sn_le_Sm__n_le_m". 48 | idtac "O_le_n". 49 | idtac "". 50 | idtac "". 51 | idtac "********** Summary **********". 52 | idtac "". 53 | idtac "Below is a summary of the automatically graded exercises that are incomplete.". 54 | idtac "". 55 | idtac "The output for each exercise can be any of the following:". 56 | idtac " - 'Closed under the global context', if it is complete". 57 | idtac " - 'MANUAL', if it is manually graded". 58 | idtac " - A list of pending axioms, containing unproven assumptions. In this case". 59 | idtac " the exercise is considered complete, if the axioms are all allowed.". 60 | idtac "". 61 | idtac "********** Standard **********". 62 | idtac "". 63 | idtac "********** Advanced **********". 64 | Abort. 65 | 66 | (* 2022-06-16 11:18 *) 67 | 68 | (* 2022-06-16 11:18 *) 69 | -------------------------------------------------------------------------------- /textbook/lf/RelTest.v: -------------------------------------------------------------------------------- 1 | Set Warnings "-notation-overridden,-parsing". 2 | From Coq Require Export String. 3 | From LF Require Import Rel. 4 | 5 | Parameter MISSING: Type. 6 | 7 | Module Check. 8 | 9 | Ltac check_type A B := 10 | match type of A with 11 | | context[MISSING] => idtac "Missing:" A 12 | | ?T => first [unify T B; idtac "Type: ok" | idtac "Type: wrong - should be (" B ")"] 13 | end. 14 | 15 | Ltac print_manual_grade A := 16 | match eval compute in A with 17 | | Some (_ ?S ?C) => 18 | idtac "Score:" S; 19 | match eval compute in C with 20 | | ""%string => idtac "Comment: None" 21 | | _ => idtac "Comment:" C 22 | end 23 | | None => 24 | idtac "Score: Ungraded"; 25 | idtac "Comment: None" 26 | end. 27 | 28 | End Check. 29 | 30 | From LF Require Import Rel. 31 | Import Check. 32 | 33 | Goal True. 34 | 35 | idtac " ". 36 | 37 | idtac "Max points - standard: 0". 38 | idtac "Max points - advanced: 0". 39 | idtac "". 40 | idtac "Allowed Axioms:". 41 | idtac "functional_extensionality". 42 | idtac "FunctionalExtensionality.functional_extensionality_dep". 43 | idtac "plus_le". 44 | idtac "le_trans". 45 | idtac "le_plus_l". 46 | idtac "add_le_cases". 47 | idtac "Sn_le_Sm__n_le_m". 48 | idtac "O_le_n". 49 | idtac "". 50 | idtac "". 51 | idtac "********** Summary **********". 52 | idtac "". 53 | idtac "Below is a summary of the automatically graded exercises that are incomplete.". 54 | idtac "". 55 | idtac "The output for each exercise can be any of the following:". 56 | idtac " - 'Closed under the global context', if it is complete". 57 | idtac " - 'MANUAL', if it is manually graded". 58 | idtac " - A list of pending axioms, containing unproven assumptions. In this case". 59 | idtac " the exercise is considered complete, if the axioms are all allowed.". 60 | idtac "". 61 | idtac "********** Standard **********". 62 | idtac "". 63 | idtac "********** Advanced **********". 64 | Abort. 65 | 66 | (* 2022-06-16 11:18 *) 67 | 68 | (* 2022-06-16 11:18 *) 69 | -------------------------------------------------------------------------------- /textbook/lf/AutoTest.v: -------------------------------------------------------------------------------- 1 | Set Warnings "-notation-overridden,-parsing". 2 | From Coq Require Export String. 3 | From LF Require Import Auto. 4 | 5 | Parameter MISSING: Type. 6 | 7 | Module Check. 8 | 9 | Ltac check_type A B := 10 | match type of A with 11 | | context[MISSING] => idtac "Missing:" A 12 | | ?T => first [unify T B; idtac "Type: ok" | idtac "Type: wrong - should be (" B ")"] 13 | end. 14 | 15 | Ltac print_manual_grade A := 16 | match eval compute in A with 17 | | Some (_ ?S ?C) => 18 | idtac "Score:" S; 19 | match eval compute in C with 20 | | ""%string => idtac "Comment: None" 21 | | _ => idtac "Comment:" C 22 | end 23 | | None => 24 | idtac "Score: Ungraded"; 25 | idtac "Comment: None" 26 | end. 27 | 28 | End Check. 29 | 30 | From LF Require Import Auto. 31 | Import Check. 32 | 33 | Goal True. 34 | 35 | idtac " ". 36 | 37 | idtac "Max points - standard: 0". 38 | idtac "Max points - advanced: 0". 39 | idtac "". 40 | idtac "Allowed Axioms:". 41 | idtac "functional_extensionality". 42 | idtac "FunctionalExtensionality.functional_extensionality_dep". 43 | idtac "plus_le". 44 | idtac "le_trans". 45 | idtac "le_plus_l". 46 | idtac "add_le_cases". 47 | idtac "Sn_le_Sm__n_le_m". 48 | idtac "O_le_n". 49 | idtac "". 50 | idtac "". 51 | idtac "********** Summary **********". 52 | idtac "". 53 | idtac "Below is a summary of the automatically graded exercises that are incomplete.". 54 | idtac "". 55 | idtac "The output for each exercise can be any of the following:". 56 | idtac " - 'Closed under the global context', if it is complete". 57 | idtac " - 'MANUAL', if it is manually graded". 58 | idtac " - A list of pending axioms, containing unproven assumptions. In this case". 59 | idtac " the exercise is considered complete, if the axioms are all allowed.". 60 | idtac "". 61 | idtac "********** Standard **********". 62 | idtac "". 63 | idtac "********** Advanced **********". 64 | Abort. 65 | 66 | (* 2022-06-16 11:18 *) 67 | 68 | (* 2022-06-16 11:18 *) 69 | -------------------------------------------------------------------------------- /textbook/lf/PrefaceTest.v: -------------------------------------------------------------------------------- 1 | Set Warnings "-notation-overridden,-parsing". 2 | From Coq Require Export String. 3 | From LF Require Import Preface. 4 | 5 | Parameter MISSING: Type. 6 | 7 | Module Check. 8 | 9 | Ltac check_type A B := 10 | match type of A with 11 | | context[MISSING] => idtac "Missing:" A 12 | | ?T => first [unify T B; idtac "Type: ok" | idtac "Type: wrong - should be (" B ")"] 13 | end. 14 | 15 | Ltac print_manual_grade A := 16 | match eval compute in A with 17 | | Some (_ ?S ?C) => 18 | idtac "Score:" S; 19 | match eval compute in C with 20 | | ""%string => idtac "Comment: None" 21 | | _ => idtac "Comment:" C 22 | end 23 | | None => 24 | idtac "Score: Ungraded"; 25 | idtac "Comment: None" 26 | end. 27 | 28 | End Check. 29 | 30 | From LF Require Import Preface. 31 | Import Check. 32 | 33 | Goal True. 34 | 35 | idtac " ". 36 | 37 | idtac "Max points - standard: 0". 38 | idtac "Max points - advanced: 0". 39 | idtac "". 40 | idtac "Allowed Axioms:". 41 | idtac "functional_extensionality". 42 | idtac "FunctionalExtensionality.functional_extensionality_dep". 43 | idtac "plus_le". 44 | idtac "le_trans". 45 | idtac "le_plus_l". 46 | idtac "add_le_cases". 47 | idtac "Sn_le_Sm__n_le_m". 48 | idtac "O_le_n". 49 | idtac "". 50 | idtac "". 51 | idtac "********** Summary **********". 52 | idtac "". 53 | idtac "Below is a summary of the automatically graded exercises that are incomplete.". 54 | idtac "". 55 | idtac "The output for each exercise can be any of the following:". 56 | idtac " - 'Closed under the global context', if it is complete". 57 | idtac " - 'MANUAL', if it is manually graded". 58 | idtac " - A list of pending axioms, containing unproven assumptions. In this case". 59 | idtac " the exercise is considered complete, if the axioms are all allowed.". 60 | idtac "". 61 | idtac "********** Standard **********". 62 | idtac "". 63 | idtac "********** Advanced **********". 64 | Abort. 65 | 66 | (* 2022-06-16 11:18 *) 67 | 68 | (* 2022-06-16 11:18 *) 69 | -------------------------------------------------------------------------------- /textbook/lf/ExtractionTest.v: -------------------------------------------------------------------------------- 1 | Set Warnings "-notation-overridden,-parsing". 2 | From Coq Require Export String. 3 | From LF Require Import Extraction. 4 | 5 | Parameter MISSING: Type. 6 | 7 | Module Check. 8 | 9 | Ltac check_type A B := 10 | match type of A with 11 | | context[MISSING] => idtac "Missing:" A 12 | | ?T => first [unify T B; idtac "Type: ok" | idtac "Type: wrong - should be (" B ")"] 13 | end. 14 | 15 | Ltac print_manual_grade A := 16 | match eval compute in A with 17 | | Some (_ ?S ?C) => 18 | idtac "Score:" S; 19 | match eval compute in C with 20 | | ""%string => idtac "Comment: None" 21 | | _ => idtac "Comment:" C 22 | end 23 | | None => 24 | idtac "Score: Ungraded"; 25 | idtac "Comment: None" 26 | end. 27 | 28 | End Check. 29 | 30 | From LF Require Import Extraction. 31 | Import Check. 32 | 33 | Goal True. 34 | 35 | idtac " ". 36 | 37 | idtac "Max points - standard: 0". 38 | idtac "Max points - advanced: 0". 39 | idtac "". 40 | idtac "Allowed Axioms:". 41 | idtac "functional_extensionality". 42 | idtac "FunctionalExtensionality.functional_extensionality_dep". 43 | idtac "plus_le". 44 | idtac "le_trans". 45 | idtac "le_plus_l". 46 | idtac "add_le_cases". 47 | idtac "Sn_le_Sm__n_le_m". 48 | idtac "O_le_n". 49 | idtac "". 50 | idtac "". 51 | idtac "********** Summary **********". 52 | idtac "". 53 | idtac "Below is a summary of the automatically graded exercises that are incomplete.". 54 | idtac "". 55 | idtac "The output for each exercise can be any of the following:". 56 | idtac " - 'Closed under the global context', if it is complete". 57 | idtac " - 'MANUAL', if it is manually graded". 58 | idtac " - A list of pending axioms, containing unproven assumptions. In this case". 59 | idtac " the exercise is considered complete, if the axioms are all allowed.". 60 | idtac "". 61 | idtac "********** Standard **********". 62 | idtac "". 63 | idtac "********** Advanced **********". 64 | Abort. 65 | 66 | (* 2022-06-16 11:18 *) 67 | 68 | (* 2022-06-16 11:18 *) 69 | -------------------------------------------------------------------------------- /textbook/lf/ImpParserTest.v: -------------------------------------------------------------------------------- 1 | Set Warnings "-notation-overridden,-parsing". 2 | From Coq Require Export String. 3 | From LF Require Import ImpParser. 4 | 5 | Parameter MISSING: Type. 6 | 7 | Module Check. 8 | 9 | Ltac check_type A B := 10 | match type of A with 11 | | context[MISSING] => idtac "Missing:" A 12 | | ?T => first [unify T B; idtac "Type: ok" | idtac "Type: wrong - should be (" B ")"] 13 | end. 14 | 15 | Ltac print_manual_grade A := 16 | match eval compute in A with 17 | | Some (_ ?S ?C) => 18 | idtac "Score:" S; 19 | match eval compute in C with 20 | | ""%string => idtac "Comment: None" 21 | | _ => idtac "Comment:" C 22 | end 23 | | None => 24 | idtac "Score: Ungraded"; 25 | idtac "Comment: None" 26 | end. 27 | 28 | End Check. 29 | 30 | From LF Require Import ImpParser. 31 | Import Check. 32 | 33 | Goal True. 34 | 35 | idtac " ". 36 | 37 | idtac "Max points - standard: 0". 38 | idtac "Max points - advanced: 0". 39 | idtac "". 40 | idtac "Allowed Axioms:". 41 | idtac "functional_extensionality". 42 | idtac "FunctionalExtensionality.functional_extensionality_dep". 43 | idtac "plus_le". 44 | idtac "le_trans". 45 | idtac "le_plus_l". 46 | idtac "add_le_cases". 47 | idtac "Sn_le_Sm__n_le_m". 48 | idtac "O_le_n". 49 | idtac "". 50 | idtac "". 51 | idtac "********** Summary **********". 52 | idtac "". 53 | idtac "Below is a summary of the automatically graded exercises that are incomplete.". 54 | idtac "". 55 | idtac "The output for each exercise can be any of the following:". 56 | idtac " - 'Closed under the global context', if it is complete". 57 | idtac " - 'MANUAL', if it is manually graded". 58 | idtac " - A list of pending axioms, containing unproven assumptions. In this case". 59 | idtac " the exercise is considered complete, if the axioms are all allowed.". 60 | idtac "". 61 | idtac "********** Standard **********". 62 | idtac "". 63 | idtac "********** Advanced **********". 64 | Abort. 65 | 66 | (* 2022-06-16 11:18 *) 67 | 68 | (* 2022-06-16 11:18 *) 69 | -------------------------------------------------------------------------------- /textbook/lf/PostscriptTest.v: -------------------------------------------------------------------------------- 1 | Set Warnings "-notation-overridden,-parsing". 2 | From Coq Require Export String. 3 | From LF Require Import Postscript. 4 | 5 | Parameter MISSING: Type. 6 | 7 | Module Check. 8 | 9 | Ltac check_type A B := 10 | match type of A with 11 | | context[MISSING] => idtac "Missing:" A 12 | | ?T => first [unify T B; idtac "Type: ok" | idtac "Type: wrong - should be (" B ")"] 13 | end. 14 | 15 | Ltac print_manual_grade A := 16 | match eval compute in A with 17 | | Some (_ ?S ?C) => 18 | idtac "Score:" S; 19 | match eval compute in C with 20 | | ""%string => idtac "Comment: None" 21 | | _ => idtac "Comment:" C 22 | end 23 | | None => 24 | idtac "Score: Ungraded"; 25 | idtac "Comment: None" 26 | end. 27 | 28 | End Check. 29 | 30 | From LF Require Import Postscript. 31 | Import Check. 32 | 33 | Goal True. 34 | 35 | idtac " ". 36 | 37 | idtac "Max points - standard: 0". 38 | idtac "Max points - advanced: 0". 39 | idtac "". 40 | idtac "Allowed Axioms:". 41 | idtac "functional_extensionality". 42 | idtac "FunctionalExtensionality.functional_extensionality_dep". 43 | idtac "plus_le". 44 | idtac "le_trans". 45 | idtac "le_plus_l". 46 | idtac "add_le_cases". 47 | idtac "Sn_le_Sm__n_le_m". 48 | idtac "O_le_n". 49 | idtac "". 50 | idtac "". 51 | idtac "********** Summary **********". 52 | idtac "". 53 | idtac "Below is a summary of the automatically graded exercises that are incomplete.". 54 | idtac "". 55 | idtac "The output for each exercise can be any of the following:". 56 | idtac " - 'Closed under the global context', if it is complete". 57 | idtac " - 'MANUAL', if it is manually graded". 58 | idtac " - A list of pending axioms, containing unproven assumptions. In this case". 59 | idtac " the exercise is considered complete, if the axioms are all allowed.". 60 | idtac "". 61 | idtac "********** Standard **********". 62 | idtac "". 63 | idtac "********** Advanced **********". 64 | Abort. 65 | 66 | (* 2022-06-16 11:18 *) 67 | 68 | (* 2022-06-16 11:18 *) 69 | -------------------------------------------------------------------------------- /textbook/lf/common/jquery-ui/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-ui", 3 | "title": "jQuery UI", 4 | "description": "A curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.", 5 | "version": "1.12.1", 6 | "homepage": "http://jqueryui.com", 7 | "author": { 8 | "name": "jQuery Foundation and other contributors", 9 | "url": "https://github.com/jquery/jquery-ui/blob/1.12.1/AUTHORS.txt" 10 | }, 11 | "main": "ui/widget.js", 12 | "maintainers": [ 13 | { 14 | "name": "Scott González", 15 | "email": "scott.gonzalez@gmail.com", 16 | "url": "http://scottgonzalez.com" 17 | }, 18 | { 19 | "name": "Jörn Zaefferer", 20 | "email": "joern.zaefferer@gmail.com", 21 | "url": "http://bassistance.de" 22 | }, 23 | { 24 | "name": "Mike Sherov", 25 | "email": "mike.sherov@gmail.com", 26 | "url": "http://mike.sherov.com" 27 | }, 28 | { 29 | "name": "TJ VanToll", 30 | "email": "tj.vantoll@gmail.com", 31 | "url": "http://tjvantoll.com" 32 | }, 33 | { 34 | "name": "Felix Nagel", 35 | "email": "info@felixnagel.com", 36 | "url": "http://www.felixnagel.com" 37 | }, 38 | { 39 | "name": "Alex Schmitz", 40 | "email": "arschmitz@gmail.com", 41 | "url": "https://github.com/arschmitz" 42 | } 43 | ], 44 | "repository": { 45 | "type": "git", 46 | "url": "git://github.com/jquery/jquery-ui.git" 47 | }, 48 | "bugs": "https://bugs.jqueryui.com/", 49 | "license": "MIT", 50 | "scripts": { 51 | "test": "grunt" 52 | }, 53 | "dependencies": {}, 54 | "devDependencies": { 55 | "commitplease": "2.3.0", 56 | "grunt": "0.4.5", 57 | "grunt-bowercopy": "1.2.4", 58 | "grunt-cli": "0.1.13", 59 | "grunt-compare-size": "0.4.0", 60 | "grunt-contrib-concat": "0.5.1", 61 | "grunt-contrib-csslint": "0.5.0", 62 | "grunt-contrib-jshint": "0.12.0", 63 | "grunt-contrib-qunit": "1.0.1", 64 | "grunt-contrib-requirejs": "0.4.4", 65 | "grunt-contrib-uglify": "0.11.1", 66 | "grunt-git-authors": "3.1.0", 67 | "grunt-html": "6.0.0", 68 | "grunt-jscs": "2.1.0", 69 | "load-grunt-tasks": "3.4.0", 70 | "rimraf": "2.5.1", 71 | "testswarm": "1.1.0" 72 | }, 73 | "keywords": [] 74 | } 75 | -------------------------------------------------------------------------------- /textbook/lf/index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Logical Foundations 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 | 21 | 27 | 28 |
29 |
30 |
31 |
32 | Benjamin C. Pierce
33 | Arthur Azevedo de Amorim
34 | Chris Casinghino
35 | Marco Gaboardi
36 | Michael Greenberg
37 | Cătălin Hriţcu
38 | Vilhelm Sjöberg
39 | Brent Yorgey 40 |
41 |
42 |
43 |
44 | with
45 | Loris D'Antoni, 46 | Andrew W. Appel, 47 | Arthur Charguéraud, 48 | Michael Clarkson, 49 | Anthony Cowley, 50 | Jeffrey Foster, 51 | Dmitri Garbuzov, 52 | Olek Gierczak, 53 | Michael Hicks, 54 | Ranjit Jhala, 55 | Ori Lahav, 56 | Greg Morrisett, 57 | Jennifer Paykin, 58 | Mukund Raghothaman, 59 | Chung-chieh Shan, 60 | Leonid Spesivtsev, 61 | Andrew Tolmach, 62 | Philip Wadler, 63 | Stephanie Weirich, 64 | Li-Yao Xia, 65 | and 66 | Steve Zdancewic 67 |
68 |
69 | 70 |
71 |
72 | 73 |
74 |

Version 6.1 (2022-06-16 11:24, Coq 8.13 or later)

75 | 76 |
77 |
78 |
79 |
80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /notes/lf/CoqMakefile.conf: -------------------------------------------------------------------------------- 1 | # This configuration file was generated by running: 2 | # coq_makefile -f _CoqProject 3 | 4 | 5 | ############################################################################### 6 | # # 7 | # Project files. # 8 | # # 9 | ############################################################################### 10 | 11 | COQMF_VFILES = 12 | COQMF_MLIFILES = 13 | COQMF_MLFILES = 14 | COQMF_MLGFILES = 15 | COQMF_MLPACKFILES = 16 | COQMF_MLLIBFILES = 17 | COQMF_CMDLINE_VFILES = 18 | 19 | ############################################################################### 20 | # # 21 | # Path directives (-I, -R, -Q). # 22 | # # 23 | ############################################################################### 24 | 25 | COQMF_OCAMLLIBS = 26 | COQMF_SRC_SUBDIRS = 27 | COQMF_COQLIBS = -Q . LF 28 | COQMF_COQLIBS_NOML = -Q . LF 29 | COQMF_CMDLINE_COQLIBS = 30 | 31 | ############################################################################### 32 | # # 33 | # Coq configuration. # 34 | # # 35 | ############################################################################### 36 | 37 | COQMF_LOCAL=0 38 | COQMF_COQLIB=/Users/clarkson/.opam/cs4160/lib/coq/ 39 | COQMF_DOCDIR=/Users/clarkson/.opam/cs4160/doc/ 40 | COQMF_OCAMLFIND=/Users/clarkson/.opam/cs4160/bin/ocamlfind 41 | COQMF_CAMLFLAGS=-thread -rectypes -w +a-4-9-27-41-42-44-45-48-58-67-70 -safe-string -strict-sequence 42 | COQMF_WARN=-warn-error +a-3 43 | COQMF_HASNATDYNLINK=true 44 | COQMF_COQ_SRC_SUBDIRS=config lib clib kernel library engine pretyping interp gramlib gramlib/.pack parsing proofs tactics toplevel printing ide stm vernac plugins/btauto plugins/cc plugins/derive plugins/extraction plugins/firstorder plugins/funind plugins/ltac plugins/micromega plugins/nsatz plugins/omega plugins/ring plugins/rtauto plugins/ssr plugins/ssrmatching plugins/ssrsearch plugins/syntax 45 | COQMF_COQ_NATIVE_COMPILER_DEFAULT=no 46 | COQMF_WINDRIVE= 47 | 48 | ############################################################################### 49 | # # 50 | # Extra variables. # 51 | # # 52 | ############################################################################### 53 | 54 | COQMF_OTHERFLAGS = 55 | COQMF_INSTALLCOQDOCROOT = LF 56 | -------------------------------------------------------------------------------- /textbook/lf/MapsTest.v: -------------------------------------------------------------------------------- 1 | Set Warnings "-notation-overridden,-parsing". 2 | From Coq Require Export String. 3 | From LF Require Import Maps. 4 | 5 | Parameter MISSING: Type. 6 | 7 | Module Check. 8 | 9 | Ltac check_type A B := 10 | match type of A with 11 | | context[MISSING] => idtac "Missing:" A 12 | | ?T => first [unify T B; idtac "Type: ok" | idtac "Type: wrong - should be (" B ")"] 13 | end. 14 | 15 | Ltac print_manual_grade A := 16 | match eval compute in A with 17 | | Some (_ ?S ?C) => 18 | idtac "Score:" S; 19 | match eval compute in C with 20 | | ""%string => idtac "Comment: None" 21 | | _ => idtac "Comment:" C 22 | end 23 | | None => 24 | idtac "Score: Ungraded"; 25 | idtac "Comment: None" 26 | end. 27 | 28 | End Check. 29 | 30 | From LF Require Import Maps. 31 | Import Check. 32 | 33 | Goal True. 34 | 35 | idtac "------------------- t_update_same --------------------". 36 | idtac " ". 37 | 38 | idtac "#> t_update_same". 39 | idtac "Possible points: 2". 40 | check_type @t_update_same ( 41 | (forall (A : Type) (m : total_map A) (x : string), (x !-> m x; m) = m)). 42 | idtac "Assumptions:". 43 | Abort. 44 | Print Assumptions t_update_same. 45 | Goal True. 46 | idtac " ". 47 | 48 | idtac "------------------- t_update_permute --------------------". 49 | idtac " ". 50 | 51 | idtac "#> t_update_permute". 52 | idtac "Possible points: 3". 53 | check_type @t_update_permute ( 54 | (forall (A : Type) (m : total_map A) (v1 v2 : A) (x1 x2 : string), 55 | x2 <> x1 -> (x1 !-> v1; x2 !-> v2; m) = (x2 !-> v2; x1 !-> v1; m))). 56 | idtac "Assumptions:". 57 | Abort. 58 | Print Assumptions t_update_permute. 59 | Goal True. 60 | idtac " ". 61 | 62 | idtac " ". 63 | 64 | idtac "Max points - standard: 5". 65 | idtac "Max points - advanced: 5". 66 | idtac "". 67 | idtac "Allowed Axioms:". 68 | idtac "functional_extensionality". 69 | idtac "FunctionalExtensionality.functional_extensionality_dep". 70 | idtac "plus_le". 71 | idtac "le_trans". 72 | idtac "le_plus_l". 73 | idtac "add_le_cases". 74 | idtac "Sn_le_Sm__n_le_m". 75 | idtac "O_le_n". 76 | idtac "". 77 | idtac "". 78 | idtac "********** Summary **********". 79 | idtac "". 80 | idtac "Below is a summary of the automatically graded exercises that are incomplete.". 81 | idtac "". 82 | idtac "The output for each exercise can be any of the following:". 83 | idtac " - 'Closed under the global context', if it is complete". 84 | idtac " - 'MANUAL', if it is manually graded". 85 | idtac " - A list of pending axioms, containing unproven assumptions. In this case". 86 | idtac " the exercise is considered complete, if the axioms are all allowed.". 87 | idtac "". 88 | idtac "********** Standard **********". 89 | idtac "---------- t_update_same ---------". 90 | Print Assumptions t_update_same. 91 | idtac "---------- t_update_permute ---------". 92 | Print Assumptions t_update_permute. 93 | idtac "". 94 | idtac "********** Advanced **********". 95 | Abort. 96 | 97 | (* 2022-06-16 11:18 *) 98 | 99 | (* 2022-06-16 11:18 *) 100 | -------------------------------------------------------------------------------- /notes/lf/Makefile.conf: -------------------------------------------------------------------------------- 1 | # This configuration file was generated by running: 2 | # coq_makefile -f _CoqProject -o Makefile AltAuto.v Basics.v IndPrinciples.v IndProp.v Induction.v Lists.v Logic.v Poly.v Postscript.v Preface.v ProofObjects.v Tactics.v 3 | 4 | 5 | ############################################################################### 6 | # # 7 | # Project files. # 8 | # # 9 | ############################################################################### 10 | 11 | COQMF_VFILES = AltAuto.v Basics.v IndPrinciples.v IndProp.v Induction.v Lists.v Logic.v Poly.v Postscript.v Preface.v ProofObjects.v Tactics.v 12 | COQMF_MLIFILES = 13 | COQMF_MLFILES = 14 | COQMF_MLGFILES = 15 | COQMF_MLPACKFILES = 16 | COQMF_MLLIBFILES = 17 | COQMF_CMDLINE_VFILES = AltAuto.v Basics.v IndPrinciples.v IndProp.v Induction.v Lists.v Logic.v Poly.v Postscript.v Preface.v ProofObjects.v Tactics.v 18 | 19 | ############################################################################### 20 | # # 21 | # Path directives (-I, -R, -Q). # 22 | # # 23 | ############################################################################### 24 | 25 | COQMF_OCAMLLIBS = 26 | COQMF_SRC_SUBDIRS = 27 | COQMF_COQLIBS = -Q . LF 28 | COQMF_COQLIBS_NOML = -Q . LF 29 | COQMF_CMDLINE_COQLIBS = 30 | 31 | ############################################################################### 32 | # # 33 | # Coq configuration. # 34 | # # 35 | ############################################################################### 36 | 37 | COQMF_LOCAL=0 38 | COQMF_COQLIB=/Users/clarkson/.opam/cs4160/lib/coq/ 39 | COQMF_DOCDIR=/Users/clarkson/.opam/cs4160/doc/ 40 | COQMF_OCAMLFIND=/Users/clarkson/.opam/cs4160/bin/ocamlfind 41 | COQMF_CAMLFLAGS=-thread -rectypes -w +a-4-9-27-41-42-44-45-48-58-67-70 -safe-string -strict-sequence 42 | COQMF_WARN=-warn-error +a-3 43 | COQMF_HASNATDYNLINK=true 44 | COQMF_COQ_SRC_SUBDIRS=config lib clib kernel library engine pretyping interp gramlib gramlib/.pack parsing proofs tactics toplevel printing ide stm vernac plugins/btauto plugins/cc plugins/derive plugins/extraction plugins/firstorder plugins/funind plugins/ltac plugins/micromega plugins/nsatz plugins/omega plugins/ring plugins/rtauto plugins/ssr plugins/ssrmatching plugins/ssrsearch plugins/syntax 45 | COQMF_COQ_NATIVE_COMPILER_DEFAULT=no 46 | COQMF_WINDRIVE= 47 | 48 | ############################################################################### 49 | # # 50 | # Extra variables. # 51 | # # 52 | ############################################################################### 53 | 54 | COQMF_OTHERFLAGS = 55 | COQMF_INSTALLCOQDOCROOT = LF 56 | -------------------------------------------------------------------------------- /textbook/lf/ImpCEvalFunTest.v: -------------------------------------------------------------------------------- 1 | Set Warnings "-notation-overridden,-parsing". 2 | From Coq Require Export String. 3 | From LF Require Import ImpCEvalFun. 4 | 5 | Parameter MISSING: Type. 6 | 7 | Module Check. 8 | 9 | Ltac check_type A B := 10 | match type of A with 11 | | context[MISSING] => idtac "Missing:" A 12 | | ?T => first [unify T B; idtac "Type: ok" | idtac "Type: wrong - should be (" B ")"] 13 | end. 14 | 15 | Ltac print_manual_grade A := 16 | match eval compute in A with 17 | | Some (_ ?S ?C) => 18 | idtac "Score:" S; 19 | match eval compute in C with 20 | | ""%string => idtac "Comment: None" 21 | | _ => idtac "Comment:" C 22 | end 23 | | None => 24 | idtac "Score: Ungraded"; 25 | idtac "Comment: None" 26 | end. 27 | 28 | End Check. 29 | 30 | From LF Require Import ImpCEvalFun. 31 | Import Check. 32 | 33 | Goal True. 34 | 35 | idtac "------------------- pup_to_n --------------------". 36 | idtac " ". 37 | 38 | idtac "#> pup_to_n". 39 | idtac "Possible points: 2". 40 | check_type @pup_to_n (Imp.com). 41 | idtac "Assumptions:". 42 | Abort. 43 | Print Assumptions pup_to_n. 44 | Goal True. 45 | idtac " ". 46 | 47 | idtac "------------------- ceval_step__ceval_inf --------------------". 48 | idtac " ". 49 | 50 | idtac "#> Manually graded: ceval_step__ceval_inf". 51 | idtac "Possible points: 6". 52 | print_manual_grade manual_grade_for_ceval_step__ceval_inf. 53 | idtac " ". 54 | 55 | idtac "------------------- ceval__ceval_step --------------------". 56 | idtac " ". 57 | 58 | idtac "#> ceval__ceval_step". 59 | idtac "Possible points: 3". 60 | check_type @ceval__ceval_step ( 61 | (forall (c : Imp.com) (st st' : Imp.state), 62 | Imp.ceval c st st' -> 63 | exists i : nat, ceval_step st c i = @Some Imp.state st')). 64 | idtac "Assumptions:". 65 | Abort. 66 | Print Assumptions ceval__ceval_step. 67 | Goal True. 68 | idtac " ". 69 | 70 | idtac " ". 71 | 72 | idtac "Max points - standard: 11". 73 | idtac "Max points - advanced: 11". 74 | idtac "". 75 | idtac "Allowed Axioms:". 76 | idtac "functional_extensionality". 77 | idtac "FunctionalExtensionality.functional_extensionality_dep". 78 | idtac "plus_le". 79 | idtac "le_trans". 80 | idtac "le_plus_l". 81 | idtac "add_le_cases". 82 | idtac "Sn_le_Sm__n_le_m". 83 | idtac "O_le_n". 84 | idtac "". 85 | idtac "". 86 | idtac "********** Summary **********". 87 | idtac "". 88 | idtac "Below is a summary of the automatically graded exercises that are incomplete.". 89 | idtac "". 90 | idtac "The output for each exercise can be any of the following:". 91 | idtac " - 'Closed under the global context', if it is complete". 92 | idtac " - 'MANUAL', if it is manually graded". 93 | idtac " - A list of pending axioms, containing unproven assumptions. In this case". 94 | idtac " the exercise is considered complete, if the axioms are all allowed.". 95 | idtac "". 96 | idtac "********** Standard **********". 97 | idtac "---------- pup_to_n ---------". 98 | Print Assumptions pup_to_n. 99 | idtac "---------- ceval_step__ceval_inf ---------". 100 | idtac "MANUAL". 101 | idtac "---------- ceval__ceval_step ---------". 102 | Print Assumptions ceval__ceval_step. 103 | idtac "". 104 | idtac "********** Advanced **********". 105 | Abort. 106 | 107 | (* 2022-06-16 11:18 *) 108 | 109 | (* 2022-06-16 11:18 *) 110 | -------------------------------------------------------------------------------- /textbook/lf/common/jscoq.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Injects jsCoq into an existing page. 3 | * This script has to be at the end of the body so that it runs after 4 | * the page DOM has loaded. 5 | */ 6 | 7 | function jsCoqInject() { 8 | $(document.body).attr('id', 'ide-wrapper').addClass('toggled') 9 | .addClass(isTerse() ? 'terse' : 'full') 10 | .append($('
').on('click', jsCoqStart)); 11 | } 12 | 13 | var jsCoqShow = location.search === '?jscoq=on' || 14 | location.search !== '?jscoq=off' && localStorage.jsCoqShow === 'true'; 15 | 16 | var jscoq_ids = ['#main > div.code, #main > div.HIDEFROMHTML > div.code, #main div.proofscript > div.code']; 17 | var jscoq_opts = { 18 | layout: 'flex', 19 | show: jsCoqShow, 20 | focus: false, 21 | replace: true, 22 | editor: { mode: { 'company-coq': true }, className: 'jscoq code-tight' }, 23 | init_pkgs: ['init'], 24 | all_pkgs: { '+': ['coq'], '../../coq-pkgs': ['software-foundations'] }, 25 | init_import: ['utf8'], 26 | implicit_libs: true 27 | }; 28 | 29 | async function jsCoqLoad() { 30 | // - remove empty code fragments (coqdoc generates some spurious ones) 31 | $('#main > div.code').each(function() { 32 | if ($(this).text().match(/^\s*$/)) $(this).remove(); 33 | else spoilerAlert($(this)); 34 | }); 35 | 36 | // - make page div focusable so that keyboard scrolling works 37 | var page = document.querySelector('#page'); 38 | page.setAttribute('tabindex', -1); 39 | page.focus(); 40 | 41 | // - set presenter keyboard bindings to page-up/page-down to allow editing 42 | if (typeof KEYS !== 'undefined') 43 | Object.assign(KEYS, { 44 | next: 34, // PageDown 45 | prev: 33 // PageUp 46 | }); 47 | 48 | // - load and start jsCoq 49 | await JsCoq.load(); 50 | 51 | Deprettify.REPLACES.push( // LF,PLF define their own versions (for Imp) 52 | [/∨/g, '\\/'], [/∧/g, '/\\'], [/↔/g, '<->'], 53 | [/≤/g, '<='], [/≥/g, '>='], [/≠/g, '<>'], [/∈/g, '\\in'], 54 | [/\\−∗/g, '\\-*'], [/\\−−∗/g, '\\--*'], [/\\∀/g, '\\forall'] /* SLF */); 55 | 56 | var coq = await JsCoq.start(jscoq_ids, jscoq_opts); 57 | window.coq = coq; 58 | window.addEventListener('beforeunload', () => { localStorage.jsCoqShow = coq.layout.isVisible(); }) 59 | 60 | // - close button (replaces jsCoq's bulky power button) 61 | $('#panel-wrapper #toolbar').append($('