This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Export Category. | |
Set Implicit Arguments. | |
Unset Strict Implicit. | |
Inductive Empty : Type := . | |
(* The category Zero *) | |
Definition Zero_ob : Type := Empty. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Export Functor. | |
Set Implicit Arguments. | |
Unset Strict Implicit. | |
Section alg_def. | |
Variable (C : Category). | |
Variable (F : Functor C C). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Export Category. | |
Set Implicit Arguments. | |
Unset Strict Implicit. | |
Section allegory. | |
Variable C : Category. | |
Variable Op_intersect : forall a b : Ob C, Map2 (Hom a b) (Hom a b) (Hom a b). | |
Variable Op_converse : forall a b : Ob C, Map (Hom a b) (Hom b a). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c Weighted CNF | |
c from Selman's wff generator | |
p wcnf 100 600 3237 | |
3237 2 5 30 0 | |
3237 -68 -41 -22 0 | |
3237 62 -58 9 0 | |
3237 77 -70 42 0 | |
3237 -94 -17 -26 0 | |
3237 -72 84 2 0 | |
3237 51 60 39 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sig L { | |
join, meet : L -> one L | |
} | |
one sig top, bot in L {} | |
fact { | |
all x, y, z : L { | |
-- commutativity | |
x.join[y] = y.join[x] | |
x.meet[y] = y.meet[x] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fso = new ActiveXObject("Scripting.FileSystemObject") | |
var file = fso.GetFile(WScript.Arguments.Item(0)) | |
var dirname = file.ParentFolder.Path | |
var basename = file.Name | |
var name = basename.replace(/\.xlsx?$/i, "") | |
var Excel = { | |
xlCSV : 6 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract sig Number { | |
data: Number -> one Number, | |
lt : set Number | |
} | |
one sig N1, N2, N3, N4, N5 extends Number {} | |
fact { | |
lt = ^(N1->N2 + N2->N3 + N3->N4 + N4->N5) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Lawvere's fixed point theorem. | |
References: | |
F. W. Lawvere and S. H. Schanuel, Conceptual Mathematics: A First Introduction to Categories. | |
Cambridge University Press, Nov. 1997. | |
*) | |
Require Export Category. | |
Require Export CCC. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Let F: C→D and G: D→C be functors. | |
If (μFG, in) is initial FG-algebra, then (GμFG, Gin) is initial GF-algebra. | |
Based on https://gist.github.com/955007 | |
*) | |
Require Export Functor. | |
Set Implicit Arguments. | |
Unset Strict Implicit. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- John Major's equality is definable in Agda2! | |
module JMeq where | |
data JMeq {A : Set} (a : A) : {B : Set} → B → Set where | |
refl : JMeq a a | |
JMeq-elim | |
: {A : Set} → (a a' : A) → (e : JMeq a a') | |
→ (P : (a' : A) → JMeq a a' → Set) | |
→ P a refl → P a' e |