Skip to content
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
0bb536e
function definition
MevenBertrand Nov 14, 2023
5ba1536
rebase
MevenBertrand Feb 26, 2024
fdf2ad1
everything builds again
MevenBertrand Feb 26, 2024
1eb362b
better typed algorithmic typing
MevenBertrand Feb 29, 2024
8deb6c7
untyped algorithm and soundness
MevenBertrand Feb 29, 2024
ad7f573
strengthening
MevenBertrand Mar 8, 2024
a06eecd
soundness and completeness of the relation
MevenBertrand Mar 8, 2024
9e1febd
function update
MevenBertrand Mar 8, 2024
1ac4ffd
metaprogramming premise preservation
MevenBertrand Jun 25, 2024
f184228
cleanups in algorithmic typing def and lemmas
MevenBertrand Jun 25, 2024
a0a835e
moving to the new lemmas – type and neutral conversion
MevenBertrand Jun 25, 2024
77f9185
finish new lemmas + clean-up until completeness
MevenBertrand Jun 26, 2024
1ba5474
finalise the move of typed conversion
MevenBertrand Jun 27, 2024
86b8811
updated algo conversion
MevenBertrand Jun 28, 2024
f125600
completeness
MevenBertrand Jul 1, 2024
4eb59d2
untyped termination
MevenBertrand Jul 8, 2024
631bacd
QED
MevenBertrand Jul 10, 2024
a5c3705
first jab at negative soundness
MevenBertrand Sep 4, 2024
46dc50d
injectivity of universe constructors
MevenBertrand Sep 6, 2024
54453c5
filling in the id head mismatches
MevenBertrand Sep 18, 2024
0d39255
declarative neutral conversion
MevenBertrand Sep 23, 2024
cd601cf
full negative soundness!
MevenBertrand Sep 24, 2024
7564093
moving validity
MevenBertrand Sep 25, 2024
9020eca
more moving
MevenBertrand Sep 25, 2024
24dfc58
adding support for autosubst in the makefile
MevenBertrand Sep 25, 2024
c81bd25
non-logrel boundary proof
MevenBertrand Sep 25, 2024
390acbc
reorganisation of the consequences of the logical relation
MevenBertrand Sep 25, 2024
b9648c7
algorithmic conversion
MevenBertrand Oct 8, 2024
7f73475
finished the algo judgements
MevenBertrand Oct 8, 2024
9f19523
import cleanups
MevenBertrand Oct 8, 2024
6550db5
going through the function defs
MevenBertrand Oct 11, 2024
c7501f1
towards negative soundness
MevenBertrand Nov 11, 2024
04a2e0e
finished the refactoring!
MevenBertrand Nov 14, 2024
18c05e8
add the metacoq dependency
MevenBertrand Dec 19, 2024
3a54212
update partialfun
MevenBertrand Jan 10, 2025
f063bbf
rebase on onlytermrel
MevenBertrand Jan 10, 2025
4380252
update support for the autosubst package in 8.20
MevenBertrand Jan 21, 2025
7490136
dependency graph fiddling
MevenBertrand Jan 21, 2025
4e63950
metacoq removal
MevenBertrand Jan 24, 2025
c606865
more clean up
MevenBertrand Jan 27, 2025
42de86c
cleaning up
MevenBertrand Jan 27, 2025
17d31cb
typeclasses shenanigans
MevenBertrand Jan 28, 2025
e3b6139
remove metacoq from opam deps
MevenBertrand Jan 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ Makefile.coq.conf

_opam

*.dot
*.dot
docs/dependency_graph.png

docs/dependency_graph.pre
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

all: partial-fun logrel

autosubst:
autosubst -f -s ucoq -v ge813 -p ./theories/AutoSubst/Ast_preamble -no-static -o ./theories/AutoSubst/Ast.v ./theories/AutoSubst/Ast.sig
partial-fun:
@+$(MAKE) -C coq-partialfun all

Expand All @@ -21,4 +23,4 @@ force _CoqProject Makefile: ;
%: Makefile.coq force
@+$(MAKE) -f Makefile.coq $@

.PHONY: all clean force partial-fun logrel
.PHONY: all clean force partial-fun logrel autosubst
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ Browsing the development

