Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application of s-finite kernels to program semantics #912

Draft
wants to merge 36 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
f48584a
composition of subprob kernels
affeldt-aist Dec 29, 2024
e3aa56d
add sigma finite kernels
affeldt-aist Dec 30, 2024
503a95c
rename and deprecate
CohenCyril Dec 30, 2024
320a976
renaming
affeldt-aist Dec 30, 2024
fbb88ac
more doc
affeldt-aist Jan 1, 2025
a982f49
probabilistic language using mca's kernels
affeldt-aist Apr 12, 2023
21c9421
syntax and denotational semantics
AyumuSaito Feb 14, 2023
47c3495
rm duplicate, more uniform naming
affeldt-aist Sep 16, 2023
a6375fd
add binary operations
AyumuSaito Sep 23, 2023
59e1499
minor fixes, updates, rebases
affeldt-aist Oct 10, 2023
2442421
casino example and extensions
AyumuSaito Feb 14, 2023
ffd9c3d
bernoulli_trunc measurable
affeldt-aist Jan 9, 2024
8cbd7b2
add Nat and 0<=p<=1 problem
AyumuSaito Jan 12, 2024
418b3af
progress
affeldt-aist Jan 16, 2024
08e5860
minor fixes
AyumuSaito Feb 14, 2023
860a8f0
several admits proved
affeldt-aist Jan 16, 2024
0a228fc
definition beta
AyumuSaito Jan 18, 2024
ee3c638
fix
affeldt-aist Feb 15, 2024
3f784ea
write casino (wip)
AyumuSaito Feb 16, 2024
b36d7f9
WIP
affeldt-aist Feb 20, 2024
d2f1140
progress in proving the casino exampl
AyumuSaito Feb 20, 2024
b0e0864
admit about fact and adjustment of exp but casino broken
affeldt-aist Feb 27, 2024
93e42ac
fix
AyumuSaito Feb 27, 2024
7189334
minor progress
affeldt-aist Mar 1, 2024
1fe3568
casion example (wip)
AyumuSaito Mar 6, 2024
eafb565
complete the casino example
affeldt-aist Mar 24, 2024
898b9e0
beta_bdf_uniq_ae, integral_indicator_function
IshiguroYoshihiro Aug 25, 2024
7c5bbc0
fix
affeldt-aist Sep 18, 2024
273707f
add dep to algebra-tactics in nix
CohenCyril Oct 10, 2024
96c4647
generalize case_sum
affeldt-aist Oct 24, 2024
ece4355
Von Neumann Trick Proof complete
CohenCyril Dec 24, 2024
599d7a2
probability_fin can be avoided
affeldt-aist Dec 27, 2024
822b357
Better Von Neumann trick + generalization
CohenCyril Dec 29, 2024
4642509
doc
affeldt-aist Jan 1, 2025
c48e72f
golfing
CohenCyril Jan 2, 2025
8a5e466
minor fix
affeldt-aist Jan 3, 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
8 changes: 8 additions & 0 deletions .github/workflows/nix-action-8.19.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ jobs:
name: 'Building/fetching previous CI target: mathcomp-bigenough'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
job "mathcomp-bigenough"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-algebra-tactics'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
job "mathcomp-algebra-tactics"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: hierarchy-builder'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
Expand Down Expand Up @@ -267,6 +271,10 @@ jobs:
name: 'Building/fetching previous CI target: mathcomp-bigenough'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
job "mathcomp-bigenough"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-algebra-tactics'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
job "mathcomp-algebra-tactics"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: hierarchy-builder'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.19" --argstr
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/nix-action-8.20.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ jobs:
name: 'Building/fetching previous CI target: mathcomp-bigenough'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
job "mathcomp-bigenough"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-algebra-tactics'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
job "mathcomp-algebra-tactics"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: hierarchy-builder'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
Expand Down Expand Up @@ -267,6 +271,10 @@ jobs:
name: 'Building/fetching previous CI target: mathcomp-bigenough'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
job "mathcomp-bigenough"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: mathcomp-algebra-tactics'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
job "mathcomp-algebra-tactics"
- if: steps.stepCheck.outputs.status == 'built'
name: 'Building/fetching previous CI target: hierarchy-builder'
run: NIXPKGS_ALLOW_UNFREE=1 nix-build --no-out-link --argstr bundle "8.20" --argstr
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/nix-action-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ jobs:
needs:
- coq
- mathcomp-finmap
- hierarchy-builder
- mathcomp-bigenough
- mathcomp-bigenough
- hierarchy-builder
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/nix-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This file was generated from `meta.yml`, please do not edit manually.
# Follow the instructions on https://github.com/coq-community/templates to regenerate.
name: Nix CI