The development, rendered using `coqdoc`, can be [browsed online](https://coqhott.github.io/logrel-coq/). A dependency graph for the project is available [here](https://coqhott.github.io/logrel-coq/dependency_graph.png).

Syntax (re)generation
============
Syntax regeneration
====================

The syntax boilerplate has been generated using AutoSubst OCaml from the root folder, with the options `-s ucoq -v ge813 -no-static -p ./theories/AutoSubst/Ast_preamble` (see the [AutoSubst OCaml documentation](https://github.com/uds-psl/autosubst-ocaml) for installation instructions). Currently, this package works only with older version of Coq (8.14), so we cannot add a recipe to the MakeFile for automatically
re-generating the syntax.
For simplicity, we include the syntax file (`Ast.v`) generated using [autosubst-ocaml](https://github.com/uds-psl/autosubst-ocaml).

**If you wish to regenerate the syntax** by hand, you need to install AutoSubst from source using Coq 8.14, and use it with the previous options.
It can be re-generated using the `make autosubst` recipe, once `autosubst-ocaml` has been installed. Note that we include modified versions of the `core` and `unscoped` files, which fix their dependency inclusion. Thus, when the recipe offers to overwrite these, one should choose __not to__, and only let AutoSubst overwrite `Ast.v`.

Getting started with using the development
=================
Expand Down
86 changes: 46 additions & 40 deletions _CoqProject
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,32 @@
-Q theories LogRel

theories/Utils.v
theories/BasicAst.v
theories/Syntax/BasicAst.v

theories/AutoSubst/core.v
theories/AutoSubst/unscoped.v
theories/AutoSubst/Ast.v
theories/AutoSubst/Extra.v
theories/Context.v
theories/Notations.v

theories/NormalForms.v
theories/Weakening.v
theories/UntypedReduction.v
theories/UntypedValues.v
theories/GenericTyping.v
theories/Syntax/Context.v
theories/Syntax/Notations.v
theories/Syntax/TermNotations.v
theories/Syntax/NormalForms.v
theories/Syntax/Weakening.v
theories/Syntax/UntypedReduction.v
theories/Syntax/Sections.v
theories/Syntax/All.v

theories/GenericTyping.v
theories/DeclarativeTyping.v
theories/DeclarativeInstance.v

theories/TypingProperties/PropertiesDefinition.v
theories/TypingProperties/DeclarativeProperties.v
theories/TypingProperties/SubstConsequences.v
theories/TypingProperties/TypeConstructorsInj.v
theories/TypingProperties/NeutralConvProperties.v
theories/TypingProperties/NormalisationConsequences.v
theories/TypingProperties/LogRelConsequences.v

theories/LogicalRelation.v
theories/LogicalRelation/Induction.v
Expand All @@ -39,44 +48,41 @@ theories/LogicalRelation/Application.v
theories/LogicalRelation/SimpleArr.v
theories/LogicalRelation/Id.v

theories/Validity.v
theories/Substitution/Irrelevance.v
theories/Substitution/Properties.v
theories/Substitution/Escape.v
theories/Substitution/Conversion.v
theories/Substitution/Reflexivity.v
theories/Substitution/Reduction.v
theories/Substitution/SingleSubst.v
theories/Substitution/Introductions/Application.v
theories/Substitution/Introductions/Universe.v
theories/Substitution/Introductions/Poly.v
theories/Substitution/Introductions/Pi.v
theories/Substitution/Introductions/Lambda.v
theories/Substitution/Introductions/SimpleArr.v
theories/Substitution/Introductions/Var.v
theories/Substitution/Introductions/Nat.v
theories/Substitution/Introductions/Empty.v
theories/Substitution/Introductions/Sigma.v
theories/Substitution/Introductions/Id.v
theories/Validity/Validity.v
theories/Validity/Irrelevance.v
theories/Validity/Properties.v
theories/Validity/Escape.v
theories/Validity/Conversion.v
theories/Validity/Reflexivity.v
theories/Validity/Reduction.v
theories/Validity/SingleSubst.v
theories/Validity/Introductions/Application.v
theories/Validity/Introductions/Universe.v
theories/Validity/Introductions/Poly.v
theories/Validity/Introductions/Pi.v
theories/Validity/Introductions/Lambda.v
theories/Validity/Introductions/SimpleArr.v
theories/Validity/Introductions/Var.v
theories/Validity/Introductions/Nat.v
theories/Validity/Introductions/Empty.v
theories/Validity/Introductions/Sigma.v
theories/Validity/Introductions/Id.v
theories/Fundamental.v

theories/AlgorithmicTyping.v
theories/DeclarativeSubst.v
theories/TypeConstructorsInj.v
theories/Normalisation.v
theories/Consequences.v

theories/BundledAlgorithmicTyping.v
theories/AlgorithmicConvProperties.v
theories/AlgorithmicTypingProperties.v
theories/TypeUniqueness.v
theories/Algorithmic/UntypedAlgorithmicConversion.v
theories/Algorithmic/BundledAlgorithmicTyping.v
theories/Algorithmic/AlgorithmicConvProperties.v
theories/Algorithmic/AlgorithmicTypingProperties.v

theories/Decidability/Functions.v
theories/Decidability/UntypedFunctions.v
theories/Decidability/Soundness.v
theories/Decidability/NegativeSoundness.v
theories/Decidability/Completeness.v
theories/Decidability/Termination.v
theories/Decidability/UntypedSoundness.v
theories/Decidability/UntypedCompleteness.v
theories/Decidability.v

theories/TermNotations.v
theories/Decidability/Execution.v
theories/Positivity.v
theories/Decidability/Execution.v
2 changes: 1 addition & 1 deletion coq-partialfun
24 changes: 17 additions & 7 deletions generate_deps.pl
Original file line number Diff line number Diff line change
@@ -1,23 +1,33 @@
print "digraph logrel_deps {\n";
print " node [shape = ellipse,style=filled];\n";
# See here for color schemes: https://graphviz.org/doc/info/colors.html
print " node [shape = ellipse,style=filled,colorscheme = paired12];\n";
print " subgraph cluster_autosubst { label=\"AutoSubst\" \n}";
print " subgraph cluster_syntax { label=\"Syntax\" \n}";
print " subgraph cluster_logrel { label=\"LogicalRelation\" \n}";
print " subgraph cluster_subst { label=\"Validity\" \n}";
print " subgraph cluster_typing { label=\"Typing Properties\" \n}";
print " subgraph cluster_algo { label=\"Algorithmic\" \n}";
print " subgraph cluster_dec { label=\"Decidability\" \n}";
while (<>) {
if (m/.*?theories\/([^\s]*)\.vo.*:(.*)/) {
$dests = $2 ;
($path,$src) = ($1 =~ s/\//\./rg =~ m/(.*\.)?([^.]*)$/);
if ($path =~ m/AutoSubst\./) {
print "subgraph cluster_autosubst { \"$path$src\"[label=\"$src\",fillcolor=firebrick]}"
print "subgraph cluster_autosubst { \"$path$src\"[label=\"$src\",fillcolor=1]}"
}elsif ($path =~ m/Syntax\./) {
print "subgraph cluster_syntax { \"$path$src\"[label=\"$src\",fillcolor=2,fontcolor=white]}"
}elsif ($path =~ m/LogicalRelation\./) {
print "subgraph cluster_logrel { \"$path$src\"[label=\"$src\",fillcolor=forestgreen]}"
}elsif ($path =~ m/Substitution\./) {
print "subgraph cluster_subst { \"$path$src\"[label=\"$src\",fillcolor=goldenrod1]}"
print "subgraph cluster_logrel { \"$path$src\"[label=\"$src\",fillcolor=3]}"
}elsif ($path =~ m/Validity\./) {
print "subgraph cluster_subst { \"$path$src\"[label=\"$src\",fillcolor=4,fontcolor=white]}"
}elsif ($path =~ m/TypingProperties\./) {
print "subgraph cluster_typing { \"$path$src\"[label=\"$src\",fillcolor=5]}"
}elsif ($path =~ m/Algorithmic\./) {
print "subgraph cluster_algo { \"$path$src\"[label=\"$src\",fillcolor=9]}"
}elsif ($path =~ m/Decidability\./) {
print "subgraph cluster_dec { \"$path$src\"[label=\"$src\",fillcolor=deeppink3]}"
print "subgraph cluster_dec { \"$path$src\"[label=\"$src\",fillcolor=10,fontcolor=white]}"
}else {
print "\"$path$src\"[label=\"$src\",fillcolor=dodgerblue1]"
print "\"$path$src\"[label=\"$src\",fillcolor=6,fontcolor=white]"
}
for my $dest (split(" ", $dests)) {
$dest =~ s/\//\./g ;
Expand Down
6 changes: 5 additions & 1 deletion opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "2.0"
version: "8.19.dev"
version: "8.20.dev"
maintainer: "Meven.Bertrand@univ-nantes.fr"
dev-repo: "git+https://github.com/CoqHott/logrel-coq.git"
bug-reports: "https://github.com/CoqHott/logrel-coq/issues"
Expand All @@ -8,11 +8,15 @@ authors: ["Meven Lennon-Bertrand <Meven.Bertrand@univ-nantes.fr>"
"Kenji Maillard <kenji.maillard@inria.fr>"
"Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>"
]
homepage: "https://github.com/CoqHott/logrel-coq"
synopsis:"A formalisation of meta-theory for a dependent type system, in Coq"
license: "MIT"
depends: [
"coq" { >= "8.20" & < "8.21~" }
"coq-smpl"
"coq-equations" { >= "1.3" }
"coq-autosubst-ocaml" {>= "1.1"}
"coq-metacoq-template" {>= "1.3.1"}
]
build: [
[make]
Expand Down
Loading