on:
push:
branches:
- master
pull_request:
paths:
- .github/workflows/**
pull_request_target:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
overrides:
- 'coq = "master"'
fail-fast: false
steps:
- name: Determine which commit to test
run: |
if [[ ${{ github.event_name }} =~ "pull_request" ]]; then
merge_commit=$(git ls-remote ${{ github.event.repository.html_url }} refs/pull/${{ github.event.number }}/merge | cut -f1)
if [ -z "$merge_commit" ]; then
echo "tested_commit=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
else
echo "tested_commit=$merge_commit" >> $GITHUB_ENV
fi
else
echo "tested_commit=${{ github.sha }}" >> $GITHUB_ENV
fi
- uses: cachix/install-nix-action@v14
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
- uses: cachix/cachix-action@v10
with:
name: coq-community
extraPullNames: coq, math-comp
- uses: actions/checkout@v2
with:
ref: ${{ env.tested_ref }}
- run: >
nix-build https://coq.inria.fr/nix/toolbox --argstr job analysis --arg override '{ ${{ matrix.overrides }}; analysis = builtins.filterSource (path: _: baseNameOf path != ".git") ./.; }'
300 changes: 300 additions & 0 deletions .nix/coq-overlays/mathcomp-analysis/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,300 @@
{
lib,
mkCoqDerivation,
mathcomp,
mathcomp-finmap,
mathcomp-bigenough,
mathcomp-zify,
mathcomp-algebra-tactics,
hierarchy-builder,
single ? false,
coqPackages,
coq,
version ? null,
}@args:

let
repo = "analysis";
owner = "math-comp";

release."1.7.0".sha256 = "sha256-GgsMIHqLkWsPm2VyOPeZdOulkN00IoBz++qA6yE9raQ=";
release."1.5.0".sha256 = "sha256-EWogrkr5TC5F9HjQJwO3bl4P8mij8U7thUGJNNI+k88=";
release."1.4.0".sha256 = "sha256-eDggeuEU0fMK7D5FbxvLkbAgpLw5lwL/Rl0eLXAnJeg=";
release."1.2.0".sha256 = "sha256-w6BivDM4dF4Iv4rUTy++2feweNtMAJxgGExPfYGhXxo=";
release."1.1.0".sha256 = "sha256-wl4kZf4mh9zbFfGcqaFEgWRyp0Bj511F505mYodpS6o=";
release."1.0.0".sha256 = "sha256-KiXyaWB4zQ3NuXadq4BSWfoN1cIo1xiLVSN6nW03tC4=";
release."0.7.0".sha256 = "sha256-JwkyetXrFsFHqz8KY3QBpHsrkhmEFnrCGuKztcoen60=";
release."0.6.7".sha256 = "sha256-3i2PBMEwihwgwUmnS0cmrZ8s+aLPFVq/vo0aXMUaUyA=";
release."0.6.6".sha256 = "sha256-tWtv6yeB5/vzwpKZINK9OQ0yQsvD8qu9zVSNHvLMX5Y=";
release."0.6.5".sha256 = "sha256-oJk9/Jl1SWra2aFAXRAVfX7ZUaDfajqdDksYaW8dv8E=";
release."0.6.1".sha256 = "sha256-1VyNXu11/pDMuH4DmFYSUF/qZ4Bo+/Zl3Y0JkyrH/r0=";
release."0.6.0".sha256 = "sha256-0msICcIrK6jbOSiBu0gIVU3RHwoEEvB88CMQqW/06rg=";
release."0.5.3".sha256 = "sha256-1NjFsi5TITF8ZWx1NyppRmi8g6YaoUtTdS9bU/sUe5k=";
release."0.5.2".sha256 = "0yx5p9zyl8jv1vg7rgkyq8dqzkdnkqv969mi62whmhkvxbavgzbw";
release."0.5.1".sha256 = "1hnzqb1gxf88wgj2n1b0f2xm6sxg9j0735zdsv6j12hlvx5lwk68";
release."0.3.13".sha256 = "sha256-Yaztew79KWRC933kGFOAUIIoqukaZOdNOdw4XszR1Hg=";
release."0.3.10".sha256 = "sha256-FBH2c8QRibq5Ycw/ieB8mZl0fDiPrYdIzZ6W/A3pIhI=";
release."0.3.9".sha256 = "sha256-uUU9diBwUqBrNRLiDc0kz0CGkwTZCUmigPwLbpDOeg4=";
release."0.3.6".sha256 = "0g2j7b2hca4byz62ssgg90bkbc8wwp7xkb2d3225bbvihi92b4c5";
release."0.3.4".sha256 = "18mgycjgg829dbr7ps77z6lcj03h3dchjbj5iir0pybxby7gd45c";
release."0.3.3".sha256 = "1m2mxcngj368vbdb8mlr91hsygl430spl7lgyn9qmn3jykack867";
release."0.3.1".sha256 = "1iad288yvrjv8ahl9v18vfblgqb1l5z6ax644w49w9hwxs93f2k8";
release."0.2.3".sha256 = "0p9mr8g1qma6h10qf7014dv98ln90dfkwn76ynagpww7qap8s966";

defaultVersion =
let
inherit (lib.versions) range;
in
lib.switch
[ coq.version mathcomp.version ]
[
{
cases = [
(range "8.19" "8.20")
(range "2.1.0" "2.2.0")
];
out = "1.7.0";
}
{
cases = [
(range "8.17" "8.20")
(range "2.0.0" "2.2.0")
];
out = "1.1.0";
}
{
cases = [
(range "8.17" "8.19")
(range "1.17.0" "1.19.0")
];
out = "0.7.0";
}
{
cases = [
(range "8.17" "8.18")
(range "1.15.0" "1.18.0")
];
out = "0.6.7";
}
{
cases = [
(range "8.17" "8.18")
(range "1.15.0" "1.18.0")
];
out = "0.6.6";
}
{
cases = [
(range "8.14" "8.18")
(range "1.15.0" "1.17.0")
];
out = "0.6.5";
}
{
cases = [
(range "8.14" "8.18")
(range "1.13.0" "1.16.0")
];
out = "0.6.1";
}
{
cases = [
(range "8.14" "8.18")
(range "1.13" "1.15")
];
out = "0.5.2";
}
{
cases = [
(range "8.13" "8.15")
(range "1.13" "1.14")
];
out = "0.5.1";
}
{
cases = [
(range "8.13" "8.15")
(range "1.12" "1.14")
];
out = "0.3.13";
}
{
cases = [
(range "8.11" "8.14")
(range "1.12" "1.13")
];
out = "0.3.10";
}
{
cases = [
(range "8.10" "8.12")
"1.11.0"
];
out = "0.3.3";
}
{
cases = [
(range "8.10" "8.11")
"1.11.0"
];
out = "0.3.1";
}
{
cases = [
(range "8.8" "8.11")
(range "1.8" "1.10")
];
out = "0.2.3";
}
]
null;

# list of analysis packages sorted by dependency order
packages = {
"classical" = [ ];
"reals" = [ "classical" ];
"experimental-reals" = [ "reals" ];
"analysis" = [ "reals" ];
"reals-stdlib" = [ "reals" ];
"analysis-stdlib" = [
"analysis"
"reals-stdlib"
];
};

mathcomp_ =
package:
let
classical-deps = [
mathcomp.algebra
mathcomp-finmap
mathcomp-zify
mathcomp-algebra-tactics
];
experimental-reals-deps = [ mathcomp-bigenough ];
analysis-deps = [
mathcomp.field
mathcomp-bigenough
];
intra-deps = lib.optionals (package != "single") (map mathcomp_ packages.${package});
pkgpath = lib.switch package [
{
case = "single";
out = ".";
}
{
case = "analysis";
out = "theories";
}
{
case = "experimental-reals";
out = "experimental_reals";
}
{
case = "reals-stdlib";
out = "reals_stdlib";
}
{
case = "analysis-stdlib";
out = "analysis_stdlib";
}
] package;
pname = if package == "single" then "mathcomp-analysis-single" else "mathcomp-${package}";
derivation = mkCoqDerivation ({
inherit
version
pname
defaultVersion
release
repo
owner
;

namePrefix = [
"coq"
"mathcomp"
];

propagatedBuildInputs =
intra-deps
++ lib.optionals (lib.elem package [
"classical"
"single"
]) classical-deps
++ lib.optionals (lib.elem package [
"experimental-reals"
"single"
]) experimental-reals-deps
++ lib.optionals (lib.elem package [
"analysis"
"single"
]) analysis-deps;

preBuild = ''
cd ${pkgpath}
'';

meta = {
description = "Analysis library compatible with Mathematical Components";
maintainers = [ lib.maintainers.cohencyril ];
license = lib.licenses.cecill-c;
};

passthru = lib.mapAttrs (package: deps: mathcomp_ package) packages;
});
# split packages didn't exist before 0.6, so bulding nothing in that case
patched-derivation1 = derivation.overrideAttrs (
o:
lib.optionalAttrs
(
o.pname != null
&& o.pname != "mathcomp-analysis"
&& o.version != null
&& o.version != "dev"
&& lib.versions.isLt "0.6" o.version
)
{
preBuild = "";
buildPhase = "echo doing nothing";
installPhase = "echo doing nothing";
}
);
patched-derivation2 = patched-derivation1.overrideAttrs (
o:
lib.optionalAttrs (
o.pname != null
&& o.pname == "mathcomp-analysis"
&& o.version != null
&& o.version != "dev"
&& lib.versions.isLt "0.6" o.version
) { preBuild = ""; }
);
# only packages classical and analysis existed before 1.7, so bulding nothing in that case
patched-derivation3 = patched-derivation2.overrideAttrs (
o:
lib.optionalAttrs
(
o.pname != null
&& o.pname != "mathcomp-classical"
&& o.pname != "mathcomp-analysis"
&& o.version != null
&& o.version != "dev"
&& lib.versions.isLt "1.7" o.version
)
{
preBuild = "";
buildPhase = "echo doing nothing";
installPhase = "echo doing nothing";
}
);
patched-derivation = patched-derivation3.overrideAttrs (
o:
lib.optionalAttrs (o.version != null && (o.version == "dev" || lib.versions.isGe "0.3.4" o.version))
{
propagatedBuildInputs = o.propagatedBuildInputs ++ [ hierarchy-builder ];
}
);
in
patched-derivation;
in
mathcomp_ (if single then "single" else "analysis")
Loading
Loading